Commit 9efc1d3a authored by Vuillaume's avatar Vuillaume
Browse files

Adding pre-commit hooks config

parent 430fd643
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-json
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3
args:
- --line-length=120
- --skip-string-normalization
- --exclude="""\.git |
\.__pycache__|
build"""
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: flake8
language_version: python3
args:
- "--max-line-length=120"
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
args:
- --line-length=120
......@@ -11,7 +11,7 @@ The eOSSR Python library gathers all the developments made for the OSSR. In part
- functions to help developers automatically contribute to the OSSR, in particular using their continuous integration (see also code snippets)
Code: [https://gitlab.in2p3.fr/escape2020/wp3/eossr](https://gitlab.in2p3.fr/escape2020/wp3/eossr)
Code: [https://gitlab.in2p3.fr/escape2020/wp3/eossr](https://gitlab.in2p3.fr/escape2020/wp3/eossr)
Documentation: [https://escape2020.pages.in2p3.fr/wp3/eossr/](https://escape2020.pages.in2p3.fr/wp3/eossr/)
......
......@@ -18,9 +18,19 @@ Otherwise, [register](https://gitlab.in2p3.fr/users/sign_up).
2. Update the `modifiedDate`, `version` and other necessary information in `codemeta.json`. You may use the script `eossr/script/update_codemeta.py`.
3. Unit tests. If you are adding a new function / method, please add the corresponding unit tests.
3. (Re-)Install the eossr after you made changes: `pip install ".[extras]"`
4. Unit tests:
- If you are adding a new function / method, please add the corresponding unit tests.
- Run `pytest eossr`.
- Note that some tests will not run if you don't setup a zenodo token in your env (see README).
These will be tested during the CI after you opened a merge request though.
5. Committing your changes will automatically run pre-commit hooks that will lint your code.
Some changes might need to be addressed and/or committed again.
7. Open a merge request.
All tests must pass for the merge request to be reviewed (and accepted).
You can run tests locally but note that some will not run if you don't setup a zenodo token in your env (see README).
Note that all contributions will be under the MIT license.
......@@ -35,6 +45,3 @@ Be as precise and exhaustive as possible to fasten the implementation of a fix.
The eOSSR repository is also the place to discuss the metadata schema of the OSSR implemented in `codemeta.json`.
If you want to modify OSSR metadata schema, open an issue and add the `MetaData` label.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment