Commit Graph

276 Commits

Author SHA1 Message Date
Oliver
5870b21a91
Simplify version_check script (#3152)
* 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
2022-06-07 08:57:51 +10:00
Matthias Mair
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
Oliver
8c9f676ffb
Fix formatting of 'build-args' parameter for docker build (#3105)
* Fix formatting of 'build-args' parameter for docker build

* Remove quotes
2022-05-31 14:26:35 +10:00
Oliver
ccefefdc7f
Version checker (#3102)
* 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
2022-05-31 09:50:38 +10:00
Oliver
8a2cfa04d1
Adds release.yml file for auto-generating release notes (#3099)
* Adds release.yml file for auto-generating release notes

* Add more tags
2022-05-30 23:57:15 +10:00
Oliver
deacf207ff
Docker Build Fixes (#3093)
* Docker: Require libffi-dev

* set push to true

* debug

* Check GITHUB_BASE_REF also
2022-05-29 13:47:29 +10:00
Oliver
b9fd263899
Docker improvements (#3042)
* 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
2022-05-29 09:40:37 +10:00
Matthias Mair
4d8836378b
CI updates (#3087)
* 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

* use relativ action references

* Change step / job docstrings
2022-05-28 10:38:12 +10:00
Matthias Mair
dcffd9a3cf
Add codeowners (#3079)
* Add codeowners

* use direct user handles
2022-05-27 11:04:40 +10:00
Matthias Mair
93b6934127 fix trailing 2022-05-20 13:20:55 +02:00
Matthias Mair
e1abdddc4a
Merge branch 'inventree:master' into not-working-tests 2022-05-20 00:28:35 +02:00
Oliver
af88f6ec97 python CI: wait for server before continuing 2022-05-19 11:55:53 +10:00
Matthias
b2f5c60877
update pip before running - reduce warnings 2022-05-19 01:46:04 +02:00
Matthias
38f8e9c9ab
remove duplicate install 2022-05-19 01:13:47 +02:00
Matthias
4d4a164923
do full update 2022-05-19 01:02:24 +02:00
Matthias
16dad60ea5
collect static right before starting 2022-05-18 23:31:18 +02:00
Oliver
2fde482eab Simplify steps 2022-05-18 15:39:58 +10:00
Oliver
3e05c5fde1 Bring docker containers down 2022-05-18 15:12:19 +10:00
Oliver
ea3133be1d Combine docker-build and docker-test CI steps
- We are building anyway, may as well test
2022-05-18 15:11:37 +10:00
Oliver
f53c8865ad Only run docker build on push 2022-05-18 14:14:40 +10:00
Oliver Walters
dc2351748c Merge remote-tracking branch 'inventree/master' into webp-support 2022-05-17 18:48:19 +10:00
Matthias Mair
65d0d7906c add gettext 2022-05-16 19:10:48 +02:00
Matthias Mair
5f2c21aa62 run full install 2022-05-16 18:50:16 +02:00
Oliver
5bc748316d
Merge pull request #2995 from matmair/fix-actions
Small action fixes
2022-05-16 00:52:01 +10:00
Matthias Mair
e83f9ead0a
update tags to new names 2022-05-15 15:58:20 +02:00
Matthias Mair
55b909a1de
fix new lines 2022-05-15 15:56:08 +02:00
Matthias Mair
76266ab98a
use python 3.9 here too 2022-05-15 15:52:55 +02:00
Matthias Mair
8366c6a2a3
bump python version 2022-05-15 15:49:41 +02:00
Oliver Walters
47269a88d2 Ensure unit tests are run within a docker context as part of CI builds 2022-05-15 23:37:01 +10:00
Oliver
21d2b54afe Fix CI step 2022-05-12 11:00:43 +10:00
Oliver
aa9ee15fb4 Fix CI pipeline for python checks
- Recently updated the python binding test framework
2022-05-12 10:52:53 +10:00
Oliver
a6815c8334 if != on 2022-05-11 14:16:39 +10:00
Oliver
37ce9f351d postgresql and mysql checks only run on push
- sqlite and coverage still runs on pull_request
- should speed up CI checks / reduce redundant CI server load
2022-05-11 14:15:44 +10:00
Oliver Walters
36da363188 Force push translation files 2022-05-02 09:37:33 +10:00
Oliver Walters
8635cb8267 Fix CI 2022-05-01 23:21:49 +10:00
Oliver Walters
9e469a949f Push from latest master to l10 branch 2022-05-01 22:43:25 +10:00
Matthias Mair
b1019abb45
adding permissions to hook
see https://github.com/inventree/InvenTree/pull/2895#issuecomment-1112733654
2022-04-30 20:01:30 +02:00
Oliver
91560dcc6d Fix build-args in workflows
(cherry picked from commit a4aa4201f02b613ab23fdd3fe45db2c129a2baca)
2022-02-21 13:27:26 +11:00
Oliver
f068ee6c2e
Update FUNDING.yml
Add ko_fi username
2022-02-17 08:15:24 +11:00
Oliver
e7aff93667
Create FUNDING.yml
Add sponsor file
2022-02-16 23:56:20 +11:00
Oliver
e2bfa17522 Enable plugin support for github ci pipelines 2022-01-11 14:15:51 +11:00
Matthias Mair
8799985f75
Merge branch 'inventree:master' into stale 2022-01-07 00:08:28 +01:00
Matthias Mair
a02ae8c20d
add welcome messages 2022-01-05 23:41:04 +01:00
Matthias Mair
9b1e944509
ignore everything that got a milestone
this helps keeping false positives lower
2022-01-04 00:04:05 +01:00
Matthias Mair
993b368d3d
new stale check 2022-01-03 23:59:16 +01:00
Oliver
ecb9643cc1 Use sqlite config for docker build test 2021-12-21 16:14:04 +11:00
Oliver
4805540b4c try simplifying 2021-12-14 22:52:14 +11:00
Oliver
070d01b2f4 Try with newer python 2021-12-14 22:48:44 +11:00
Oliver
a9d09c7d29 Fix mysql installs for github actions 2021-12-14 19:56:34 +11:00
Oliver
967584b25a Specify mysql version 2021-12-14 17:35:36 +11:00
Oliver
8d4f8204ca call apt-get update in workflow scripts 2021-12-13 23:48:30 +11:00
Matthias
d9c6e6c4f4
remove version nb checks 2021-12-04 16:45:59 +01:00
Matthias
3da5767e02
move version checks out into own check 2021-12-04 01:22:10 +01:00
Matthias Mair
6bc3e3ccbb
Workflow remaster (#2416)
* Workflow remaster (#28)

* set default ref

* only trigger version number if pullrequest

* try skipping just a step

* Workflow remaster (#29)

* set default ref

* only trigger version number if pullrequest

* always run style

* try skipping just a step

* try adding a step so everything continues

* Workflow remaster (#30)

* set default ref

* only trigger version number if pullrequest

* always run style

* try skipping just a step

* try adding a step so everything continues

* maybe this does not fail them

* skip ahead

* do not skip the whole job, just the steps
2021-12-04 11:01:18 +11:00
Matthias
b871115484
always run style 2021-12-03 20:24:01 +01:00
Matthias
c1052b6c1d
only trigger version number if pullrequest 2021-12-03 20:14:48 +01:00
Matthias
63f6776e83
set default ref 2021-12-03 09:00:32 +01:00
Matthias
e31cf45cbc
fix db name 2021-12-03 01:27:33 +01:00
Matthias
7e3be4a496
rename 2021-12-03 01:18:31 +01:00
Matthias
f51a3557ee
cache python 2021-12-03 01:08:49 +01:00
Matthias
a05777029d
cache npm 2021-12-03 01:06:48 +01:00
Matthias
b6c6ac75e5
just set it statically 2021-12-03 01:05:14 +01:00
Matthias
e4a0b09796
simple seems to be better 2021-12-03 01:03:32 +01:00
Matthias
045932dfe1
try using outputs 2021-12-03 00:53:03 +01:00
Matthias
5891245c45
replace pwd 2021-12-03 00:47:10 +01:00
Matthias
d50007975c
replace db_users 2021-12-03 00:45:52 +01:00
Matthias
066f776c40
remove with from coveralls 2021-12-03 00:39:09 +01:00
Matthias
ea6a4979ae
reseet back tu usage without envs 2021-12-03 00:34:35 +01:00
Matthias
c7b5ec28ab
fix coveralls 2021-12-03 00:28:53 +01:00
Matthias
80b575bd3a
fix envs? 2021-12-03 00:24:27 +01:00
Matthias
1c388df3d2
set params paralell 2021-12-03 00:17:43 +01:00
Matthias
e41da09b31
set ports 2021-12-03 00:12:37 +01:00
Matthias
4ad7712b62
change db user name 2021-12-03 00:10:09 +01:00
Matthias
ce4a01255a
try a pre job to set params 2021-12-03 00:04:00 +01:00
Matthias
5de4a0cfaf
maybe declaring variables helps 2021-12-02 23:42:21 +01:00
Matthias
440f5e560e
qucik fix 2021-12-02 14:19:20 +01:00
Matthias
6355d2e8c2
maybe this way? 2021-12-02 14:17:15 +01:00
Matthias
0f4991db0a
fix port envs? 2021-12-02 14:15:13 +01:00
Matthias
b99d5a28e9
fix? postgres user 2021-12-02 14:10:34 +01:00
Matthias
bab7b766b5
Revert "seems like it does not like comments between envs"
This reverts commit e7087aafda.
2021-12-02 14:05:55 +01:00
Matthias
e7087aafda
seems like it does not like comments between envs 2021-12-02 14:05:09 +01:00
Matthias
281ea37bd6
maybe fix coveralls connection? 2021-12-02 14:03:40 +01:00
Matthias
dd9eed3da6
needed for import / export checks 2021-12-02 13:54:40 +01:00
Matthias
961c161b3c
rename to better reflect function 2021-12-02 13:54:24 +01:00
Matthias
b0f14d23b2
use envs everywhere 2021-12-02 13:45:20 +01:00
Matthias
340c7574e4
optimise envs 2021-12-02 13:45:09 +01:00
Matthias
cc5ba37850
use env for db name 2021-12-02 13:39:12 +01:00
Matthias
840c1c12c5
use env for version 2021-12-02 13:37:53 +01:00
Matthias
cc5a03bb58
merge mysql 2021-12-02 13:37:26 +01:00
Matthias
a071d61ba7
use env for version 2021-12-02 13:34:55 +01:00
Matthias
ee60cbf603
merge in postgres 2021-12-02 13:34:01 +01:00
Matthias
f7b8cf2bb1
refactor envs 2021-12-02 13:29:01 +01:00
Matthias
0ce9e55933
add envs 2021-12-02 13:25:50 +01:00
Matthias
bb22f7565b
merge in sqlite / coverage 2021-12-02 13:25:01 +01:00
Matthias
3dbe7f8f29
more env variables 2021-12-02 13:17:45 +01:00
Matthias
21aabda8cd
merge in python bindings check 2021-12-02 13:14:38 +01:00
Matthias
a9aa55d76f
refactor envs 2021-12-02 13:10:40 +01:00
Matthias
b8a76429d1
only run if successfull 2021-12-02 13:09:30 +01:00
Matthias
3e021f35ba
only run if sucessfull 2021-12-02 13:08:47 +01:00
Matthias
8f8a1bbdeb
refactor env 2021-12-02 13:08:19 +01:00