kopia lustrzana https://github.com/jedie/PyInventory
Apply manageprojects updates
rodzic
140edd20b0
commit
ae0de97e69
|
@ -1,4 +1,4 @@
|
||||||
# see http://editorconfig.org
|
# see https://editorconfig.org
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
|
@ -9,14 +9,12 @@ charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.{bat,cmd,ps1}]
|
|
||||||
end_of_line = crlf
|
|
||||||
|
|
||||||
[*.{html,css,js}]
|
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
[*.py]
|
[*.py]
|
||||||
max_line_length = 100
|
max_line_length = 119
|
||||||
|
|
||||||
|
[{Makefile,**.mk}]
|
||||||
|
indent_style = tab
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
[*.yml]
|
[*.yml]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
@ -14,33 +14,31 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 2
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest] # TODO: macOS-latest, windows-latest
|
|
||||||
python-version: ["3.11", "3.10", "3.9"]
|
python-version: ["3.11", "3.10", "3.9"]
|
||||||
env:
|
env:
|
||||||
PYTHONUNBUFFERED: 1
|
PYTHONUNBUFFERED: 1
|
||||||
PYTHONWARNINGS: always
|
PYTHONWARNINGS: always
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: 'fetch main'
|
|
||||||
run: |
|
run: |
|
||||||
git fetch origin main
|
echo $GITHUB_REF $GITHUB_SHA
|
||||||
|
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
|
||||||
|
git fetch origin $GITHUB_SHA:temporary-ci-branch
|
||||||
|
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
|
||||||
|
|
||||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
|
# https://github.com/marketplace/actions/setup-python
|
||||||
with:
|
with:
|
||||||
python-version: '${{ matrix.python-version }}'
|
python-version: '${{ matrix.python-version }}'
|
||||||
|
cache: 'pip' # caching pip dependencies
|
||||||
|
cache-dependency-path: '**/poetry.lock'
|
||||||
|
|
||||||
- name: 'Bootstrap'
|
- name: 'Bootstrap'
|
||||||
run: |
|
run: |
|
||||||
python3 devshell.py quit
|
python3 devshell.py quit
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/
|
|
||||||
key: dot-cache-files
|
|
||||||
|
|
||||||
- name: 'Install Browsers for Playwright tests'
|
- name: 'Install Browsers for Playwright tests'
|
||||||
run: |
|
run: |
|
||||||
|
@ -55,7 +53,8 @@ jobs:
|
||||||
python3 devshell.py pytest -vv
|
python3 devshell.py pytest -vv
|
||||||
|
|
||||||
- name: 'Upload coverage report'
|
- name: 'Upload coverage report'
|
||||||
uses: codecov/codecov-action@v2
|
uses: codecov/codecov-action@v3
|
||||||
|
# https://github.com/marketplace/actions/codecov
|
||||||
with:
|
with:
|
||||||
fail_ci_if_error: false
|
fail_ci_if_error: false
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
.*
|
.*
|
||||||
|
*.egg-info
|
||||||
__pycache__
|
__pycache__
|
||||||
coverage.json
|
/dist/
|
||||||
|
/coverage.json
|
||||||
|
/coverage.xml
|
||||||
|
|
||||||
!.github
|
!.github
|
||||||
!.editorconfig
|
!.editorconfig
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
Web based management to catalog things including state and location etc. using Python/Django.
|
Web based management to catalog things including state and location etc. using Python/Django.
|
||||||
Store information in WYSIWYG-HTML-Editor field and tag them and add Files, Images and Links to them.
|
Store information in WYSIWYG-HTML-Editor field and tag them and add Files, Images and Links to them.
|
||||||
|
|
||||||
[![Test](https://github.com/jedie/PyInventory/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jedie/PyInventory/actions/workflows/ci.yml)
|
[![tests](https://github.com/jedie/PyInventory/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jedie/PyInventory/actions/workflows/tests.yml)
|
||||||
[![Coverage Status on codecov.io](https://codecov.io/gh/jedie/PyInventory/branch/main/graph/badge.svg)](https://codecov.io/gh/jedie/PyInventory)
|
[![codecov](https://codecov.io/github/jedie/PyInventory/branch/main/graph/badge.svg)](https://app.codecov.io/github/jedie/PyInventory)
|
||||||
[![PyInventory @ PyPi](https://img.shields.io/pypi/v/PyInventory?label=PyInventory%20%40%20PyPi)](https://pypi.org/project/PyInventory/)
|
[![PyInventory @ PyPi](https://img.shields.io/pypi/v/PyInventory?label=PyInventory%20%40%20PyPi)](https://pypi.org/project/PyInventory/)
|
||||||
[![Python Versions](https://img.shields.io/pypi/pyversions/PyInventory)](https://github.com/jedie/PyInventory/blob/main/pyproject.toml)
|
[![Python Versions](https://img.shields.io/pypi/pyversions/PyInventory)](https://github.com/jedie/PyInventory/blob/main/pyproject.toml)
|
||||||
[![License GPL](https://img.shields.io/pypi/l/PyInventory)](https://github.com/jedie/PyInventory/blob/main/LICENSE)
|
[![License GPL-3.0-or-later](https://img.shields.io/pypi/l/PyInventory)](https://github.com/jedie/PyInventory/blob/main/LICENSE)
|
||||||
|
|
||||||
[![Install PyInventory with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pyinventory)
|
[![Install PyInventory with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pyinventory)
|
||||||
|
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -80,7 +80,6 @@ pytest-randomly = "*"
|
||||||
pytest-cov = "*"
|
pytest-cov = "*"
|
||||||
pytest-django = "*"
|
pytest-django = "*"
|
||||||
pytest-playwright = "*" # https://playwright.dev/python/docs/test-runners
|
pytest-playwright = "*" # https://playwright.dev/python/docs/test-runners
|
||||||
flynt = "*"
|
|
||||||
pyupgrade = "*"
|
pyupgrade = "*"
|
||||||
model_bakery = "*" # https://github.com/model-bakers/model_bakery
|
model_bakery = "*" # https://github.com/model-bakers/model_bakery
|
||||||
beautifulsoup4 = "*"
|
beautifulsoup4 = "*"
|
||||||
|
@ -88,16 +87,23 @@ lxml = "*"
|
||||||
requests-mock = "*"
|
requests-mock = "*"
|
||||||
tox = "*" # https://github.com/tox-dev/tox
|
tox = "*" # https://github.com/tox-dev/tox
|
||||||
coveralls = "*" # http://github.com/TheKevJames/coveralls-python
|
coveralls = "*" # http://github.com/TheKevJames/coveralls-python
|
||||||
darker = "*" # https://github.com/akaihola/pytest-darker
|
|
||||||
isort = "*" # https://github.com/pycqa/isort
|
|
||||||
flake8 = "*" # https://github.com/pycqa/flake8
|
flake8 = "*" # https://github.com/pycqa/flake8
|
||||||
EditorConfig = "*" # https://github.com/editorconfig/editorconfig-core-py
|
EditorConfig = "*" # https://github.com/editorconfig/editorconfig-core-py
|
||||||
safety = "*" # https://github.com/pyupio/safety
|
safety = "*" # https://github.com/pyupio/safety
|
||||||
mypy = "*" # https://github.com/python/mypy
|
mypy = "*" # https://github.com/python/mypy
|
||||||
tomli = "*" # https://github.com/hukkin/tomli
|
twine = "*" # https://github.com/pypa/twine
|
||||||
packaging = "*" # https://github.com/pypa/packaging
|
|
||||||
poetry-publish = "*" # https://github.com/jedie/poetry-publish
|
poetry-publish = "*" # https://github.com/jedie/poetry-publish
|
||||||
|
|
||||||
|
# https://github.com/akaihola/darker
|
||||||
|
# https://github.com/ikamensh/flynt
|
||||||
|
# https://github.com/pycqa/isort
|
||||||
|
# https://github.com/pygments/pygments
|
||||||
|
darker = { version = "*", extras = ["flynt", "isort", "color"]}
|
||||||
|
|
||||||
|
tomli = "*" # https://github.com/hukkin/tomli
|
||||||
|
# tomli only needed for Python <3.11, but see bug:
|
||||||
|
# https://github.com/pypa/pip/issues/9644#issuecomment-1456583402
|
||||||
|
#tomli = {version = "*", markers = "python_version < \"3.11\""} # https://github.com/hukkin/tomli
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
devshell = 'inventory_project.dev_shell:devshell_cmdloop'
|
devshell = 'inventory_project.dev_shell:devshell_cmdloop'
|
||||||
|
@ -112,35 +118,49 @@ build-backend = "poetry.core.masonry.api"
|
||||||
[tool.darker]
|
[tool.darker]
|
||||||
src = ['.']
|
src = ['.']
|
||||||
revision = "origin/main..."
|
revision = "origin/main..."
|
||||||
line_length = 100
|
line_length = 119
|
||||||
verbose = true
|
verbose = true
|
||||||
|
color = true
|
||||||
skip_string_normalization = true
|
skip_string_normalization = true
|
||||||
diff = false
|
diff = false
|
||||||
check = false
|
check = false
|
||||||
stdout = false
|
stdout = false
|
||||||
isort = true
|
isort = true
|
||||||
|
flynt = true
|
||||||
lint = [
|
lint = [
|
||||||
"flake8",
|
"flake8",
|
||||||
]
|
]
|
||||||
log_level = "INFO"
|
log_level = "INFO"
|
||||||
|
|
||||||
|
|
||||||
[tool.flynt]
|
|
||||||
line_length = 100
|
|
||||||
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
|
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
|
||||||
atomic=true
|
atomic=true
|
||||||
profile='black'
|
profile='black'
|
||||||
line_length = 100
|
|
||||||
skip_glob=[".*", "*/htmlcov/*","*/migrations/*","*/volumes/*"]
|
skip_glob=[".*", "*/htmlcov/*","*/migrations/*","*/volumes/*"]
|
||||||
known_first_party=["inventory","inventory_project","inventory_tests"]
|
known_first_party=["inventory","inventory_project","inventory_tests"]
|
||||||
|
line_length=119
|
||||||
lines_after_imports=2
|
lines_after_imports=2
|
||||||
|
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
omit = [".*"]
|
branch = false # coverage.exceptions.DataError: Can't combine arc data with line data
|
||||||
|
parallel = true
|
||||||
|
source = ['.']
|
||||||
|
concurrency = ["multiprocessing"]
|
||||||
|
command_line = "-m unittest --locals --verbose"
|
||||||
|
|
||||||
|
[tool.coverage.report]
|
||||||
|
omit = ['.*', '*/tests/*']
|
||||||
|
skip_empty = true
|
||||||
|
fail_under = 30
|
||||||
|
show_missing = true
|
||||||
|
exclude_lines = [
|
||||||
|
'if self.debug:',
|
||||||
|
'pragma: no cover',
|
||||||
|
'raise NotImplementedError',
|
||||||
|
'if __name__ == .__main__.:',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
|
@ -182,12 +202,11 @@ addopts = """
|
||||||
# TODO: --mypy
|
# TODO: --mypy
|
||||||
|
|
||||||
|
|
||||||
[tool.tox]
|
[tool.tox] # https://tox.wiki/en/latest/config.html#pyproject-toml
|
||||||
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
|
|
||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
[tox]
|
[tox]
|
||||||
isolated_build = True
|
isolated_build = True
|
||||||
envlist = py{39,310,311}
|
envlist = py{311,310,39}
|
||||||
skip_missing_interpreters = True
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -214,6 +233,9 @@ initial_revision = "b33d693"
|
||||||
initial_date = 2022-12-21T22:53:08+01:00
|
initial_date = 2022-12-21T22:53:08+01:00
|
||||||
cookiecutter_template = "https://github.com/jedie/cookiecutter_templates/"
|
cookiecutter_template = "https://github.com/jedie/cookiecutter_templates/"
|
||||||
cookiecutter_directory = "poetry-python"
|
cookiecutter_directory = "poetry-python"
|
||||||
|
applied_migrations = [
|
||||||
|
"183124a", # 2023-04-04T12:26:15+02:00
|
||||||
|
]
|
||||||
|
|
||||||
[manageprojects.cookiecutter_context.cookiecutter]
|
[manageprojects.cookiecutter_context.cookiecutter]
|
||||||
full_name = "Jens Diemer"
|
full_name = "Jens Diemer"
|
||||||
|
|
|
@ -7,12 +7,7 @@ from django.utils.translation import gettext_lazy as _
|
||||||
from import_export.admin import ImportExportMixin
|
from import_export.admin import ImportExportMixin
|
||||||
from import_export.resources import ModelResource
|
from import_export.resources import ModelResource
|
||||||
|
|
||||||
from inventory.admin.base import (
|
from inventory.admin.base import BaseFileModelInline, BaseImageModelInline, BaseUserAdmin, UserInlineMixin
|
||||||
BaseFileModelInline,
|
|
||||||
BaseImageModelInline,
|
|
||||||
BaseUserAdmin,
|
|
||||||
UserInlineMixin,
|
|
||||||
)
|
|
||||||
from inventory.admin.tagulous_fix import TagulousModelAdminFix
|
from inventory.admin.tagulous_fix import TagulousModelAdminFix
|
||||||
from inventory.models import MemoLinkModel, MemoModel
|
from inventory.models import MemoLinkModel, MemoModel
|
||||||
from inventory.models.memo import MemoFileModel, MemoImageModel
|
from inventory.models.memo import MemoFileModel, MemoImageModel
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from bx_django_utils.test_utils.html_assertion import (
|
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin, assert_html_response_snapshot
|
||||||
HtmlAssertionMixin,
|
|
||||||
assert_html_response_snapshot,
|
|
||||||
)
|
|
||||||
from django.template.defaulttags import CsrfTokenNode, NowNode
|
from django.template.defaulttags import CsrfTokenNode, NowNode
|
||||||
from django.test import TestCase, override_settings
|
from django.test import TestCase, override_settings
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,7 @@ import datetime
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from bx_django_utils.test_utils.datetime import MockDatetimeGenerator
|
from bx_django_utils.test_utils.datetime import MockDatetimeGenerator
|
||||||
from bx_django_utils.test_utils.html_assertion import (
|
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin, assert_html_response_snapshot
|
||||||
HtmlAssertionMixin,
|
|
||||||
assert_html_response_snapshot,
|
|
||||||
)
|
|
||||||
from bx_py_utils.test_utils.snapshot import assert_html_snapshot
|
from bx_py_utils.test_utils.snapshot import assert_html_snapshot
|
||||||
from django.template.defaulttags import CsrfTokenNode, NowNode
|
from django.template.defaulttags import CsrfTokenNode, NowNode
|
||||||
from django.test import TestCase, override_settings
|
from django.test import TestCase, override_settings
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from bx_django_utils.test_utils.html_assertion import (
|
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin, assert_html_response_snapshot
|
||||||
HtmlAssertionMixin,
|
|
||||||
assert_html_response_snapshot,
|
|
||||||
)
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.template.defaulttags import CsrfTokenNode, NowNode
|
from django.template.defaulttags import CsrfTokenNode, NowNode
|
||||||
from django.test import TestCase, override_settings
|
from django.test import TestCase, override_settings
|
||||||
|
|
Ładowanie…
Reference in New Issue