2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00
Commit Graph

32 Commits

Author SHA1 Message Date
e7f546b8b0 Skip ready functions if not in main thread or plugins are not loaded yet 2023-06-08 21:06:14 +00:00
21ed4b2081 Fix common spelling mistakes (#4956)
* add codespell

* first fixes

* doc fixes

* fix docstrings and comments

* functional changes

* docstrings again

* and docs again

* rename args

* add ignore

* use pre-commit for filtering instead

* ups

* fix typo in filter
2023-06-04 00:04:52 +10:00
abee2cee88 Code style improvements (#4683)
* fix list comps

* mopre comp fixes

* reduce computing cost on any() calls

* add bugbear

* check for clean imports

* only allow limited relative imports

* fix notification method lookup

* fix notification method assigement

* rewrite assigment

* fix upstream changes to new style

* fix upstream change to new coding style
2023-04-28 20:49:53 +10:00
6b659ba22f Improvements for docker / gunicorn (#4031)
* Additional options for gunicorn configuration file (in docker):

Ref: https://pythonspeed.com/articles/gunicorn-in-docker/

* Catch potential error on startup

* Tweak log message for docker

* Wrap news feed update in try block
2022-12-08 23:06:02 +11:00
794e375009 Switch to pathlib (#3392)
* switch to pathlib

* more pathlib

* useconvert env to path

* fix typo

* use resolve instead of absolute

* fix gitppod

* also allow parents

* replace more os operations

* fix string replacement feature

* make sure root dirs exsist

* fix replace function

* refactor duplicate code

* reduce code

* make sure dirs exist

* fix typo

* also create parent dirs

* fix match statement

* fix statments expecting string

* return getMigrationFileNames to old behaviour

* fully resolve config file

* make sure comparison works

* use pathlib in tasks

* fix file count test

* reduce code duplication in test + add test for part

* fix test

* re-add os

* Make pathlib usage simpler
2022-07-27 10:42:34 +10:00
0c97a50e47 Docstring checks in QC checks (#3089)
* 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>
2022-06-02 01:37:39 +10:00
840ade25cd Label printing unit test (#3047)
* Adds a very simple sample plugin for label printing

* Test mixin install status and API query

* Better error reporting for label printing API

* pep fixes

* fix assertation

* remove broken assertation

* igonre for coverage

* test the base process of printing

* refactor tests

* clean up basic test

* refactor url

* fix url creation

* test printing multiples

* test all printing endpoints

* test all list options - move api tests

* test for invalid filters

* refactor

* test with no part

* these should not happen
checks are in place upstream

* fix assertation

* do not cover continue parts

* test for wrong implementation

* ignore DB not ready

* remove covage from default parts

* fix url generation

* test debug mode

* fix url assertation

* check that nothing was rendered

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2022-05-23 08:54:44 +10:00
e1d22f538d resort imports 2022-05-20 17:24:51 +02:00
63c64f9dff Update apps.py 2022-05-20 08:31:21 +02:00
c98cae8c1f switch print with assert 2022-05-20 08:19:14 +02:00
295c849447 and print 2022-05-19 00:26:59 +02:00
8dedf95a8d make 'some' request 2022-05-19 00:25:27 +02:00
99f3fc814d add warning if DB not ready 2022-05-19 00:20:48 +02:00
84871fdc79 remove tries - if we are here the AppReg should be ready or fail 2022-05-19 00:19:14 +02:00
77aeecf23a make operators simpler 2022-05-15 17:52:23 +02:00
a65d747501 add additional template 2022-05-11 03:05:40 +02:00
f88d39db66 fix coverage 2022-02-13 22:07:30 +01:00
40ea93e00a catch more explicit 2022-02-13 22:06:53 +01:00
a6621a5327 fix label tests 2022-02-13 21:15:40 +01:00
15cb1e0005 Print part labels 2021-07-08 22:54:41 +10:00
c39f705ef7 Copy default part label templates 2021-07-08 22:42:31 +10:00
f2b0717d10 removes all lines consisting only of spaces
this really bothers me for some reason - nothing technical
2021-05-06 12:11:38 +02:00
06afd4d726 Refactor "ready" state into a function 2021-04-25 10:52:31 +10:00
6e5fc43105 Prevent copying of labels and templates during data import phase 2021-04-25 10:33:11 +10:00
e787c853e5 Update logger context 2021-04-10 20:08:13 +10:00
7d54997cb8 Tweaks 2021-02-22 16:48:00 +11:00
bf51e1bfb1 Update label templates
- New ones are automatically copied across now
2021-02-22 16:39:38 +11:00
88a7b3251d Remove unused import 2021-01-14 08:14:32 +11:00
6e4cf7c092 Catch db integrity errors 2021-01-13 22:07:30 +11:00
e561b3a4fc Add StockItemLabel templates 2021-01-13 21:51:55 +11:00
663a0a6165 Create simple label templates for stocklocation labels 2021-01-11 23:45:25 +11:00
a45902bd4f Add "label" app 2020-08-16 09:28:12 +10:00