# ds-reify
[![Tests](https://github.com/gnodar01/ds-reify/workflows/Tests/badge.svg)](https://github.com/gnodar01/ds-reify/actions?workflow=Tests)
[![PyPI](https://img.shields.io/pypi/v/ds-reify.svg)](https://pypi.org/project/ds-reify/)
A CLI helper tool for [Distributed-Something](https://distributedscience.github.io/Distributed-Something/introduction.html)
## Development
### Setup Virtual Environment
Setup a python environment using the method of your choice.
Using the builtin `venv`:
python -m venv <ENV_NAME>
source <ENV_NAME>/bin/activate
Using `conda` (replace with any `python >= 3.8`):
conda create -n <ENV_NAME> python=3.8
conda activate <ENV_NAME>
Using whatever else you want, like [pyenv](https://github.com/pyenv/pyenv).
### Install dev tools
Install [Poetry](https://python-poetry.org/)
curl -sSL https://install.python-poetry.org/ | python
source ~/.poetry/env
Install [Nox](https://nox.thea.codes/en/stable/)
pip install --user --upgrade nox
See [this post](https://medium.com/@cjolowicz/nox-is-a-part-of-your-global-developer-environment-like-poetry-pre-commit-pyenv-or-pipx-1cdeba9198bd) if you're curious as to why we don't install nox via Poetry.
Install [pre-commit](https://pre-commit.com/)
pip install --user --upgrade pre-commit
Let Poetry install the rest from `pyproject.toml`
poetry install
### Testing
[Coverage.py](https://coverage.readthedocs.io/en/7.2.2/) is used for test coverage, alongside [pytest](https://docs.pytest.org/en/7.2.x/), via the [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) plugin.
To run the tests directly, in you virtual environment, run `pytest --cov`.
To let nox run across multiple isolated environments, run `nox`.
To avoid nox recreating the virtual environments from scratch on each invocation, run `nox -r`.
Run a specific test with `nox -s tests -- tests/test_TESTNAME`.
### Static analysis
Autoformatting is performed with [Black](https://github.com/psf/black).
Run formatting with `nox -s black` or specify files/directors with `nox -s black -- file1 dir1 ...`.
Black auto-formatting is not run by default when running `nox` in isolation, it must be specified.
[Flake8](https://flake8.pycqa.org/en/latest/) is used for linting. Under the hood, it uses:
- [pylint](https://www.pylint.org/)
- [pyflakes](https://github.com/PyCQA/pyflakes) - invalid python code
- errors reported as `F`
- [pycodestyle](https://github.com/pycqa/pycodestyle) - [PEP 8](https://peps.python.org/pep-0008/) style checking
- `W` for warnings, `E` for errors
- [mccabe](https://github.com/PyCQA/mccabe) - code complexity
- errors reported as `C`.
- [flake8-black](https://github.com/peterjc/flake8-black) plugin - adherence to Black code style
- erros reported as `BLK`.
- [flake8-import-order](https://github.com/PyCQA/flake8-import-order) plugin - import grouping and ordering checked against the [Google styleguide](https://google.github.io/styleguide/pyguide.html?showone=Imports_formatting#313-imports-formatting)
- errors reported as `I`
- [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) plugin - various miscellaneous bugs and design problems
- likely bugs reported as `B`
- opinionated bugs reported as `B9`
- `B950` replaces `E501` for max line length checking (adds tolerance margin of 10%)
- [flake8-bandit](https://github.com/tylerwince/flake8-bandit) plugin - uses [Bandit](https://github.com/PyCQA/bandit) to find common security issues
- issues reported as `S`
- [flake8-annotations](https://github.com/sco1/flake8-annotations) plugin - detects absence of type annotations for functions
- issues reported as `ANN`
All of these are configured in the `.flake8` file.
Run linting with `nox -s lint` or specify files/directoriess with `nox -s lint -- file1 dir1 ...`.
Import ordering is not auto-formatted although may in the future by migrating to [flake8-isort](https://github.com/gforcada/flake8-isort).
[Safety](https://github.com/pyupio/safety) is uesd for checking project dependencies against known security violations. For example, [insecure-package](https://pypi.org/project/insecure-package/).
Run it with `nox -s safety`.
#### Pre-commit
If you would like to enable the pre-commit hooks, run `pre-commit install`.
The hooks will run on files changed by the commit in question. To trigger hooks automatically run `pre-commit run --all-files`.
Raw data
{
"_id": null,
"home_page": "https://distributedscience.github.io/Distributed-Something/introduction.html",
"name": "ds-reify",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.1,<4.0.0",
"maintainer_email": "",
"keywords": "Distributed-Something,DistributedScience",
"author": "Nodar Gogoberidze",
"author_email": "gnodar01@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a7/43/997e9147ab5661980b2c3b944cc994510d38366fb055917606df51334705/ds_reify-0.1.0.tar.gz",
"platform": null,
"description": "# ds-reify\n\n[![Tests](https://github.com/gnodar01/ds-reify/workflows/Tests/badge.svg)](https://github.com/gnodar01/ds-reify/actions?workflow=Tests)\n[![PyPI](https://img.shields.io/pypi/v/ds-reify.svg)](https://pypi.org/project/ds-reify/)\n\nA CLI helper tool for [Distributed-Something](https://distributedscience.github.io/Distributed-Something/introduction.html)\n\n## Development\n\n### Setup Virtual Environment\n\nSetup a python environment using the method of your choice.\n\nUsing the builtin `venv`:\n\n python -m venv <ENV_NAME>\n source <ENV_NAME>/bin/activate\n\nUsing `conda` (replace with any `python >= 3.8`):\n\n conda create -n <ENV_NAME> python=3.8\n conda activate <ENV_NAME>\n\nUsing whatever else you want, like [pyenv](https://github.com/pyenv/pyenv).\n\n### Install dev tools\n\nInstall [Poetry](https://python-poetry.org/)\n\n curl -sSL https://install.python-poetry.org/ | python\n source ~/.poetry/env\n\nInstall [Nox](https://nox.thea.codes/en/stable/)\n\n pip install --user --upgrade nox\n\nSee [this post](https://medium.com/@cjolowicz/nox-is-a-part-of-your-global-developer-environment-like-poetry-pre-commit-pyenv-or-pipx-1cdeba9198bd) if you're curious as to why we don't install nox via Poetry.\n\nInstall [pre-commit](https://pre-commit.com/)\n\n pip install --user --upgrade pre-commit\n\nLet Poetry install the rest from `pyproject.toml`\n\n poetry install\n\n### Testing\n\n[Coverage.py](https://coverage.readthedocs.io/en/7.2.2/) is used for test coverage, alongside [pytest](https://docs.pytest.org/en/7.2.x/), via the [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) plugin.\n\nTo run the tests directly, in you virtual environment, run `pytest --cov`.\n\nTo let nox run across multiple isolated environments, run `nox`.\n\nTo avoid nox recreating the virtual environments from scratch on each invocation, run `nox -r`.\n\nRun a specific test with `nox -s tests -- tests/test_TESTNAME`.\n\n### Static analysis\n\nAutoformatting is performed with [Black](https://github.com/psf/black).\n\nRun formatting with `nox -s black` or specify files/directors with `nox -s black -- file1 dir1 ...`.\n\nBlack auto-formatting is not run by default when running `nox` in isolation, it must be specified.\n\n[Flake8](https://flake8.pycqa.org/en/latest/) is used for linting. Under the hood, it uses:\n\n- [pylint](https://www.pylint.org/)\n- [pyflakes](https://github.com/PyCQA/pyflakes) - invalid python code\n - errors reported as `F`\n- [pycodestyle](https://github.com/pycqa/pycodestyle) - [PEP 8](https://peps.python.org/pep-0008/) style checking\n - `W` for warnings, `E` for errors\n- [mccabe](https://github.com/PyCQA/mccabe) - code complexity\n - errors reported as `C`.\n- [flake8-black](https://github.com/peterjc/flake8-black) plugin - adherence to Black code style\n - erros reported as `BLK`.\n- [flake8-import-order](https://github.com/PyCQA/flake8-import-order) plugin - import grouping and ordering checked against the [Google styleguide](https://google.github.io/styleguide/pyguide.html?showone=Imports_formatting#313-imports-formatting)\n - errors reported as `I`\n- [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) plugin - various miscellaneous bugs and design problems\n - likely bugs reported as `B`\n - opinionated bugs reported as `B9`\n - `B950` replaces `E501` for max line length checking (adds tolerance margin of 10%)\n- [flake8-bandit](https://github.com/tylerwince/flake8-bandit) plugin - uses [Bandit](https://github.com/PyCQA/bandit) to find common security issues\n - issues reported as `S`\n- [flake8-annotations](https://github.com/sco1/flake8-annotations) plugin - detects absence of type annotations for functions\n - issues reported as `ANN`\n\nAll of these are configured in the `.flake8` file.\n\nRun linting with `nox -s lint` or specify files/directoriess with `nox -s lint -- file1 dir1 ...`.\n\nImport ordering is not auto-formatted although may in the future by migrating to [flake8-isort](https://github.com/gforcada/flake8-isort).\n\n[Safety](https://github.com/pyupio/safety) is uesd for checking project dependencies against known security violations. For example, [insecure-package](https://pypi.org/project/insecure-package/).\n\nRun it with `nox -s safety`.\n\n#### Pre-commit\n\nIf you would like to enable the pre-commit hooks, run `pre-commit install`.\n\nThe hooks will run on files changed by the commit in question. To trigger hooks automatically run `pre-commit run --all-files`.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI helper for [Distributed-Something](https://github.com/DistributedScience/Distributed-Something)",
"version": "0.1.0",
"split_keywords": [
"distributed-something",
"distributedscience"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c7ce61eea119d174a74fb03c206b9a82835d8147841eb1e4392f656447f7417",
"md5": "ed0e7213d9714aaf8582d9f4a7b988f5",
"sha256": "4d0b0f98c877d1941aa8b54fbcdf34aed125b29e5ebb5b125c642681b862e2dc"
},
"downloads": -1,
"filename": "ds_reify-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ed0e7213d9714aaf8582d9f4a7b988f5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4.0.0",
"size": 6012,
"upload_time": "2023-03-20T12:35:46",
"upload_time_iso_8601": "2023-03-20T12:35:46.048303Z",
"url": "https://files.pythonhosted.org/packages/2c/7c/e61eea119d174a74fb03c206b9a82835d8147841eb1e4392f656447f7417/ds_reify-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a743997e9147ab5661980b2c3b944cc994510d38366fb055917606df51334705",
"md5": "432a8eaacb9f9c0c1f7b1bc2d4880d29",
"sha256": "69e85157810599b041f3ad4d76567693da6b4a730a8a711e48bc3e2c93ebd64f"
},
"downloads": -1,
"filename": "ds_reify-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "432a8eaacb9f9c0c1f7b1bc2d4880d29",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4.0.0",
"size": 5097,
"upload_time": "2023-03-20T12:35:47",
"upload_time_iso_8601": "2023-03-20T12:35:47.331839Z",
"url": "https://files.pythonhosted.org/packages/a7/43/997e9147ab5661980b2c3b944cc994510d38366fb055917606df51334705/ds_reify-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-20 12:35:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "ds-reify"
}