diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 41e5db55a9..c10b09d0fa 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -44,6 +44,11 @@ runs: with: python-version: ${{ env.python_version }} cache: pip + cache-dependency-path: | + src/backend/requirements.txt + src/backend/requirements-dev.txt + contrib/container/requirements.txt + contrib/dev_reqs/requirements.txt - name: Install Base Python Dependencies if: ${{ inputs.python == 'true' }} shell: bash diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 3ffba97dd6..43e0943bea 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -13,8 +13,6 @@ env: node_version: 18 # The OS version must be set per job server_start_sleep: 60 - requests_version: 2.31.0 - pyyaml_version: 6.0.1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} INVENTREE_DB_ENGINE: sqlite3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c99a6f6d5..37e2769a9c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,23 +31,23 @@ repos: hooks: - id: pip-compile name: pip-compile requirements-dev.in - args: [src/backend/requirements-dev.in, -o, src/backend/requirements-dev.txt, --python-version=3.9, --no-strip-extras, --generate-hashes] + args: [src/backend/requirements-dev.in, -o, src/backend/requirements-dev.txt] files: src/backend/requirements-dev\.(in|txt)$ - id: pip-compile name: pip-compile requirements.txt - args: [src/backend/requirements.in, -o, src/backend/requirements.txt,--python-version=3.9, --no-strip-extras,--generate-hashes] + args: [src/backend/requirements.in, -o, src/backend/requirements.txt] files: src/backend/requirements\.(in|txt)$ - id: pip-compile name: pip-compile requirements.txt - args: [contrib/dev_reqs/requirements.in, -o, contrib/dev_reqs/requirements.txt,--python-version=3.9, --no-strip-extras, --generate-hashes] + args: [contrib/dev_reqs/requirements.in, -o, contrib/dev_reqs/requirements.txt] files: contrib/dev_reqs/requirements\.(in|txt)$ - id: pip-compile name: pip-compile requirements.txt - args: [docs/requirements.in, -o, docs/requirements.txt,--python-version=3.9, --no-strip-extras, --generate-hashes] + args: [docs/requirements.in, -o, docs/requirements.txt] files: docs/requirements\.(in|txt)$ - id: pip-compile name: pip-compile requirements.txt - args: [contrib/container/requirements.in, -o, contrib/container/requirements.txt,--python-version=3.11, --no-strip-extras, --generate-hashes] + args: [contrib/container/requirements.in, -o, contrib/container/requirements.txt, --python-version=3.11, --no-strip-extras, --generate-hashes] files: contrib/container/requirements\.(in|txt)$ - repo: https://github.com/Riverside-Healthcare/djLint rev: v1.34.1 @@ -63,6 +63,8 @@ repos: docs/docs/javascripts/.*| docs/docs/webfonts/.* | src/frontend/src/locales/.* | + pyproject.toml | + src/frontend/vite.config.ts | )$ - repo: https://github.com/pre-commit/mirrors-prettier rev: "v4.0.0-alpha.8" @@ -73,7 +75,7 @@ repos: - "prettier@^2.4.1" - "@trivago/prettier-plugin-sort-imports" - repo: https://github.com/pre-commit/mirrors-eslint - rev: "v9.1.0" + rev: "v9.4.0" hooks: - id: eslint additional_dependencies: @@ -85,7 +87,7 @@ repos: - "@typescript-eslint/parser" files: ^src/frontend/.*\.(js|jsx|ts|tsx)$ - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.2 + rev: v8.18.3 hooks: - id: gitleaks #- repo: https://github.com/jumanjihouse/pre-commit-hooks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 50022d571e..7c62407f07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ InvenTree/ │ │ ├─ tsconfig.json # Settings for frontend compilation ├─ .pkgr.yml # Build definition for Debian/Ubuntu packages ├─ .pre-commit-config.yaml # Code formatter/linter configuration -├─ CONTRIBUTING.md # Contirbution guidelines and overview +├─ CONTRIBUTING.md # Contribution guidelines and overview ├─ Procfile # Process definition for Debian/Ubuntu packages ├─ README.md # General project information and overview ├─ runtime.txt # Python runtime settings for Debian/Ubuntu packages build diff --git a/contrib/dev_reqs/requirements.txt b/contrib/dev_reqs/requirements.txt index 3b3aff3e04..f578fd1882 100644 --- a/contrib/dev_reqs/requirements.txt +++ b/contrib/dev_reqs/requirements.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile contrib/dev_reqs/requirements.in -o contrib/dev_reqs/requirements.txt --python-version=3.9 --no-strip-extras --generate-hashes +# uv pip compile contrib/dev_reqs/requirements.in -o contrib/dev_reqs/requirements.txt certifi==2024.2.2 \ --hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ --hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 diff --git a/docs/docs/part/scheduling.md b/docs/docs/part/scheduling.md index 2c70c85fd2..b9e667d9d8 100644 --- a/docs/docs/part/scheduling.md +++ b/docs/docs/part/scheduling.md @@ -5,7 +5,7 @@ title: Part Scheduling ## Part Scheduling -The *Scheduling* tab provides an overview of the *predicted* future availabile quantity of a particular part. +The *Scheduling* tab provides an overview of the *predicted* future available quantity of a particular part. The *Scheduling* tab displays a chart of estimated future part stock levels. It begins at the current date, with the current stock level. It then projects into the "future", taking information from: diff --git a/docs/docs/releases/0.1.4.md b/docs/docs/releases/0.1.4.md index cb8237d469..8963bb9198 100644 --- a/docs/docs/releases/0.1.4.md +++ b/docs/docs/releases/0.1.4.md @@ -61,7 +61,7 @@ Also, dedicated settings sections were added for: For Category section, read [Category Parameter Templates](#category-parameter-templates) -Other section allows to set the prefix of build, puchase and sales orders. +Other section allows to set the prefix of build, purchase and sales orders. ### Category Parameter Templates diff --git a/docs/docs/releases/0.4.0.md b/docs/docs/releases/0.4.0.md index 55d8b07bf9..1829f5df9c 100644 --- a/docs/docs/releases/0.4.0.md +++ b/docs/docs/releases/0.4.0.md @@ -29,5 +29,5 @@ title: Release 0.4.0 | Pull Request | Description | | --- | --- | | [#1823](https://github.com/inventree/InvenTree/pull/1823) | Fixes link formatting issues for ManufacturerParts | -| [#1824](https://github.com/inventree/InvenTree/pull/1824) | Selects correct curreny code when creating a new PurchaseOrderLineItem | +| [#1824](https://github.com/inventree/InvenTree/pull/1824) | Selects correct currency code when creating a new PurchaseOrderLineItem | | [#1867](https://github.com/inventree/InvenTree/pull/1867) | Fixes long-running bug when deleting sequential items via the API | diff --git a/docs/docs/stock/stock.md b/docs/docs/stock/stock.md index 4ec3c249f0..4c6605e2c7 100644 --- a/docs/docs/stock/stock.md +++ b/docs/docs/stock/stock.md @@ -20,7 +20,7 @@ The *Stock Item* detail view shows information regarding the particular stock it **Quantity** - How many items are in stock? -**Supplier** - If this part was purcahsed from a *Supplier*, which *Supplier* did it come from? +**Supplier** - If this part was purchased from a *Supplier*, which *Supplier* did it come from? **Supplier Part** - Link to the particular *Supplier Part*, if appropriate. diff --git a/docs/requirements.txt b/docs/requirements.txt index 1fe63ba3e3..fb82e79b30 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile docs/requirements.in -o docs/requirements.txt --python-version=3.9 --no-strip-extras --generate-hashes +# uv pip compile docs/requirements.in -o docs/requirements.txt anyio==4.3.0 \ --hash=sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8 \ --hash=sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6 diff --git a/pyproject.toml b/pyproject.toml index a20e754e99..54e44d2db7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,11 @@ indent-style = "space" skip-magic-trailing-comma = true line-ending = "auto" +[tool.uv.pip] +python-version = "3.9" +no-strip-extras=true +generate-hashes=true + [tool.coverage.run] source = ["src/backend/InvenTree", "InvenTree"] @@ -80,3 +85,6 @@ src_paths=["src/backend/InvenTree", ] skip_glob ="*/migrations/*.py" known_django="django" sections=["FUTURE","STDLIB","DJANGO","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"] + +[tool.codespell] +ignore-words-list = ["assertIn","SME"] diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index c579d8d072..e385a2e4e6 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -119,7 +119,7 @@ v178 - 2024-02-29 : https://github.com/inventree/InvenTree/pull/6604 - Adds "external_stock" field to the Part API endpoint - Adds "external_stock" field to the BomItem API endpoint - Adds "external_stock" field to the BuildLine API endpoint - - Stock quantites represented in the BuildLine API endpoint are now filtered by Build.source_location + - Stock quantities represented in the BuildLine API endpoint are now filtered by Build.source_location v177 - 2024-02-27 : https://github.com/inventree/InvenTree/pull/6581 - Adds "subcategoies" count to PartCategoryTree serializer diff --git a/src/backend/InvenTree/InvenTree/models.py b/src/backend/InvenTree/InvenTree/models.py index 3437290a68..d558542abe 100644 --- a/src/backend/InvenTree/InvenTree/models.py +++ b/src/backend/InvenTree/InvenTree/models.py @@ -562,7 +562,7 @@ class InvenTreeTree(MetadataMixin, PluginValidationMixin, MPTTModel): """Provides an abstracted self-referencing tree model for data categories. - Each Category has one parent Category, which can be blank (for a top-level Category). - - Each Category can have zero-or-more child Categor(y/ies) + - Each Category can have zero-or-more child Category(y/ies) Attributes: name: brief name diff --git a/src/backend/InvenTree/InvenTree/unit_test.py b/src/backend/InvenTree/InvenTree/unit_test.py index f72654f730..583930f790 100644 --- a/src/backend/InvenTree/InvenTree/unit_test.py +++ b/src/backend/InvenTree/InvenTree/unit_test.py @@ -240,7 +240,7 @@ class ExchangeRateMixin: class InvenTreeTestCase(ExchangeRateMixin, UserMixin, TestCase): - """Testcase with user setup buildin.""" + """Testcase with user setup build in.""" pass diff --git a/src/backend/InvenTree/config_template.yaml b/src/backend/InvenTree/config_template.yaml index d1b13a5e1c..a5b8495187 100644 --- a/src/backend/InvenTree/config_template.yaml +++ b/src/backend/InvenTree/config_template.yaml @@ -26,7 +26,7 @@ database: # Set debug to False to run in production mode, or use the environment variable INVENTREE_DEBUG debug: True -# Set to False to disable the admin interfac, or use the environment variable INVENTREE_ADMIN_ENABLED +# Set to False to disable the admin interface, or use the environment variable INVENTREE_ADMIN_ENABLED #admin_enabled: True # Set the admin URL, or use the environment variable INVENTREE_ADMIN_URL diff --git a/src/backend/InvenTree/templates/js/translated/barcode.js b/src/backend/InvenTree/templates/js/translated/barcode.js index e03d6f3950..d82cc24c80 100644 --- a/src/backend/InvenTree/templates/js/translated/barcode.js +++ b/src/backend/InvenTree/templates/js/translated/barcode.js @@ -527,7 +527,7 @@ function barcodeCheckInStockItems(location_id, options={}) { var modal = options.modal || createNewModal(); options.modal = modal; - // List of items we are going to checkin + // List of items we are going to check in var items = []; function reloadTable() { diff --git a/src/backend/requirements-dev.txt b/src/backend/requirements-dev.txt index aea5becad4..7debaf3965 100644 --- a/src/backend/requirements-dev.txt +++ b/src/backend/requirements-dev.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile src/backend/requirements-dev.in -o src/backend/requirements-dev.txt --python-version=3.9 --no-strip-extras --generate-hashes +# uv pip compile src/backend/requirements-dev.in -o src/backend/requirements-dev.txt asgiref==3.8.1 \ --hash=sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47 \ --hash=sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590 diff --git a/src/backend/requirements.txt b/src/backend/requirements.txt index 80c816ca37..e631ad0619 100644 --- a/src/backend/requirements.txt +++ b/src/backend/requirements.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile src/backend/requirements.in -o src/backend/requirements.txt --python-version=3.9 --no-strip-extras --generate-hashes +# uv pip compile src/backend/requirements.in -o src/backend/requirements.txt asgiref==3.8.1 \ --hash=sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47 \ --hash=sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590 diff --git a/src/frontend/playwright.config.ts b/src/frontend/playwright.config.ts index f24b94d323..2914f54f5a 100644 --- a/src/frontend/playwright.config.ts +++ b/src/frontend/playwright.config.ts @@ -3,7 +3,7 @@ import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './tests', fullyParallel: true, - timeout: 60000, + timeout: 90000, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, workers: process.env.CI ? 2 : undefined,