bifurqué depuis cliss21/biohdf
build(project): rappatrie des configurations récentes
Parent
432fec2cbc
révision
ea243076c2
41
Makefile
41
Makefile
|
@ -20,6 +20,9 @@ else
|
|||
PIP := $(shell which pip)
|
||||
endif
|
||||
|
||||
# Détermine si black est présent.
|
||||
USE_BLACK := $(shell $(PYTHON) -c 'import black; print("1")' 2>/dev/null)
|
||||
|
||||
# Détermine s'il faut charger le fichier de configuration.
|
||||
ifneq ($(READ_CONFIG_FILE), 0)
|
||||
READ_CONFIG_FILE := 1
|
||||
|
@ -78,9 +81,8 @@ clean-build: ### nettoie les fichiers de construction du paquet
|
|||
rm -rf *.egg-info
|
||||
|
||||
clean-pyc: ### nettoie les fichiers temporaires python
|
||||
find . -name '*.pyc' -exec rm -f {} +
|
||||
find . -name '*.pyo' -exec rm -f {} +
|
||||
find . -name '*~' -exec rm -f {} +
|
||||
find biohdf/ \
|
||||
\( -name '*.pyc' -o -name '*.pyo' -o -name '*~' \) -exec rm -f {} +
|
||||
|
||||
init: create-venv config.env update ## initialise l'environnement et l'application
|
||||
|
||||
|
@ -103,7 +105,7 @@ check-config:
|
|||
vous devriez au moins faire : chmod o-rwx config.env"; false; }
|
||||
|
||||
install-deps: ## installe les dépendances de l'application
|
||||
$(PIP) install -r requirements/$(ENV).txt
|
||||
$(PIP) install --upgrade --requirement requirements/$(ENV).txt
|
||||
|
||||
migrate: ## mets à jour le schéma de la base de données
|
||||
$(PYTHON) manage.py migrate
|
||||
|
@ -131,12 +133,33 @@ clear-venv: ## supprime l'environnement virtuel
|
|||
|
||||
## Cibles pour le développement
|
||||
|
||||
test: ### lance les tests de l'application
|
||||
DJANGO_SETTINGS_MODULE="biohdf.settings.test" \
|
||||
$(PYTHON) manage.py test --parallel 4
|
||||
|
||||
serve: ### démarre un serveur local pour l'application
|
||||
$(PYTHON) manage.py runserver
|
||||
|
||||
test: ### lance les tests de l'application
|
||||
$(PYTHON) -m pytest --cov --cov-report=term:skip-covered
|
||||
|
||||
cov: test ### vérifie la couverture de code
|
||||
$(PYTHON) -m coverage html
|
||||
@echo open htmlcov/index.html
|
||||
|
||||
lint: ### vérifie la syntaxe et le code python
|
||||
flake8 biohdf
|
||||
@$(PYTHON) -m flake8 biohdf \
|
||||
|| echo "\033[31m[flake8]\033[0m Veuillez corriger les erreurs ci-dessus."
|
||||
@$(PYTHON) -m isort --check --recursive biohdf \
|
||||
|| echo "\033[31m[isort]\033[0m Veuillez corriger l'ordre des imports avec : make fix-lint"
|
||||
ifdef USE_BLACK
|
||||
@$(PYTHON) -m black --check biohdf
|
||||
endif
|
||||
|
||||
fix-lint: ### corrige la syntaxe et ordonne les imports python
|
||||
$(PYTHON) -m isort --recursive biohdf
|
||||
ifdef USE_BLACK
|
||||
$(PYTHON) -m black biohdf
|
||||
endif
|
||||
|
||||
docs: ## construit la documentation
|
||||
$(MAKE) -C docs/ html SPHINXBUILD=../$(VENV_DIR)/bin/sphinx-build
|
||||
|
||||
clean-docs: ## supprime la documentation (docs/build)
|
||||
$(MAKE) -C docs/ clean SPHINXBUILD=../$(VENV_DIR)/bin/sphinx-build
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
[tool.black]
|
||||
line-length = 79
|
||||
skip-string-normalization = true
|
||||
exclude = '''
|
||||
/(
|
||||
\.git
|
||||
| assets
|
||||
| local
|
||||
| migrations
|
||||
| node_modules
|
||||
| var
|
||||
| venv
|
||||
)/
|
||||
| urls(|_.+|/.+).py
|
||||
'''
|
|
@ -1,14 +0,0 @@
|
|||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django >=2.0,<2.1 # https://www.djangoproject.com/
|
||||
django-environ ==0.4.5 # https://github.com/joke2k/django-environ
|
||||
|
||||
# Wagtail
|
||||
# ------------------------------------------------------------------------------
|
||||
wagtail >=2.2,<2.3 # https://wagtail.io
|
||||
wagtailmenus
|
||||
wagtail-react-streamfield
|
||||
django-filter
|
||||
django-widget-tweaks
|
||||
wagtailembedpeertube
|
||||
-e git+https://github.com/fpoulain/django-location-field@master#egg=django-location-field
|
|
@ -1,34 +1,14 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile requirements/base.in
|
||||
#
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django >=2.0,<2.1 # https://www.djangoproject.com/
|
||||
django-environ ==0.4.5 # https://github.com/joke2k/django-environ
|
||||
|
||||
# Wagtail
|
||||
# ------------------------------------------------------------------------------
|
||||
wagtail >=2.2,<2.3 # https://wagtail.io
|
||||
wagtailmenus
|
||||
wagtail-react-streamfield
|
||||
django-filter
|
||||
django-widget-tweaks
|
||||
wagtailembedpeertube
|
||||
-e git+https://github.com/fpoulain/django-location-field@master#egg=django-location-field
|
||||
beautifulsoup4==4.6.0 # via wagtail
|
||||
certifi==2018.11.29 # via requests
|
||||
chardet==3.0.4 # via requests
|
||||
django-cogwheels==0.2 # via wagtailmenus
|
||||
django-environ==0.4.5
|
||||
django-filter==2.1.0
|
||||
django-modelcluster==4.3 # via wagtail
|
||||
django-taggit==0.24.0 # via wagtail
|
||||
django-treebeard==4.3 # via wagtail
|
||||
django-widget-tweaks==1.4.3
|
||||
django==2.0.13
|
||||
djangorestframework==3.9.1 # via wagtail
|
||||
draftjs-exporter==2.1.5 # via wagtail
|
||||
html5lib==1.0.1 # via wagtail
|
||||
idna==2.8 # via requests
|
||||
pillow==5.4.1 # via wagtail
|
||||
pytz==2018.9 # via django, django-modelcluster, wagtail
|
||||
requests==2.21.0 # via wagtail
|
||||
six==1.12.0 # via html5lib, wagtail
|
||||
unidecode==1.0.23 # via wagtail
|
||||
urllib3==1.24.1 # via requests
|
||||
wagtail-react-streamfield==1.1.1
|
||||
wagtail==2.2.2
|
||||
wagtailembedpeertube==0.1.0
|
||||
wagtailmenus==2.12
|
||||
webencodings==0.5.1 # via html5lib
|
||||
willow==1.1 # via wagtail
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
-r base.txt
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django-debug-toolbar # https://github.com/jazzband/django-debug-toolbar
|
||||
django-extensions # https://github.com/django-extensions/django-extensions
|
||||
|
||||
# Pip
|
||||
# ------------------------------------------------------------------------------
|
||||
pip-tools
|
|
@ -1,39 +1,10 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile requirements/development.in
|
||||
#
|
||||
-e git+https://github.com/fpoulain/django-location-field@master#egg=django-location-field
|
||||
beautifulsoup4==4.6.0
|
||||
certifi==2018.11.29
|
||||
chardet==3.0.4
|
||||
click==7.0 # via pip-tools
|
||||
django-cogwheels==0.2
|
||||
django-debug-toolbar==1.11
|
||||
django-environ==0.4.5
|
||||
django-extensions==2.1.6
|
||||
django-filter==2.1.0
|
||||
django-modelcluster==4.3
|
||||
django-taggit==0.24.0
|
||||
django-treebeard==4.3
|
||||
django-widget-tweaks==1.4.3
|
||||
django==2.0.13
|
||||
djangorestframework==3.9.1
|
||||
draftjs-exporter==2.1.5
|
||||
html5lib==1.0.1
|
||||
idna==2.8
|
||||
pillow==5.4.1
|
||||
pip-tools==3.4.0
|
||||
pytz==2018.9
|
||||
requests==2.21.0
|
||||
six==1.12.0
|
||||
sqlparse==0.2.4 # via django-debug-toolbar
|
||||
unidecode==1.0.23
|
||||
urllib3==1.24.1
|
||||
wagtail-react-streamfield==1.1.1
|
||||
wagtail==2.2.2
|
||||
wagtailembedpeertube==0.1.0
|
||||
wagtailmenus==2.12
|
||||
webencodings==0.5.1
|
||||
willow==1.1
|
||||
-r base.txt
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django-debug-toolbar # https://github.com/jazzband/django-debug-toolbar
|
||||
django-extensions # https://github.com/django-extensions/django-extensions
|
||||
|
||||
# Pip
|
||||
# ------------------------------------------------------------------------------
|
||||
pip-tools
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
-r base.txt
|
||||
|
||||
# PRECAUTION: avoid production dependencies that aren't in development.
|
|
@ -1,34 +1,3 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile requirements/production.in
|
||||
#
|
||||
-e git+https://github.com/fpoulain/django-location-field@master#egg=django-location-field
|
||||
beautifulsoup4==4.6.0
|
||||
certifi==2018.11.29
|
||||
chardet==3.0.4
|
||||
django-cogwheels==0.2
|
||||
django-environ==0.4.5
|
||||
django-filter==2.1.0
|
||||
django-modelcluster==4.3
|
||||
django-taggit==0.24.0
|
||||
django-treebeard==4.3
|
||||
django-widget-tweaks==1.4.3
|
||||
django==2.0.13
|
||||
djangorestframework==3.9.1
|
||||
draftjs-exporter==2.1.5
|
||||
html5lib==1.0.1
|
||||
idna==2.8
|
||||
pillow==5.4.1
|
||||
pytz==2018.9
|
||||
requests==2.21.0
|
||||
six==1.12.0
|
||||
unidecode==1.0.23
|
||||
urllib3==1.24.1
|
||||
wagtail-react-streamfield==1.1.1
|
||||
wagtail==2.2.2
|
||||
wagtailembedpeertube==0.1.0
|
||||
wagtailmenus==2.12
|
||||
webencodings==0.5.1
|
||||
willow==1.1
|
||||
-r base.txt
|
||||
|
||||
# PRECAUTION: avoid production dependencies that aren't in development.
|
||||
|
|
32
setup.cfg
32
setup.cfg
|
@ -1,3 +1,25 @@
|
|||
[tool:pytest]
|
||||
norecursedirs = node_modules
|
||||
testpaths = biohdf
|
||||
DJANGO_SETTINGS_MODULE = biohdf.settings.test
|
||||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
source =
|
||||
biohdf
|
||||
omit =
|
||||
biohdf/*tests*,
|
||||
biohdf/*/migrations/*,
|
||||
biohdf/settings/*,
|
||||
biohdf/wsgi.py
|
||||
|
||||
[coverage:report]
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
if settings.DEBUG:
|
||||
raise NotImplementedError
|
||||
show_missing = True
|
||||
|
||||
[flake8]
|
||||
exclude =
|
||||
.git,
|
||||
|
@ -11,3 +33,13 @@ exclude =
|
|||
dist,
|
||||
node_modules
|
||||
max-line-length = 80
|
||||
|
||||
[isort]
|
||||
line_length = 80
|
||||
known_first_party = biohdf
|
||||
multi_line_output = 3
|
||||
default_section = THIRDPARTY
|
||||
known_django = django
|
||||
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||
skip_glob = **/migrations/*.py
|
||||
include_trailing_comma = True
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket