Skip to content

Commit

Permalink
Merge branch 'master' into pui-adjust-breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
matmair authored Sep 10, 2024
2 parents b70cceb + 30ab365 commit 1b9ddf7
Show file tree
Hide file tree
Showing 98 changed files with 1,926 additions and 3,423 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ python3 -m venv /home/inventree/dev/venv --system-site-packages --upgrade-deps
invoke update -s

# Configure dev environment
invoke setup-dev
invoke dev.setup-dev

# Install required frontend packages
invoke frontend-install
invoke dev.frontend-install

# remove existing gitconfig created by "Avoiding Dubious Ownership" step
# so that it gets copied from host to the container to have your global
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/migration/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
shell: bash
run: |
invoke migrate
invoke import-fixtures
invoke dev.import-fixtures
invoke export-records -f data.json
python3 ./src/backend/InvenTree/manage.py flush --noinput
invoke migrate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_translations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
install: true
apt-dependency: gettext
- name: Test Translations
run: invoke translate
run: invoke dev.translate
- name: Check Migration Files
run: python3 .github/scripts/check_migration_files.py
8 changes: 4 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Set Up Python ${{ env.python_version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # pin@v5.2.0
with:
python-version: ${{ env.python_version }}
- name: Version Check
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
run: |
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke install
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke update
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke setup-dev
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke dev.setup-dev
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml up -d
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke wait
- name: Check Data Directory
Expand All @@ -115,10 +115,10 @@ jobs:
- name: Run Unit Tests
run: |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> contrib/container/docker.dev.env
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke test --disable-pty
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke dev.test --disable-pty
- name: Run Migration Tests
run: |
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke test --migrations
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke dev.test --migrations
- name: Clean up test folder
run: |
rm -rf InvenTree/_testfolder
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/qc_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Set up Python ${{ env.python_version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # pin@v5.2.0
with:
python-version: ${{ env.python_version }}
cache: "pip"
Expand All @@ -115,7 +115,7 @@ jobs:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Set up Python ${{ env.python_version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5.1.1
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # pin@v5.2.0
with:
python-version: ${{ env.python_version }}
- name: Check Config
Expand Down Expand Up @@ -157,9 +157,9 @@ jobs:
dev-install: true
update: true
- name: Export API Documentation
run: invoke schema --ignore-warnings --filename src/backend/InvenTree/schema.yml
run: invoke dev.schema --ignore-warnings --filename src/backend/InvenTree/schema.yml
- name: Upload schema
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # pin@v4.4.0
with:
name: schema.yml
path: src/backend/InvenTree/schema.yml
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
diff --color -u src/backend/InvenTree/schema.yml api.yaml
diff -u src/backend/InvenTree/schema.yml api.yaml && echo "no difference in API schema " || exit 2
- name: Check schema - including warnings
run: invoke schema
run: invoke dev.schema
continue-on-error: true
- name: Extract version for publishing
id: version
Expand Down Expand Up @@ -262,9 +262,9 @@ jobs:
run: git clone --depth 1 https://github.com/inventree/${{ env.wrapper_name }} ./${{ env.wrapper_name }}
- name: Start InvenTree Server
run: |
invoke delete-data -f
invoke import-fixtures
invoke server -a 127.0.0.1:12345 &
invoke dev.delete-data -f
invoke dev.import-fixtures
invoke dev.server -a 127.0.0.1:12345 &
invoke wait
- name: Run Tests For `${{ env.wrapper_name }}`
run: |
Expand Down Expand Up @@ -302,11 +302,11 @@ jobs:
- name: Data Export Test
uses: ./.github/actions/migration
- name: Test Translations
run: invoke translate
run: invoke dev.translate
- name: Check Migration Files
run: python3 .github/scripts/check_migration_files.py
- name: Coverage Tests
run: invoke test --coverage
run: invoke dev.test --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
if: always()
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
dev-install: true
update: true
- name: Run Tests
run: invoke test
run: invoke dev.test
- name: Data Export Test
uses: ./.github/actions/migration

Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:
dev-install: true
update: true
- name: Run Tests
run: invoke test
run: invoke dev.test
- name: Data Export Test
uses: ./.github/actions/migration

Expand Down Expand Up @@ -438,7 +438,7 @@ jobs:
dev-install: true
update: true
- name: Run Tests
run: invoke test --migrations --report --coverage
run: invoke dev.test --migrations --report --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
if: always()
Expand Down Expand Up @@ -525,17 +525,17 @@ jobs:
install: true
update: true
- name: Set up test data
run: invoke setup-test -i
run: invoke dev.setup-test -i
- name: Rebuild thumbnails
run: invoke rebuild-thumbnails
run: invoke int.rebuild-thumbnails
- name: Install dependencies
run: inv frontend-compile
run: invoke int.frontend-compile
- name: Install Playwright Browsers
run: cd src/frontend && npx playwright install --with-deps
- name: Run Playwright tests
id: tests
run: cd src/frontend && npx nyc playwright test
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # pin@v4
if: ${{ !cancelled() && steps.tests.outcome == 'failure' }}
with:
name: playwright-report
Expand Down Expand Up @@ -573,7 +573,7 @@ jobs:
run: |
cd src/backend/InvenTree/web/static
zip -r frontend-build.zip web/ web/.vite
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4.3.6
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # pin@v4.4.0
with:
name: frontend-build
path: src/backend/InvenTree/web/static/web
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
zip -r ../frontend-build.zip * .vite
- name: Attest Build Provenance
id: attest
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # pin@v1
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # pin@v1
with:
subject-path: "${{ github.workspace }}/src/backend/InvenTree/web/static/frontend-build.zip"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/translations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
npm: true
apt-dependency: gettext
- name: Make Translations
run: invoke translate
run: invoke dev.translate
- name: Remove compiled static files
run: rm -rf src/backend/InvenTree/static
- name: Remove all local changes that are not *.po files
Expand All @@ -51,7 +51,7 @@ jobs:
git reset --hard
git reset HEAD~
- name: crowdin action
uses: crowdin/github-action@6ed209d411599a981ccb978df3be9dc9b8a81699 # pin@v2
uses: crowdin/github-action@cf0ccf9a71f614e66e011d461ea11e5dbabb93ca # pin@v2
with:
upload_sources: true
upload_translations: false
Expand Down
20 changes: 10 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,61 @@
{
"label": "worker",
"type": "shell",
"command": "inv worker",
"command": "invoke int.worker",
"problemMatcher": [],
},
{
"label": "clean-settings",
"type": "shell",
"command": "inv clean-settings",
"command": "invoke int.clean-settings",
"problemMatcher": [],
},
{
"label": "delete-data",
"type": "shell",
"command": "inv delete-data",
"command": "invoke dev.delete-data",
"problemMatcher": [],
},
{
"label": "migrate",
"type": "shell",
"command": "inv migrate",
"command": "invoke migrate",
"problemMatcher": [],
},
{
"label": "server",
"type": "shell",
"command": "inv server",
"command": "invoke dev.server",
"problemMatcher": [],
},
{
"label": "setup-dev",
"type": "shell",
"command": "inv setup-dev",
"command": "invoke dev.setup-dev",
"problemMatcher": [],
},
{
"label": "setup-test",
"type": "shell",
"command": "inv setup-test -i --path dev/inventree-demo-dataset",
"command": "invoke dev.setup-test -i --path dev/inventree-demo-dataset",
"problemMatcher": [],
},
{
"label": "superuser",
"type": "shell",
"command": "inv superuser",
"command": "invoke superuser",
"problemMatcher": [],
},
{
"label": "test",
"type": "shell",
"command": "inv test",
"command": "invoke dev.test",
"problemMatcher": [],
},
{
"label": "update",
"type": "shell",
"command": "inv update",
"command": "invoke update",
"problemMatcher": [],
},
]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2022 InvenTree
Copyright (c) 2017 - InvenTree Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,35 @@ InvenTree is designed to be **extensible**, and provides multiple options for **
</details>

<details>
<summary>Client</summary>
<summary>Client - CUI</summary>
<ul>
<li><a href="https://getbootstrap.com/">Bootstrap</a></li>
<li><a href="https://jquery.com/">jQuery</a></li>
<li><a href="https://bootstrap-table.com/">Bootstrap-Table</a></li>
</ul>
</details>

<details>
<summary>Client - PUI</summary>
<ul>
<li><a href="https://react.dev/">React</a></li>
<li><a href="https://lingui.dev/">Lingui</a></li>
<li><a href="https://reactrouter.com/">React Router</a></li>
<li><a href="https://tanstack.com/query/">TanStack Query</a></li>
<li><a href="https://github.com/pmndrs/zustand">Zustand</a></li>
<li><a href="https://mantine.dev/">Mantine</a></li>
<li><a href="https://icflorescu.github.io/mantine-datatable/">Mantine Data Table</a></li>
<li><a href="https://codemirror.net/">CodeMirror</a></li>
</ul>
</details>

<details>
<summary>DevOps</summary>
<ul>
<li><a href="https://hub.docker.com/r/inventree/inventree">Docker</a></li>
<li><a href="https://crowdin.com/project/inventree">Crowdin</a></li>
<li><a href="https://app.codecov.io/gh/inventree/InvenTree">Codecov</a></li>
<li><a href="https://app.deepsource.com/gh/inventree/InvenTree">DeepSource</a></li>
<li><a href="https://sonarcloud.io/project/overview?id=inventree_InvenTree">SonarCloud</a></li>
<li><a href="https://packager.io/gh/inventree/InvenTree">Packager.io</a></li>
</ul>
</details>
Expand Down
2 changes: 1 addition & 1 deletion contrib/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ RUN apk add --no-cache --update nodejs npm yarn
RUN yarn config set network-timeout 600000 -g
COPY src ${INVENTREE_HOME}/src
COPY tasks.py ${INVENTREE_HOME}/tasks.py
RUN cd ${INVENTREE_HOME} && inv frontend-compile
RUN cd ${INVENTREE_HOME} && invoke int.frontend-compile

# InvenTree production image:
# - Copies required files from local directory
Expand Down
2 changes: 1 addition & 1 deletion contrib/container/dev-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
inventree-dev-worker:
image: inventree-dev-image
build: *build_config
command: invoke worker
command: invoke int.worker
depends_on:
- inventree-dev-server
volumes:
Expand Down
2 changes: 1 addition & 1 deletion contrib/container/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ services:
# If you wish to specify a particular InvenTree version, do so here
image: inventree/inventree:${INVENTREE_TAG:-stable}
container_name: inventree-worker
command: invoke worker
command: invoke int.worker
depends_on:
- inventree-server
env_file:
Expand Down
Loading

0 comments on commit 1b9ddf7

Please sign in to comment.