Skip to content
Snippets Groups Projects
Commit 31160448 authored by Bastien Abadie's avatar Bastien Abadie Committed by Erwan Rouchet
Browse files

Add pre-commit basic checks

parent 75cd226f
No related branches found
Tags 1.5.1
No related merge requests found
......@@ -6,6 +6,24 @@ repos:
additional_dependencies:
- 'flake8-copyright==0.2.2'
- 'flake8-debugger==3.1.0'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: trailing-whitespace
exclude: '^arkindex/documents/tests/pagexml_samples/(.*).xml$'
- id: check-yaml
args: [--allow-multiple-documents]
- id: mixed-line-ending
- id: name-tests-test
args: ['--django']
- id: check-json
- id: requirements-txt-fixer
- repo: meta
hooks:
- id: check-useless-excludes
......
......@@ -122,8 +122,8 @@ See `manage.py <command> --help` to view more details about a specific command.
Once your code appears to be working on a local server, a few checks have to be performed:
* **Migrations:** Ensure that all migrations have been created by typing `./manage.py makemigrations`.
* **Unit tests:** Run `./manage.py test` to perform unit tests.
Use `./manage.py test module_name` to perform tests on a single module, if you wish to spend less time waiting for all tests to complete.
* **Unit tests:** Run `./manage.py test` to perform unit tests.
- Use `./manage.py test module_name` to perform tests on a single module, if you wish to spend less time waiting for all tests to complete.
### Linting
......
......@@ -196,12 +196,10 @@ class DataImport(IndexableModel):
return serializer.validated_data
# The maximum length for DataFile filenames.
# Used in the file upload API because accessing the max_length attribute on a field
# inside a Django model is unnecessarily complex.
MAX_FILENAME_LENGTH = 255
"""
The maximum length for DataFile filenames.
Used in the file upload API because accessing the max_length attribute on a field
inside a Django model is unnecessarily complex.
"""
class DataFile(S3FileMixin, models.Model):
......
père de l'époux:
père de l'époux:
parent_name: père
child_name: enfant
parent_type: person
child_type: person
link_with: époux
mère de l'époux:
mère de l'époux:
parent_name: mère
child_name: enfant
parent_type: person
child_type: person
link_with: époux
père de l'épouse:
père de l'épouse:
parent_name: père
child_name: enfant
parent_type: person
child_type: person
link_with: épouse
mère de l'épouse:
mère de l'épouse:
parent_name: mère
child_name: enfant
parent_type: person
child_type: person
link_with: épouse
marraine:
marraine:
parent_name: marraine
child_name: filleul
parent_type: person
child_type: person
link_with: sujet
parrain:
parrain:
parent_name: parrain
child_name: filleul
parent_type: person
child_type: person
link_with: sujet
conjoint:
conjoint:
parent_name: conjoint
child_name: conjointe
parent_type: person
child_type: person
link_with: conjointe
conjointe:
conjointe:
parent_name: conjointe
child_name: conjoint
parent_type: person
child_type: person
link_with: conjoint
ex-conjointe:
ex-conjointe:
parent_name: ex-conjointe
child_name: ex-conjoint
parent_type: person
child_type: person
link_with: conjoint
ex-conjoint:
ex-conjoint:
parent_name: ex-conjoint
child_name: ex-conjointe
parent_type: person
child_type: person
link_with: conjointe
témoin:
témoin:
parent_name: témoin
child_name: sujet
parent_type: person
child_type: person
link_with: sujet
époux:
époux:
parent_name: époux
child_name: épouse
parent_type: person
child_type: person
link_with: épouse
épouse:
épouse:
parent_name: épouse
child_name: époux
parent_type: person
child_type: person
link_with: époux
père:
père:
parent_name: père
child_name: enfant
parent_type: person
child_type: person
link_with: sujet
mère:
mère:
parent_name: mère
child_name: enfant
parent_type: person
......
cache:
url: cache.url is required for a Redis cache
cors:
cors:
suffixes: "'int' object is not iterable"
csrf:
cookie_samesite: "'relax' is not a valid CookieSameSiteOption"
trusted_origins: "'float' object is not iterable"
database:
port: "invalid literal for int() with base 10: 'rotterdam'"
email:
email:
password: This option is required
port: This option is required
user: This option is required
features:
sv_cheats: This option does not exist
ml_classifiers_dir: /aaaaa does not exist
redis:
redis:
capacity: "invalid literal for int() with base 10: 'over nine thousand'"
session:
cookie_samesite: "'foo' is not a valid CookieSameSiteOption"
......
#!/bin/sh
VERSION=${VERSION:-${CI_COMMIT_TAG}}
[ -z "$VERSION" ] && echo "No version specified" && exit 1
......
# -r ./base/requirements.txt
arkindex-common==0.2.0
apistar==0.7.2
git+https://gitlab.com/teklia/apistar.git#egg=apistar
arkindex-common==0.2.0
git+https://gitlab.com/arkindex/common.git#egg=arkindex-common
certifi==2017.7.27.1
channels==2.3.1
channels-redis==2.4.1
......@@ -22,11 +24,9 @@ python-magic==0.4.15
python-memcached==1.59
pytz>=2018.7
PyYAML==5.1
responses==0.10.7
requests==2.22
responses==0.10.7
sentry-sdk==0.14.3
tenacity==6.2
urllib3==1.22
uritemplate==3
git+https://gitlab.com/arkindex/common.git#egg=arkindex-common
git+https://gitlab.com/teklia/apistar.git#egg=apistar
urllib3==1.22
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment