Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Dev#21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Dev #21
Changes from all commits
95fffc1b0617b17d1e57465256a854cdf41857117c409727a609e4fb8e95c7a55edab7c8c53251645028718828b63aa60579f6c2022916363b500453e474bf5bde08ae9980c30f83b94f3b387dc11dfe817ef5610acffe5598def4e5e4af27be43baee248a34e36797458ffc71b9dca79569a7ceedf676cbf44f4d96f506f35f9e0e2d39713238f1a154eee2005608459449cfd2d2910d6a1f51c4c7c99887fc9682f38ffa7b1f791bf5de3addedc79d40a826e17fbc95cf615e2b9231232a661ca39f4fa50f99479072804012ca7e2827eb407579e1e28606c0c85b4db4e73cc441f419bd53c197b4fbd194f66caf5c117fd8566c221a0f8c83464691dda0808a1589829f429f9c8d26606fa578e25067a9799929f767f4f0530ed32c570ef2986c6e6f2c4f5e18f70b08bef4c74f17b0f8b8adb865898f2c14ea10ccfcb8cd798d3e8934d8b0b7be6cc5239efe4dcf3b75bcc79587abbb13ac9cf9f320a46d0b9784cb8a3674b24cacb3d2608c2026e06d4bc5a2a43b414773dc587277829622ec3736eeeb1936f015ba5cf132e7f6ce625dec9c959434e75f69e8d20bec4b6a7ed90d885ad742765dc039b511c861ec5c0d009c1ef626487b57e989a8c11f20e8cab448ca88873125198075c0ddc2d1f248f1437799a215586f452a853b71cb6c76f32249f26560e1cd7b0d22f880b07e499acc3c457bf6c50ccFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| .venv | ||
| .pytest_cache | ||
| __pycache__ | ||
| *.sql | ||
| *.db | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -17,18 +17,18 @@ jobs: | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| uses: actions/setup-python@v5 | ||
| ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| # update-environment: false | ||
| - name: Reload Cache / pip | ||
| uses: actions/cache@v3 | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~\AppData\Local\pip\Cache | ||
| # NOTE: only cares about base requirements.txt | ||
| @@ -43,8 +43,8 @@ jobs: | ||
| - name: Basic Tests / CLI / Integration | ||
| run: | | ||
| n -v | ||
| nutra -d init -y | ||
| n --version | ||
| nutra --debug init -y | ||
| nutra --no-pager nt | ||
| nutra --no-pager sort -c 789 | ||
| nutra --no-pager search ultraviolet mushrooms | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [MASTER] | ||
| fail-under=9.93 | ||
| fail-under=9.95 | ||
| [MESSAGES CONTROL] | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -16,38 +16,53 @@ | ||||||||||||||||||
| # Package info | ||||||||||||||||||
| __title__ = "nutra" | ||||||||||||||||||
| __version__ = "0.2.7" | ||||||||||||||||||
| __version__ = "0.2.8.dev2" | ||||||||||||||||||
| __author__ = "Shane Jaroch" | ||||||||||||||||||
| __email__ = "chown_tee@proton.me" | ||||||||||||||||||
| __license__ = "GPL v3" | ||||||||||||||||||
| __copyright__ = "Copyright 2018-2022 Shane Jaroch" | ||||||||||||||||||
| __url__ = "https://github.com/nutratech/cli" | ||||||||||||||||||
| # Sqlite target versions | ||||||||||||||||||
| __db_target_nt__ = "0.0.6" | ||||||||||||||||||
| __db_target_usda__ = "0.0.8" | ||||||||||||||||||
| # TODO: should this be via versions.csv file? Don't update in two places? | ||||||||||||||||||
| __db_target_nt__ = "0.0.7" | ||||||||||||||||||
| __db_target_usda__ = "0.0.10" | ||||||||||||||||||
| USDA_XZ_SHA256 = "25dba8428ced42d646bec704981d3a95dc7943240254e884aad37d59eee9616a" | ||||||||||||||||||
| # Global variables | ||||||||||||||||||
| PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) | ||||||||||||||||||
| NUTRA_HOME = os.getenv("NUTRA_HOME", os.path.join(os.path.expanduser("~"), ".nutra")) | ||||||||||||||||||
| USDA_DB_NAME = "usda.sqlite" | ||||||||||||||||||
| NUTRA_HOME = os.getenv( | ||||||||||||||||||
| "NUTRA_HOME", | ||||||||||||||||||
| os.getenv("NUTRA_DIR", os.path.join(os.path.expanduser("~"), ".nutra")), | ||||||||||||||||||
| ) | ||||||||||||||||||
| USDA_DB_NAME = "usda.sqlite3" | ||||||||||||||||||
| # NOTE: NT_DB_NAME = "nt.sqlite3" is defined in ntclient.ntsqlite.sql | ||||||||||||||||||
| NTSQLITE_BUILDPATH = os.path.join(PROJECT_ROOT, "ntsqlite", "sql", NT_DB_NAME) | ||||||||||||||||||
| NTSQLITE_DESTINATION = os.path.join(NUTRA_HOME, NT_DB_NAME) | ||||||||||||||||||
| # Check Python version | ||||||||||||||||||
| def version_check() -> None: | ||||||||||||||||||
| """Check Python version""" | ||||||||||||||||||
| # pylint: disable=global-statement | ||||||||||||||||||
| global PY_SYS_VER, PY_SYS_STR | ||||||||||||||||||
| PY_SYS_VER = sys.version_info[0:3] | ||||||||||||||||||
| PY_SYS_STR = ".".join(str(x) for x in PY_SYS_VER) | ||||||||||||||||||
| if PY_SYS_VER < PY_MIN_VER: | ||||||||||||||||||
| # TODO: make this testable with: `class CliConfig`? | ||||||||||||||||||
| raise RuntimeError( | ||||||||||||||||||
| "ERROR: %s requires Python %s or later to run" % (__title__, PY_MIN_STR), | ||||||||||||||||||
| "HINT: You're running Python %s" % PY_SYS_STR, | ||||||||||||||||||
| ) | ||||||||||||||||||
Comment on lines
+54
to
+57
| ||||||||||||||||||
| raiseRuntimeError( | |
| "ERROR: %s requires Python %s or later to run"% (__title__, PY_MIN_STR), | |
| "HINT: You're running Python %s"%PY_SYS_STR, | |
| ) | |
| raiseRuntimeError( | |
| "ERROR: %s requires Python %s or later to run\n" | |
| "HINT: You're running Python %s"%(__title__, PY_MIN_STR, PY_SYS_STR) | |
| ) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Python 3.5 is incompatible with actions/setup-python@v5 and will cause workflow failures due to SSL certificate verification errors. Python 3.5 reached EOL in 2020. Consider using supported Python versions like 3.8, 3.9, 3.10, 3.11, or 3.12 instead.
Prompt for AI agents