Skip to content

Commit

Permalink
mamageprojects updates + update requirements
Browse files Browse the repository at this point in the history
+fix flake8
  • Loading branch information
jedie committed Jan 17, 2024
1 parent 7bf2148 commit dc4cacd
Show file tree
Hide file tree
Showing 12 changed files with 556 additions and 551 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{html,css,js}]
insert_final_newline = false

[*.py]
max_line_length = 119

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ jobs:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9"]
django-version: ["4.2", "4.1", "3.2"]
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: always
steps:
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git clone https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
Expand All @@ -53,6 +50,9 @@ jobs:
# ./manage.py safety

- name: 'Python ${{ matrix.python-version }} Django ${{ matrix.django-version }}'
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: always
run: |
./manage.py tox -e $(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.egg-info
__pycache__
/dist/
/build/
/coverage.*
*.orig

Expand Down
5 changes: 3 additions & 2 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""

import hashlib
import shlex
import signal
import subprocess
import sys
Expand Down Expand Up @@ -78,7 +79,7 @@ def venv_up2date():


def verbose_check_call(*popen_args):
print(f'\n+ {" ".join(str(arg) for arg in popen_args)}\n')
print(f'\n+ {shlex.join(str(arg) for arg in popen_args)}\n')
return subprocess.check_call(popen_args)


Expand All @@ -95,7 +96,7 @@ def main(argv):

# Create virtual env in ".venv/":
if not PYTHON_PATH.is_file():
print('Create virtual env here:', VENV_PATH.absolute())
print(f'Create virtual env here: {VENV_PATH.absolute()}')
builder = venv.EnvBuilder(symlinks=True, upgrade=True, with_pip=True)
builder.create(env_dir=VENV_PATH)
# Update pip
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ applied_migrations = [
"00fbc5d", # 2023-04-07T12:35:09+02:00
"c1a9d97", # 2023-11-01T19:59:17+01:00
"363c360", # 2023-12-16T19:37:39+01:00
"a66e5ae", # 2024-01-16T19:13:13+01:00
]

[manageprojects.cookiecutter_context.cookiecutter]
Expand Down
270 changes: 135 additions & 135 deletions requirements.dev.txt

Large diffs are not rendered by default.

264 changes: 132 additions & 132 deletions requirements.django32.txt

Large diffs are not rendered by default.

264 changes: 132 additions & 132 deletions requirements.django41.txt

Large diffs are not rendered by default.

270 changes: 135 additions & 135 deletions requirements.django42.txt

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ diff-match-patch==20230430 \
--hash=sha256:953019cdb9c9d2c9e47b5b12bcff3cf4746fc4598eb406076fa1fc27e6a1f15c \
--hash=sha256:dce43505fb7b1b317de7195579388df0746d90db07015ed47a85e5e44930ef93
# via django-reversion-compare (pyproject.toml)
django==5.0 \
--hash=sha256:3a9fd52b8dbeae335ddf4a9dfa6c6a0853a1122f1fb071a8d5eca979f73a05c8 \
--hash=sha256:7d29e14dfbc19cb6a95a4bd669edbde11f5d4c6a71fdaa42c2d40b6846e807f7
django==5.0.1 \
--hash=sha256:8c8659665bc6e3a44fefe1ab0a291e5a3fb3979f9a8230be29de975e57e8f854 \
--hash=sha256:f47a37a90b9bbe2c8ec360235192c7fddfdc832206fcf618bb849b39256affc1
# via
# django-reversion
# django-reversion-compare (pyproject.toml)
django-reversion==5.0.8 \
--hash=sha256:229ad0d2819416157502ff13d81bad2366227b763ce85b63b8a223edb756a513 \
--hash=sha256:45d378bc6e606df6b2ad0077aec8b0a00e35f18c74ca2a1ae9cc262ceb32fb9a
django-reversion==5.0.10 \
--hash=sha256:1209a7965ea91f39a297424450f88732e01acf841e024a1eec6c6420367a6252 \
--hash=sha256:c18749a67c1db4167ccaccc36395c5fe6078f312869683c2f3d214051e5a6b29
# via django-reversion-compare (pyproject.toml)
sqlparse==0.4.4 \
--hash=sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3 \
Expand Down
2 changes: 1 addition & 1 deletion reversion_compare/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def compare(self, obj, version1, version2):
# logger.debug("%s %s %s", field, field.db_type, field.get_internal_type())
try:
field_name = field.name
except BaseException:
except AttributeError:
# is a reverse FK field
field_name = field.field_name

Expand Down
7 changes: 3 additions & 4 deletions reversion_compare_project/settings/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
from reversion_compare_project.settings.prod import * # noqa


ALLOWED_HOSTS = ['testserver']


# _____________________________________________________________________________
# Manage Django Project

Expand All @@ -29,10 +32,6 @@

# _____________________________________________________________________________

# Skip download map via geotiler in reversion_compare.gpx_tools.gpxpy2map.generate_map
MAP_DOWNLOAD = False


# All tests should use django-override-storage!
# Set root to not existing path, so that wrong tests will fail:
STATIC_ROOT = '/not/exists/static/'
Expand Down

0 comments on commit dc4cacd

Please sign in to comment.