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.
- PyInventory-0.19.0/.editorconfig +20 -0
- PyInventory-0.19.0/.flake8 +7 -0
- PyInventory-0.19.0/.github/workflows/tests.yml +67 -0
- PyInventory-0.19.0/.gitignore +76 -0
- PyInventory-0.19.0/.travis.yml +59 -0
- PyInventory-0.19.0/AUTHORS +14 -0
- PyInventory-0.19.0/LICENSE +674 -0
- PyInventory-0.19.0/PKG-INFO +310 -0
- PyInventory-0.19.0/PyInventory.egg-info/PKG-INFO +310 -0
- PyInventory-0.19.0/PyInventory.egg-info/SOURCES.txt +112 -0
- PyInventory-0.19.0/PyInventory.egg-info/dependency_links.txt +1 -0
- PyInventory-0.19.0/PyInventory.egg-info/entry_points.txt +2 -0
- PyInventory-0.19.0/PyInventory.egg-info/requires.txt +39 -0
- PyInventory-0.19.0/PyInventory.egg-info/top_level.txt +2 -0
- PyInventory-0.19.0/README.md +295 -0
- PyInventory-0.19.0/inventory/__init__.py +7 -0
- PyInventory-0.19.0/inventory/admin/__init__.py +3 -0
- PyInventory-0.19.0/inventory/admin/base.py +104 -0
- PyInventory-0.19.0/inventory/admin/item.py +169 -0
- PyInventory-0.19.0/inventory/admin/location.py +78 -0
- PyInventory-0.19.0/inventory/admin/memo.py +76 -0
- PyInventory-0.19.0/inventory/admin/tagulous_fix.py +45 -0
- PyInventory-0.19.0/inventory/apps.py +18 -0
- PyInventory-0.19.0/inventory/ckeditor_upload.py +15 -0
- PyInventory-0.19.0/inventory/context_processors.py +5 -0
- PyInventory-0.19.0/inventory/forms.py +36 -0
- PyInventory-0.19.0/inventory/locale/ca/LC_MESSAGES/django.mo +0 -0
- PyInventory-0.19.0/inventory/locale/ca/LC_MESSAGES/django.po +297 -0
- PyInventory-0.19.0/inventory/locale/de/LC_MESSAGES/django.mo +0 -0
- PyInventory-0.19.0/inventory/locale/de/LC_MESSAGES/django.po +294 -0
- PyInventory-0.19.0/inventory/locale/en/LC_MESSAGES/django.mo +0 -0
- PyInventory-0.19.0/inventory/locale/en/LC_MESSAGES/django.po +294 -0
- PyInventory-0.19.0/inventory/locale/es/LC_MESSAGES/django.mo +0 -0
- PyInventory-0.19.0/inventory/locale/es/LC_MESSAGES/django.po +297 -0
- PyInventory-0.19.0/inventory/management/__init__.py +0 -0
- PyInventory-0.19.0/inventory/management/commands/__init__.py +0 -0
- PyInventory-0.19.0/inventory/management/commands/seed_data.py +135 -0
- PyInventory-0.19.0/inventory/management/commands/tree.py +62 -0
- PyInventory-0.19.0/inventory/middlewares.py +21 -0
- PyInventory-0.19.0/inventory/migrations/0001_initial.py +596 -0
- PyInventory-0.19.0/inventory/migrations/0002_auto_20201017_2211.py +87 -0
- PyInventory-0.19.0/inventory/migrations/0003_auto_20201024_1830.py +23 -0
- PyInventory-0.19.0/inventory/migrations/0004_item_user_images.py +129 -0
- PyInventory-0.19.0/inventory/migrations/0005_serve_uploads_by_django_tools.py +77 -0
- PyInventory-0.19.0/inventory/migrations/0006_refactor_image_model.py +46 -0
- PyInventory-0.19.0/inventory/migrations/0007_add_file_attachment.py +128 -0
- PyInventory-0.19.0/inventory/migrations/0008_last_check_datetime.py +23 -0
- PyInventory-0.19.0/inventory/migrations/0009_add_memo.py +517 -0
- PyInventory-0.19.0/inventory/migrations/0010_version_protect_models.py +37 -0
- PyInventory-0.19.0/inventory/migrations/0011_parent_tree1.py +97 -0
- PyInventory-0.19.0/inventory/migrations/0012_parent_tree2.py +20 -0
- PyInventory-0.19.0/inventory/migrations/0013_alter_itemmodel_location.py +26 -0
- PyInventory-0.19.0/inventory/migrations/__init__.py +0 -0
- PyInventory-0.19.0/inventory/models/__init__.py +3 -0
- PyInventory-0.19.0/inventory/models/base.py +239 -0
- PyInventory-0.19.0/inventory/models/item.py +228 -0
- PyInventory-0.19.0/inventory/models/links.py +104 -0
- PyInventory-0.19.0/inventory/models/location.py +24 -0
- PyInventory-0.19.0/inventory/models/memo.py +109 -0
- PyInventory-0.19.0/inventory/parent_tree.py +71 -0
- PyInventory-0.19.0/inventory/permissions.py +60 -0
- PyInventory-0.19.0/inventory/request_dict.py +16 -0
- PyInventory-0.19.0/inventory/signals.py +15 -0
- PyInventory-0.19.0/inventory/string_utils.py +15 -0
- PyInventory-0.19.0/inventory/templates/admin/item/related_items.html +18 -0
- PyInventory-0.19.0/inventory/templates/admin/location/items.html +18 -0
- PyInventory-0.19.0/inventory/tests/__init__.py +0 -0
- PyInventory-0.19.0/inventory/tests/fixtures/__init__.py +0 -0
- PyInventory-0.19.0/inventory/tests/fixtures/users.py +11 -0
- PyInventory-0.19.0/inventory/tests/test_admin_location.py +34 -0
- PyInventory-0.19.0/inventory/tests/test_admin_location_empty_change_list_1.snapshot.html +84 -0
- PyInventory-0.19.0/inventory/tests/test_item_images.py +76 -0
- PyInventory-0.19.0/inventory/tests/test_link_model.py +72 -0
- PyInventory-0.19.0/inventory/tests/test_management_command_seed_data.py +49 -0
- PyInventory-0.19.0/inventory/tests/test_management_command_tree.py +27 -0
- PyInventory-0.19.0/inventory/tests/test_parent_tree.py +40 -0
- PyInventory-0.19.0/inventory/tests/test_parent_tree_model.py +139 -0
- PyInventory-0.19.0/inventory_project/__init__.py +12 -0
- PyInventory-0.19.0/inventory_project/__main__.py +17 -0
- PyInventory-0.19.0/inventory_project/manage.py +41 -0
- PyInventory-0.19.0/inventory_project/middlewares.py +23 -0
- PyInventory-0.19.0/inventory_project/publish.py +21 -0
- PyInventory-0.19.0/inventory_project/settings/__init__.py +0 -0
- PyInventory-0.19.0/inventory_project/settings/local.py +74 -0
- PyInventory-0.19.0/inventory_project/settings/prod.py +393 -0
- PyInventory-0.19.0/inventory_project/settings/tests.py +45 -0
- PyInventory-0.19.0/inventory_project/templates/admin/base_site.html +22 -0
- PyInventory-0.19.0/inventory_project/templates/admin/login.html +32 -0
- PyInventory-0.19.0/inventory_project/tests/__init__.py +0 -0
- PyInventory-0.19.0/inventory_project/tests/fixtures.py +40 -0
- PyInventory-0.19.0/inventory_project/tests/mocks.py +15 -0
- PyInventory-0.19.0/inventory_project/tests/playwright_utils.py +22 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin.py +15 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_item.py +240 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html +349 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_item_auto_group_items_2.snapshot.html +232 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_item_login_1.snapshot.html +40 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_1.snapshot.html +637 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_item_normal_user_create_minimal_item_2.snapshot.html +930 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_memo.py +153 -0
- PyInventory-0.19.0/inventory_project/tests/test_admin_memo_normal_user_create_minimal_item_1.snapshot.html +365 -0
- PyInventory-0.19.0/inventory_project/tests/test_command_shell_help_django4.2.3.snapshot.txt +60 -0
- PyInventory-0.19.0/inventory_project/tests/test_inventory_commands.py +26 -0
- PyInventory-0.19.0/inventory_project/tests/test_migrations.py +22 -0
- PyInventory-0.19.0/inventory_project/tests/test_models_item.py +24 -0
- PyInventory-0.19.0/inventory_project/tests/test_playwright_admin.py +157 -0
- PyInventory-0.19.0/inventory_project/tests/test_project_setup.py +102 -0
- PyInventory-0.19.0/inventory_project/urls.py +21 -0
- PyInventory-0.19.0/inventory_project/wsgi.py +9 -0
- PyInventory-0.19.0/manage.py +115 -0
- PyInventory-0.19.0/pyproject.toml +193 -0
- PyInventory-0.19.0/requirements.dev.txt +1116 -0
- PyInventory-0.19.0/requirements.txt +262 -0
- 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,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/>
|