diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2608c47..dde6c76 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -112,7 +112,14 @@ repos: - repo: https://github.com/pycqa/flake8 rev: "7.0.0" hooks: - - id: flake8 + - id: flake8 + # Ignore all format-related checks as Black takes care of those. + args: + - --ignore=E2, W5, F401, E401 + - --select=E, W, F, N + - --max-line-length=120 + additional_dependencies: + - pep8-naming - repo: https://github.com/adrienverge/yamllint.git rev: v1.35.1 diff --git a/README.md b/README.md index f06dbdb..ba276d6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ python tools to assist with standardized data ingestion workflows ### Install from PyPi -```python +```console pip install osc-ingest-tools ``` @@ -102,14 +102,14 @@ checks. Enabling automatic formatting via [pre-commit](https://pre-commit.com/) is recommended: -```shell +```console pip install black isort pre-commit pre-commit install ``` To ensure compliance with static check tools, developers may wish to run; -```shell +```console pip install black isort # auto-sort imports isort . @@ -117,9 +117,10 @@ isort . black . ``` -Code can then be tested using tox. +Code can then be tested using tox: -```shell +```console +======= # run static checks and tests tox # run only tests @@ -141,7 +142,7 @@ To release a new version of this library, authorized developers should; E.g., -```shell +```console git commit -sm "Release v0.3.4" git tag v0.3.4 git push --follow-tags diff --git a/pyproject.toml b/pyproject.toml index 20c7946..b7eb394 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ test = ["pdm[pytest]", "pytest-cov"] tox = ["tox", "tox-pdm>=0.5"] docs = ["sphinx>=7.2.6", "sphinx-copybutton>=0.5.2"] dev = ["tox>=4.11.3", "tox-pdm>=0.7.0"] -lint = ["pre-commit"] +lint = ["pre-commit", "tomli"] [tool.pytest.ini_options] testpaths = "tests/"