* Add basic task for generating apidocs
* Fix SPECTACTULAR_SETTINGS
- Some provided options were not correct
* Update .gitignore
* Fix for duplicated API path
- `/api/plugins/activate` routed to PluginActivate view
- Must be associated with a specific plugin ID
* By default, fail if warnings are raised
* Use GenericAPIView for GetAuthToken
* Use GenericAPIView for RolesDetail endpoint
* Refactor more endpoints to use GenericApiView
* More API cleanup
* Add extra type hints for exposed methods
* Update RoleDetails endpoint
- Specify serializer
- Use RetrieveAPI class type
* More type hints
* Export API docs as part of CI
* add more api views docs
* even more docs
* extend tests to api-version
* simplify serializer
* and more docs
* fix serializer
* added more API docs
* clean diff
* Added APISearch base
* do not assume you know the user
he might be anonymously creating the schema ;-)
* set empty serializer where no input is needed
* Use dummy model for schema generation
* fix OpenAPI docs section
* Update .github/workflows/qc_checks.yaml
Co-authored-by: Matthias Mair <code@mjmair.com>
* REmove duplicate commands
* Ignore warnings in CI
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Move locales definition into separate file
- Cleanup settings.py a bit
* Update docstring
* Expose 'default_locale' to info API endpoint
* Validate settings.LANGUAGE_CODE
* Fix bug in BuildDetail page
* Use selected language when making API queries
* Translate more strings
* Tweak variable name
* Update locale config
* Remove duplicate code
* Remove compiled messages.ts translation files
* Fixes for LanguageContext.tsx
* Update messages.d.ts for sr locale
* Ensure compiled files are served by django runserver
* Amend changes to STATICFILES_DIRS
* Cleanup prerender.py
* Refetch status codes when locale is changed
* Fix log msg
* Clear out old static files
* Add API endpoint for background task overview
* Cleanup other pending heartbeat tasks
* Adds API endpoint for queued tasks
* Adds API endpoint for scheduled tasks
* Add API endpoint for failed tasks
* Update API version info
* Add table for displaying pending tasks
* Add failed tasks table
* Use accordion
* Annotate extra data to scheduled tasks serializer
* Extend API functionality
* Update tasks.py
- Allow skipping of static file step in "invoke update"
- Allows for quicker updates in dev mode
* Display task result error for failed tasks
* Allow delete of failed tasks
* Remove old debug message
* Adds ability to delete pending tasks
* Update table columns
* Fix unused imports
* Prevent multiple heartbeat functions from being added to the queue at startup
* Add unit tests for API
* Add 'existing_image' field to part API serializer
* Ensure that the specified directory exists
* Fix serializer
- Use CharField instead of FilePathField
- Custom validation
- Save part with existing image
* Add unit test for new feature
* Bump API version
* Add skeleton for builtin label printing plugin
* Force selection of plugin when printing labels
* Enhance LabelPrintingMixin class
- Add render_to_pdf method
- Add render_to_html method
* Enhance plugin mixin
- Add class attribute to select blocking or non-blocking printing
- Add render_to_png method
- Add default method for printing multiple labels
- Add method for offloding print job
* Simplify print_label background function
- All arguments now handled by specific plugin
* Simplify label printing API
- Simply pass data to the particular plugin
- Check result type
- Return result
* Updated sample plugin
* Working on client side code
* Cleanup
* Update sample plugin
* Add new model type
- LabelOutput model
- Stores generated label file to the database
- Makes available for download
* Update label printing plugin mixin
* Add background task to remove any old label outputs
* Open file if response contains filename
* Remove "default printer" option which does not specify a plugin
* Delete old labels after 5 days
* Remove debug statements
* Update API version
* Changed default behaviour to background printing
* Update label plugin mixin docs
* Provide default printer if none provided (legacy)
* Update unit test
* unit test updates
* Further fixes for unit tests
* unit test updates
* fix .gitignore and spelling issues
* Fix setting get not cached correctly
* Add model to settings key type
* Fix plugin setting slug url
* Fix typo
* Fix resetting of related setting field
* Improved model comment
* Pass "Part" instance to plugins when calling validate_serial_number
* Pass part instance through when validating IPN
* Improve custom part name validation
- Pass the Part instance through to the plugins
- Validation is performed at the model instance level
- Updates to sample plugin code
* Pass StockItem through when validating batch code
* Pass Part instance through when calling validate_serial_number
* Bug fix
* Update unit tests
* Unit test fixes
* Fixes for unit tests
* More unit test fixes
* More unit tests
* Furrther unit test fixes
* Simplify custom batch code validation
* Further improvements to unit tests
* Further unit test
* Add unit test for deleting part which has pricing information
* Test delete of part without pricing
* Deal with post_delete errors
1. Deleting a Part deleted related objects (e.g. InternalPriceBreak)
2. post_delete signal is called for InternalPriceBreak
3. Subsequent updates to Part / PartPricing throw error
* Add unit test for deleting a Part via the API
- Add InternalPriceBreak so the previous error condition is checked
* Fix for unit test
* More unit test fixes
(cherry picked from commit fa346257f5)
* Ensure unique part names for unit testing
* Further unit test fixes
* Added devcontainer configuration files
* Added launch.json and improved devcontainer
* Added tasks.json
* fix: lint
* fix: lint
* Applied suggestions from codereview
* Added more system dependencies and preserve history
* devcontainer updates
- Add extra environment variables for InvenTree config
- Move venv into dev directory (cleaner structure)
- Ensure base package requirements get installed
- Handle write-permission error for compiling translations
- Install test data inside dev directory
* Auto create plugin dir and added gh cli
* Refactored postCreateCommand into own file
* Applied suggestions from codereview
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
* Simplify settings.py / config.py
- get_setting function has been streamlined
- move some functions into config.py
* Spelling fix: IGNORRED is IGNORED
* Ensure yaml is installed as part of docker image
- invoke path is still mucking us around
* Fix broken migration
* Copy media files from demo dataset when installing test data
* Cleanup settings.py
* Fix for configuration file traversal
* Line fix
* Update quickstart guide for docker
* Allow plugin file and plugin dir to be specified in configuration file
* Cleanup config template file
* Allow secret_key information to be provided in configuration file
* Adjust root paths for CI tests
* resolve paths
* Revert paths for CI step
* remove dead code
* Revert configuration variables to old names
- Prevent breaking changes
* Simplify secret key generation
* Fix default timeout for background worker process
* Revert change for customization options
* Simplification of development docker-compose file
- Rename .env file
- Remove requirement for variable interpolation within the docker-compose file itself
* Add debug flag to CI test
* Additional quick-start docs (for docker)
* docker-compose update
- Introspection did not work quite as expected
- Set project name inside docker-compose file
* Fixes for "setup_test" task
- Check if directory exists before first deleting it
- Parameterize the "path" variable
- Add option to ignore update step
* Add demo data dir to .gitignore
* Remove debug call
* Update CONTRIBUTING.md
* Simplified dockerfile
- Changed from alpine to python:slim
- Removed some database libs (because we *connect* to a db, not host it)
* - Add gettext as required package
- Only create inventree user as part of production build (leave admin access for dev build)
* Tweaks for tasks.py
* Fix user permissions (drop to inventree user)
* Drop to the 'inventree' user level as part of init.sh
- As we have mounted volumes at 'run time' we need to ensure that the inventree user has correct permissions!
- Ref: https://stackoverflow.com/questions/39397548/how-to-give-non-root-user-in-docker-container-access-to-a-volume-mounted-on-the
* Adjust user setup
- Only drop to non-root user as part of "production" build
- Mounted external volumes make it tricky when in the dev build
- Might want to revisit this later on
* More dockerfile changes
- reduce required system packages
-
* Add new docker github workflow
* Print some more debug
* GITHUB_BASE_REF
* Add gnupg to base requirements
* Improve debug output during testing
* Refactoring updates for label printing API
- Update weasyprint version to 55.0
- Generate labels as pdf files
- Provide filename to label printing plugin
- Additional unit testing
- Improve extraction of some hidden debug data during TESTING
- Fix a spelling mistake (notifaction -> notification)
* Working on github action
* More testing
* Add requirement for pdf2image
* Fix label printing plugin and update unit testing
* Add required packages for CI
* Move docker files to the top level directory
- This allows us to build the production image directly from soure
- Don't need to re-download the source code from github
- Note: The docker install guide will need to be updated!
* Fix for docker ci file
* Print GIT SHA
* Bake git information into the production image
* Add some exta docstrings to dockerfile
* Simplify version check script
* Extract git commit info
* Extract docker tag from check_version.py
* Newline
* More work on the docker workflow
* Dockerfile fixes
- Directory / path issues
* Dockerfile fixes
- Directory / path issues
* Ignore certain steps on a pull request
* Add poppler-utils to CI
* Consolidate version check into existing CI file
* Don't run docker workflow on pull request
* Pass docker image tag through to the build
Also check .j2k files
* Add supervisord.conf example file back in
* Remove --no-cache-dir option from pip install
- Previous migration needed some tweaking to get it to run... because.. why?
- It seems to pass when running manage.py migrate but fails when running manage.py test
- Stumped on this one