PyInventory 0.19.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. PyInventory-0.19.0/.editorconfig +20 -0
  2. PyInventory-0.19.0/.flake8 +7 -0
  3. PyInventory-0.19.0/.github/workflows/tests.yml +67 -0
  4. PyInventory-0.19.0/.gitignore +76 -0
  5. PyInventory-0.19.0/.travis.yml +59 -0
  6. PyInventory-0.19.0/AUTHORS +14 -0
  7. PyInventory-0.19.0/LICENSE +674 -0
  8. PyInventory-0.19.0/PKG-INFO +310 -0
  9. PyInventory-0.19.0/PyInventory.egg-info/PKG-INFO +310 -0
  10. PyInventory-0.19.0/PyInventory.egg-info/SOURCES.txt +112 -0
  11. PyInventory-0.19.0/PyInventory.egg-info/dependency_links.txt +1 -0
  12. PyInventory-0.19.0/PyInventory.egg-info/entry_points.txt +2 -0
  13. PyInventory-0.19.0/PyInventory.egg-info/requires.txt +39 -0
  14. PyInventory-0.19.0/PyInventory.egg-info/top_level.txt +2 -0
  15. PyInventory-0.19.0/README.md +295 -0
  16. PyInventory-0.19.0/inventory/__init__.py +7 -0
  17. PyInventory-0.19.0/inventory/admin/__init__.py +3 -0
  18. PyInventory-0.19.0/inventory/admin/base.py +104 -0
  19. PyInventory-0.19.0/inventory/admin/item.py +169 -0
  20. PyInventory-0.19.0/inventory/admin/location.py +78 -0
  21. PyInventory-0.19.0/inventory/admin/memo.py +76 -0
  22. PyInventory-0.19.0/inventory/admin/tagulous_fix.py +45 -0
  23. PyInventory-0.19.0/inventory/apps.py +18 -0
  24. PyInventory-0.19.0/inventory/ckeditor_upload.py +15 -0
  25. PyInventory-0.19.0/inventory/context_processors.py +5 -0
  26. PyInventory-0.19.0/inventory/forms.py +36 -0
  27. PyInventory-0.19.0/inventory/locale/ca/LC_MESSAGES/django.mo +0 -0
  28. PyInventory-0.19.0/inventory/locale/ca/LC_MESSAGES/django.po +297 -0
  29. PyInventory-0.19.0/inventory/locale/de/LC_MESSAGES/django.mo +0 -0
  30. PyInventory-0.19.0/inventory/locale/de/LC_MESSAGES/django.po +294 -0
  31. PyInventory-0.19.0/inventory/locale/en/LC_MESSAGES/django.mo +0 -0
  32. PyInventory-0.19.0/inventory/locale/en/LC_MESSAGES/django.po +294 -0
  33. PyInventory-0.19.0/inventory/locale/es/LC_MESSAGES/django.mo +0 -0
  34. PyInventory-0.19.0/inventory/locale/es/LC_MESSAGES/django.po +297 -0
  35. PyInventory-0.19.0/inventory/management/__init__.py +0 -0
  36. PyInventory-0.19.0/inventory/management/commands/__init__.py +0 -0
  37. PyInventory-0.19.0/inventory/management/commands/seed_data.py +135 -0
  38. PyInventory-0.19.0/inventory/management/commands/tree.py +62 -0
  39. PyInventory-0.19.0/inventory/middlewares.py +21 -0
  40. PyInventory-0.19.0/inventory/migrations/0001_initial.py +596 -0
  41. PyInventory-0.19.0/inventory/migrations/0002_auto_20201017_2211.py +87 -0
  42. PyInventory-0.19.0/inventory/migrations/0003_auto_20201024_1830.py +23 -0
  43. PyInventory-0.19.0/inventory/migrations/0004_item_user_images.py +129 -0
  44. PyInventory-0.19.0/inventory/migrations/0005_serve_uploads_by_django_tools.py +77 -0
  45. PyInventory-0.19.0/inventory/migrations/0006_refactor_image_model.py +46 -0
  46. PyInventory-0.19.0/inventory/migrations/0007_add_file_attachment.py +128 -0
  47. PyInventory-0.19.0/inventory/migrations/0008_last_check_datetime.py +23 -0
  48. PyInventory-0.19.0/inventory/migrations/0009_add_memo.py +517 -0
  49. PyInventory-0.19.0/inventory/migrations/0010_version_protect_models.py +37 -0
  50. PyInventory-0.19.0/inventory/migrations/0011_parent_tree1.py +97 -0
  51. PyInventory-0.19.0/inventory/migrations/0012_parent_tree2.py +20 -0
  52. PyInventory-0.19.0/inventory/migrations/0013_alter_itemmodel_location.py +26 -0
  53. PyInventory-0.19.0/inventory/migrations/__init__.py +0 -0
  54. PyInventory-0.19.0/inventory/models/__init__.py +3 -0
  55. PyInventory-0.19.0/inventory/models/base.py +239 -0
  56. PyInventory-0.19.0/inventory/models/item.py +228 -0
  57. PyInventory-0.19.0/inventory/models/links.py +104 -0
  58. PyInventory-0.19.0/inventory/models/location.py +24 -0
  59. PyInventory-0.19.0/inventory/models/memo.py +109 -0
  60. PyInventory-0.19.0/inventory/parent_tree.py +71 -0
  61. PyInventory-0.19.0/inventory/permissions.py +60 -0
  62. PyInventory-0.19.0/inventory/request_dict.py +16 -0
  63. PyInventory-0.19.0/inventory/signals.py +15 -0
  64. PyInventory-0.19.0/inventory/string_utils.py +15 -0
  65. PyInventory-0.19.0/inventory/templates/admin/item/related_items.html +18 -0
  66. PyInventory-0.19.0/inventory/templates/admin/location/items.html +18 -0
  67. PyInventory-0.19.0/inventory/tests/__init__.py +0 -0
  68. PyInventory-0.19.0/inventory/tests/fixtures/__init__.py +0 -0
  69. PyInventory-0.19.0/inventory/tests/fixtures/users.py +11 -0
  70. PyInventory-0.19.0/inventory/tests/test_admin_location.py +34 -0
  71. PyInventory-0.19.0/inventory/tests/test_admin_location_empty_change_list_1.snapshot.html +84 -0
  72. PyInventory-0.19.0/inventory/tests/test_item_images.py +76 -0
  73. PyInventory-0.19.0/inventory/tests/test_link_model.py +72 -0
  74. PyInventory-0.19.0/inventory/tests/test_management_command_seed_data.py +49 -0
  75. PyInventory-0.19.0/inventory/tests/test_management_command_tree.py +27 -0
  76. PyInventory-0.19.0/inventory/tests/test_parent_tree.py +40 -0
  77. PyInventory-0.19.0/inventory/tests/test_parent_tree_model.py +139 -0
  78. PyInventory-0.19.0/inventory_project/__init__.py +12 -0
  79. PyInventory-0.19.0/inventory_project/__main__.py +17 -0
  80. PyInventory-0.19.0/inventory_project/manage.py +41 -0
  81. PyInventory-0.19.0/inventory_project/middlewares.py +23 -0
  82. PyInventory-0.19.0/inventory_project/publish.py +21 -0
  83. PyInventory-0.19.0/inventory_project/settings/__init__.py +0 -0
  84. PyInventory-0.19.0/inventory_project/settings/local.py +74 -0
  85. PyInventory-0.19.0/inventory_project/settings/prod.py +393 -0
  86. PyInventory-0.19.0/inventory_project/settings/tests.py +45 -0
  87. PyInventory-0.19.0/inventory_project/templates/admin/base_site.html +22 -0
  88. PyInventory-0.19.0/inventory_project/templates/admin/login.html +32 -0
  89. PyInventory-0.19.0/inventory_project/tests/__init__.py +0 -0
  90. PyInventory-0.19.0/inventory_project/tests/fixtures.py +40 -0
  91. PyInventory-0.19.0/inventory_project/tests/mocks.py +15 -0
  92. PyInventory-0.19.0/inventory_project/tests/playwright_utils.py +22 -0
  93. PyInventory-0.19.0/inventory_project/tests/test_admin.py +15 -0
  94. PyInventory-0.19.0/inventory_project/tests/test_admin_item.py +240 -0
  95. PyInventory-0.19.0/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html +349 -0
  96. PyInventory-0.19.0/inventory_project/tests/test_admin_item_auto_group_items_2.snapshot.html +232 -0
  97. PyInventory-0.19.0/inventory_project/tests/test_admin_item_login_1.snapshot.html +40 -0
  98. PyInventory-0.19.0/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_1.snapshot.html +637 -0
  99. PyInventory-0.19.0/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_2.snapshot.html +930 -0
  100. PyInventory-0.19.0/inventory_project/tests/test_admin_memo.py +153 -0
  101. PyInventory-0.19.0/inventory_project/tests/test_admin_memo_normal_user_create_minimal_item_1.snapshot.html +365 -0
  102. PyInventory-0.19.0/inventory_project/tests/test_command_shell_help_django4.2.3.snapshot.txt +60 -0
  103. PyInventory-0.19.0/inventory_project/tests/test_inventory_commands.py +26 -0
  104. PyInventory-0.19.0/inventory_project/tests/test_migrations.py +22 -0
  105. PyInventory-0.19.0/inventory_project/tests/test_models_item.py +24 -0
  106. PyInventory-0.19.0/inventory_project/tests/test_playwright_admin.py +157 -0
  107. PyInventory-0.19.0/inventory_project/tests/test_project_setup.py +102 -0
  108. PyInventory-0.19.0/inventory_project/urls.py +21 -0
  109. PyInventory-0.19.0/inventory_project/wsgi.py +9 -0
  110. PyInventory-0.19.0/manage.py +115 -0
  111. PyInventory-0.19.0/pyproject.toml +193 -0
  112. PyInventory-0.19.0/requirements.dev.txt +1116 -0
  113. PyInventory-0.19.0/requirements.txt +262 -0
  114. PyInventory-0.19.0/setup.cfg +4 -0
@@ -0,0 +1,20 @@
1
+ # see https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ indent_style = space
6
+ indent_size = 4
7
+ end_of_line = lf
8
+ charset = utf-8
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
11
+
12
+ [*.py]
13
+ max_line_length = 119
14
+
15
+ [{Makefile,**.mk}]
16
+ indent_style = tab
17
+ insert_final_newline = false
18
+
19
+ [*.yml]
20
+ indent_size = 2
@@ -0,0 +1,7 @@
1
+ #
2
+ # Move to pyproject.toml after: https://github.com/PyCQA/flake8/issues/234
3
+ #
4
+ [flake8]
5
+ exclude = .*, dist, htmlcov, */migrations/*, volumes
6
+ #ignore = E402
7
+ max-line-length = 119
@@ -0,0 +1,67 @@
1
+
2
+
3
+ name: tests
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+ pull_request:
10
+ schedule:
11
+ - cron: '0 8 * * *'
12
+
13
+ jobs:
14
+ test:
15
+ name: 'Python ${{ matrix.python-version }} Django ${{ matrix.django-version }}'
16
+ runs-on: ubuntu-latest
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ python-version: ["3.11", "3.10", "3.9"]
21
+ env:
22
+ PYTHONUNBUFFERED: 1
23
+ PYTHONWARNINGS: always
24
+ steps:
25
+ - name: Checkout
26
+ run: |
27
+ echo $GITHUB_REF $GITHUB_SHA
28
+ git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
29
+ git fetch origin $GITHUB_SHA:temporary-ci-branch
30
+ git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
31
+
32
+ - name: 'Set up Python ${{ matrix.python-version }}'
33
+ uses: actions/setup-python@v4
34
+ # https://github.com/marketplace/actions/setup-python
35
+ with:
36
+ python-version: '${{ matrix.python-version }}'
37
+ cache: 'pip' # caching pip dependencies
38
+ cache-dependency-path: '**/requirements.*.txt'
39
+
40
+ - name: 'Bootstrap'
41
+ # The first manage.py call will create the .venv
42
+ run: |
43
+ ./manage.py version
44
+
45
+ - name: 'Install Playwright browsers'
46
+ run: |
47
+ .venv/bin/playwright install
48
+
49
+ - name: 'Display all Django commands'
50
+ run: |
51
+ ./manage.py --help
52
+
53
+ # FIXME:
54
+ #- name: 'Safety'
55
+ # run: |
56
+ # ./manage.py safety
57
+
58
+ - name: 'Python ${{ matrix.python-version }}'
59
+ run: |
60
+ ./manage.py tox -e $(echo py${{ matrix.python-version }} | tr -d .)
61
+
62
+ - name: 'Upload coverage report'
63
+ uses: codecov/codecov-action@v3
64
+ # https://github.com/marketplace/actions/codecov
65
+ with:
66
+ fail_ci_if_error: false
67
+ verbose: true
@@ -0,0 +1,76 @@
1
+ .*
2
+ *.egg-info
3
+ __pycache__
4
+ /dist/
5
+ /coverage.json
6
+ /coverage.xml
7
+
8
+ !.github
9
+ !.editorconfig
10
+ !.flake8
11
+ !.gitignore
12
+
13
+ # for django-dbbackup
14
+ /backups/
15
+ !/backups/.gitkeep
16
+
17
+ # from test projects:
18
+ **/static/*
19
+ **/media/*
20
+ *.sqlite3
21
+
22
+
23
+ # Django
24
+ secret.txt
25
+
26
+ # Coverage HTML Report files:
27
+ htmlcov
28
+
29
+ # Byte-compiled / optimized / DLL files
30
+ __pycache__/
31
+ *.py[cod]
32
+ *$py.class
33
+
34
+ # C extensions
35
+ *.so
36
+
37
+ # Distribution / packaging
38
+ .tox
39
+ .Python
40
+ env/
41
+ build/
42
+ develop-eggs/
43
+ dist/
44
+ downloads/
45
+ eggs/
46
+ lib/
47
+ lib64/
48
+ parts/
49
+ sdist/
50
+ var/
51
+ *.egg-info/
52
+ .installed.cfg
53
+ *.egg
54
+
55
+ # Installer logs
56
+ pip-log.txt
57
+ pip-delete-this-directory.txt
58
+
59
+ # Unit test / coverage reports
60
+ db.sqlite3
61
+ coverage_html/
62
+ coverage.xml
63
+ *,cover
64
+
65
+ # Translations
66
+ *.pot
67
+
68
+ # Django stuff:
69
+ *.log
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
@@ -0,0 +1,59 @@
1
+ # Config file for automatic testing at travis-ci.org
2
+
3
+ sudo: required
4
+ dist: xenial
5
+ language: python
6
+ cache: pip
7
+
8
+ addons:
9
+ firefox: latest
10
+ chrome: stable
11
+
12
+ matrix:
13
+ fast_finish: true
14
+ include:
15
+ - os: linux
16
+ python: 3.6
17
+ env: TOXENV=py36
18
+ - os: linux
19
+ python: 3.7
20
+ env: TOXENV=py37
21
+ - os: linux
22
+ python: 3.8
23
+ env: TOXENV=py38
24
+ # TODO: SQlite errors, e.g.: https://travis-ci.org/github/jedie/PyInventory/jobs/663624080
25
+ #- os: linux
26
+ # python: pypy3
27
+ # TODO:
28
+ #- os: osx
29
+ # language: generic
30
+
31
+ before_install:
32
+ #
33
+ # install Chromium Browser + Selenium WebDriver for it:
34
+ - sudo apt-get update
35
+ - sudo apt-get install chromium-browser chromium-chromedriver
36
+ #
37
+ # install Selenium Firefox WebDriver 'geckodriver':
38
+ - wget https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz -O geckodriver.tar.gz
39
+ - mkdir $PWD/geckodriver
40
+ - tar -xvf geckodriver.tar.gz -C $PWD/geckodriver
41
+ - ls -la $PWD/geckodriver
42
+ - export PATH=$PATH:$PWD/geckodriver
43
+ - geckodriver --version
44
+
45
+ install:
46
+ - pip3 install poetry
47
+ - make install
48
+ - poetry run pip freeze
49
+ - make tox-listenvs
50
+
51
+ script:
52
+ - if [ "$TOXENV" == "" ]; then make pytest; fi
53
+ - if [ "$TOXENV" != "" ]; then make tox; fi
54
+ - if [ "$TOXENV" != "" ]; then make lint; fi
55
+
56
+ after_success:
57
+ - coveralls
58
+ # https://github.com/codecov/codecov-bash
59
+ - bash <(curl -s https://codecov.io/bash)
@@ -0,0 +1,14 @@
1
+
2
+ PRIMARY AUTHORS are and/or have been (alphabetic order):
3
+
4
+ * Diemer, Jens
5
+ Main Developer since the first code line.
6
+ github.com profile: <https://github.com/jedie/>
7
+ openhub.net profile: <https://www.openhub.net/accounts/4179/>
8
+ Homepage: <http://www.jensdiemer.de/>
9
+
10
+
11
+ CONTRIBUTORS are and/or have been (Chronologically sorted from new to old):
12
+ * López, Jaume
13
+ Translator to Spanish and Catalan
14
+ github.com profile: <https://github.com/RetroAND/>