Skip to content

Commit

Permalink
Merge pull request #16 from unicef/develop
Browse files Browse the repository at this point in the history
v1.3
  • Loading branch information
robertavram authored Feb 17, 2023
2 parents 4773989 + b12e32e commit aff5833
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 59 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
POSTGRES_PASSWORD: postgres
steps:
- checkout
- run: sudo apt-get install libgdal-dev libgeos-dev libproj-dev libudunits2-dev libv8-dev
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "setup.py" }}
- run:
Expand Down
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 120
ignore =

exclude =
*/migrations,
1 change: 1 addition & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ multi_line_output = 3
line_length = 120
balanced_wrapping = true
order_by_type = false
skip = migrations
7 changes: 6 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
Release 1.2
Release 1.3
-----------
* added support Django 4.1
* admin performance use raw_id for users

Release 1.2 (in development)
-----------
* added support Django 4.0

Expand Down
27 changes: 0 additions & 27 deletions pytest.ini

This file was deleted.

22 changes: 0 additions & 22 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
[isort]
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
known_first_party = unicef_snapshot
multi_line_output = 0
line_length=120
balanced_wrapping = true
order_by_type=false
known_standard_library=six

[wheel]
universal = 1

[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0

[pep8]
ignore = E501,E401,W391,E128,E261
max-line-length = 160
exclude = .tox,migrations,.git,docs,diff_match_patch.py,deploy/**,settings

[flake8]
max-complexity = 19
max-line-length = 160
exclude = .tox,migrations,.git,docs,diff_match_patch.py,deploy/**,settings
ignore = E501,E401,W391,E128,E261
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def read(*files):
'pytest-cov',
'pytest-django',
'pytest-echo',
'pytest-pythonpath',
'psycopg2-binary',
),
},
Expand All @@ -69,6 +68,7 @@ def read(*files):
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Intended Audience :: Developers'],
scripts=[],
)
2 changes: 1 addition & 1 deletion src/unicef_snapshot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NAME = 'unicef_snapshot'
VERSION = __version__ = "1.2"
VERSION = __version__ = "1.3"
__author__ = 'UNICEF'
3 changes: 3 additions & 0 deletions src/unicef_snapshot/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class ActivityAdmin(admin.ModelAdmin):
list_filter = (
'action',
)
raw_id_fields = (
'by_user',
)

def has_add_permission(self, request):
return False
Expand Down
Empty file added tests/__init__.py
Empty file.
2 changes: 0 additions & 2 deletions tests/demoproject/demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@

USE_I18N = True

USE_L10N = True

USE_TZ = True


Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist = py{39}-d{32,40}
envlist = py{39}-d{32,40,41}
envtmpdir={toxinidir}/build/{envname}/tmp
envlogdir={toxinidir}/build/{envname}/log

[pytest]
python_paths=./src
pythonpath=./src ./tests/demoproject
DJANGO_SETTINGS_MODULE=demo.settings
django_find_project=false
norecursedirs = data .tox INVALID
Expand All @@ -23,13 +23,13 @@ addopts =
--echo-attr django.conf.settings.DATABASES.default.PORT

[testenv]
passenv = PYTHONDONTWRITEBYTECODE USER PYTHONPATH
passenv = PYTHONDONTWRITEBYTECODE, USER, PYTHONPATH
setenv =
PYTHONDONTWRITEBYTECODE=true
PYTHONPATH={toxinidir}/src
deps =
d32: django==3.2.*
d40: django==4.0.*
d41: django==4.1.*
extras =
test
whitelist_externals = createdb
Expand Down

0 comments on commit aff5833

Please sign in to comment.