* 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
* only run if needed
* remove schema task
* Add version check
* pin version
* fix QC order
* fix assign
* refactor order
* optimize compile times
* fix assign
* onyl use install
* more fixing
* use full update cycle
* revert python change
* use api_version
* run py
* why?
* clean up output
* only check for api version diff if api_version was not touched
* add schema check again
* use seperate filter for API
* increment api_version
* Added push step
* seperate publishing step to lower complexity
* fix naming
* fix file ending
* Update qc_checks.yaml
---------
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
* Revert {% jstrans %} for .js files
- file extension is enough
* Remove custom jstrans templatetag
* Replace jstrans calls for .html files
- Add "escape=True"
* Allow for custom "escape" argument
* Update custom trans tag
- Cannot pass kwargs in the same way
- Add the "escape" attribute
* Update js translations in html files
* Create new model for storing Part pricing data
Currently this model does not "do" anything but will be used for caching pre-calculated pricing information
* Define function for accessing pricing information for a specific part
* Adds admin site support for new PartPricing model
* Specify role for PartPricing model
* Allow blank values for PartPricing model fields
* Add some TODO entries
* Update migration files to sync with latest master
* Expose API endpoint for viewing part pricing information
* Update migration file
* Improvements:
- Updated model with new fields
- Code for calculating BOM price
- Code for calculating internal price
- Code for calculating supplier price
- Updated unit testing
* Fix (and test) for API serializer
* Including min/max pricing data in part serializer
* Bump API version
* Add pricing overview information in part table
- Adds helper function for formatting currency data
- No longer pre-render "price strings" on the server
* Overhaul of BOM API
- Pricing data no longer calculated "on the fly"
- Remove expensive annotation operations
- Display cached price range information in BOM table
* Filter BOM items by "has pricing"
* Part API endpoint can be filtered by price range
* Updpated API version notes
* Improvements for price caching calculations
- Handle null price values
- Handle case where conversion rates are missing
- Allow manual update via API
* Button to manually refresh pricing
* Improve rendering of price-break table
* Update supplier part pricing table
* Updated js functions
* Adds background task to update assembly pricing whenever a part price cache is changed
* Updates for task offloading
* HTML tweaks
* Implement calculation of historical purchase cost
- take supplier part pack size into account
- improve unit tests
* Improvements for pricing tab rendering
* Refactor of pricing page
- Move javascript functions out into separate files
- Change price-break tables to use bar graphs
- Display part pricing history table and chart
- Remove server-side rendering for price history data
- Fix rendering of supplier pricing table
- Adds extra filtering options to the SupplierPriceBreak API endpoint
* Refactor BOM pricing chart / table
- Display as bar chart with min/max pricing
- Display simplified BOM table
* Update page anchors
* Improvements for BOM pricing table display
* Refactoring sales data tables
- Add extra data and filter options to sales order API endpoints
- Display sales order history table and chart
* Add extra fields to PartPricing model:
- sale_price_min
- sale_price_max
- sale_history_min
- sale_history_max
* Calculate and cache sale price data
* Update part pricing when PurchaseOrder is completed
* Update part pricing when sales order is completed
* Signals for updating part pricing cache
- Whenever an internal price break is created / edited / deleted
- Whenever a sale price break is created / edited / deleted
* Also trigger part pricing update when BomItem is created / edited / deleted
* Update part pricing whenever a supplier price break is updated
* Remove has_complete_bom_pricing method
* Export min/max pricing data in BOM file
* Fix pricing data in BOM export
- Calculate total line cost
- Use more than two digits
* Add pricing information to part export
Also some improvements to part exporting
* Allow download of part category table
* Allow export of stock location data to file
* Improved exporting of StockItem data
* Add cached variant pricing data
- New fields in part pricing model
- Display variant pricing overview in "pricing" tab
* Remove outdated "PART_SHOW_PRICE_HISTORY" setting
* Adds scheduled background task to periodically update part pricing
* Internal prices can optionally override other pricing
* Update js file checks
* Update price breaks to use 6 decimal places
* Fix for InvenTreeMoneySerializer class
- Allow 6 decimal places through the API
* Update for supplier price break table
* javascript linting fix
* Further js fixes
* Unit test updates
* Improve rendering of currency in templates
- Do not artificially limit to 2 decimal places
* Unit test fixes
* Add pricing information to part "details" tab
* Tweak for money formatting
* Enable sort-by-price in BOM table
* More unit test tweaks
* Update BOM exporting
* Fixes for background worker process
- To determine if worker is running, look for *any* successful task, not just heartbeat
- Heartbeat rate increased to 5 minute intervals
- Small adjustments to django_q settings
Ref: https://github.com/inventree/InvenTree/issues/3921
(cherry picked from commit cb26003b92)
* Force background processing of heartbeat task when server is started
- Removes the ~5 minute window in which the server "thinks" that the worker is not actually running
* Adjust strategy for preventing recursion
- Rather than looking for duplicate parts, simply increment a counter
- Add a "scheduled_for_update" flag to prevent multiple updates being scheduled
- Consolidate migration files
* Adds helper function for rendering a range of prices
* Include variant cost in calculations
* Fixes for "has_pricing" API filters
* Ensure part pricing status flags are reset when the server restarts
* Bug fix for BOM API filter
* Include BOM quantity in BOM pricing chart
* Small tweaks to pricing tab
* Prevent caching when looking up settings in background worker
- Caching across mnultiple processes causes issues
- Need to move to something like redis to solve this
- Ref: https://github.com/inventree/InvenTree/issues/3921
* Fixes for /part/pricing/ detail API endpoint
* Update pricing tab
- Consistent naming
* Unit test fixes
* Prevent pricing updates when loading test fixtures
* Fix for Part.pricing
* Updates for "check_missing_pricing"
* Change to pie chart for BOM pricing
* Unit test fix
* Updates
- Sort BOM pie chart correctly
- Simplify PartPricing.is_valid
- Pass "limit" through to check_missing_pricing
- Improved logic for update scheduling
* Add option for changing how many decimals to use when displaying pricing data
* remove old unused setting
* Consolidate settings tabs for pricing and currencies
* Fix CI after changing settings page
* Fix rendering for "Supplier Pricing"
- Take unit pricing / pack size into account
* Extra filtering / ordering options for the SupplierPriceBreak API endpoint
* Fix for purchase price history graph
- Use unit pricing (take pack size into account)
* JS fixes
- Allow 'duplicate' version numbers when running on a tagged release
- In this situation, we have just tagged the particular release, and so the tag version *does* exist
- Note that f we are running on a 'tag' (release) then by definition we cannot have a duplicate tag.
* Simplify version_check script
- Allow 'x.x.x' or 'x.x.x dev' on master branch (because we need to be able to tag releases from master)
- Remove duplicate regex checks
- Fix docstrings
* Run version check on all branches
- Will ensure we cannot merge in duplicate tags
* Add requests package
* Add requests package
* Add pre-commit to the stack
* exclude static
* Add locales to excludes
* fix style errors
* rename pipeline steps
* also wait on precommit
* make template matching simpler
* Use the same code for python setup everywhere
* use step and cache for python setup
* move regular settings up into general envs
* just use full update
* Use invoke instead of static references
* make setup actions more similar
* use python3
* refactor names to be similar
* fix runner version
* fix references
* remove incidential change
* use matrix for os
* Github can't do this right now
* ignore docstyle errors
* Add seperate docstring test
* update flake call
* do not fail on docstring
* refactor setup into workflow
* update reference
* switch to action
* resturcture
* add bash statements
* remove os from cache
* update input checks
* make code cleaner
* fix boolean
* no relative paths
* install wheel by python
* switch to install
* revert back to simple wheel
* refactor import export tests
* move setup keys back to not disturbe tests
* remove docstyle till that is fixed
* update references
* continue on error
* add docstring test
* use relativ action references
* Change step / job docstrings
* update to merge
* reformat comments 1
* fix docstrings 2
* fix docstrings 3
* fix docstrings 4
* fix docstrings 5
* fix docstrings 6
* fix docstrings 7
* fix docstrings 8
* fix docstirns 9
* fix docstrings 10
* docstring adjustments
* update the remaining docstrings
* small docstring changes
* fix function name
* update support files for docstrings
* Add missing args to docstrings
* Remove outdated function
* Add docstrings for the 'build' app
* Make API code cleaner
* add more docstrings for plugin app
* Remove dead code for plugin settings
No idea what that was even intended for
* ignore __init__ files for docstrings
* More docstrings
* Update docstrings for the 'part' directory
* Fixes for related_part functionality
* Fix removed stuff from merge 99676ee
* make more consistent
* Show statistics for docstrings
* add more docstrings
* move specific register statements to make them clearer to understant
* More docstrings for common
* and more docstrings
* and more
* simpler call
* docstrings for notifications
* docstrings for common/tests
* Add docs for common/models
* Revert "move specific register statements to make them clearer to understant"
This reverts commit ca96654622.
* use typing here
* Revert "Make API code cleaner"
This reverts commit 24fb68bd3e.
* docstring updates for the 'users' app
* Add generic Meta info to simple Meta classes
* remove unneeded unique_together statements
* More simple metas
* Remove unnecessary format specifier
* Remove extra json format specifiers
* Add docstrings for the 'plugin' app
* Docstrings for the 'label' app
* Add missing docstrings for the 'report' app
* Fix build test regression
* Fix top-level files
* docstrings for InvenTree/InvenTree
* reduce unneeded code
* add docstrings
* and more docstrings
* more docstrings
* more docstrings for stock
* more docstrings
* docstrings for order/views
* Docstrings for various files in the 'order' app
* Docstrings for order/test_api.py
* Docstrings for order/serializers.py
* Docstrings for order/admin.py
* More docstrings for the order app
* Add docstrings for the 'company' app
* Add unit tests for rebuilding the reference fields
* Prune out some more dead code
* remove more dead code
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
* Updates for docker version check script:
- Do not run on a push to stable
- Check existing versions via GitHub API
- Add stable docker image tag also
* Fix regex pattern
* Check for null regex result
* Push to stable on tagged release
* 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