https://github.com/qualisystems/cloudshell-cp-packet
https://github.com/qualisystems/cloudshell-cp-packet
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/qualisystems/cloudshell-cp-packet
- Owner: QualiSystems
- Created: 2020-10-11T11:53:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-11T11:53:21.000Z (over 5 years ago)
- Last Synced: 2025-03-03T14:47:25.396Z (over 1 year ago)
- Size: 0 Bytes
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CloudShell package repo template
[](https://travis-ci.org/QualiSystems/cloudshell-package-repo-template)
[](https://codecov.io/gh/QualiSystems/cloudshell-package-repo-template)
[](https://badge.fury.io/py/cloudshell-package-repo-template)
[](https://github.com/python/black)
Use this template to create new shell packages.
## Description of services
### tox
[tox](https://pypi.org/project/tox/) is an open source tool we use to run tests in multiple virtual environments.
* To run all tests described in tox.ini, just run `tox`.
* To run a particular env use `tox -e env_name`.
### pre-commit
[pre-commit](https://pypi.org/project/pre-commit/) is an open source library we use to manage pre-commit hooks.
* Run all code linters with a command `pre-commit run --all-files`.
* Add git hook with command `pre-commit install`.
* To update versions of pre-commit hooks in config file run `pre-commit autoupdate`
We use these hooks:
* **isort** sorts imports (config in tox.ini)
* **black** reformats code to one style (config in pyproject.toml)
* **flake8** checks code style (config in tox.ini). We use these plugins:
* `flake8-docstring` to check docstrings
* `flake8-builtins` to avoid using builtins as variable names
* `flake8-comprehensions` to check list/dict comprehensions
* `flake8-print` to ensure we don't leave prints in the code
* `flake8-eradicate` to ensure we don't leave commented lines in the code
## Installation
### tox.ini
* Set the `package-name` var regarding your package.
* Set the python version in envlist.
### .travis.yml
* Set the python version regarding tox.ini.
### pyproject.toml
* Set the python version for black.
### setup.py
* Set a name and description for the package.
* Set the python version of the shell.
### README.md
* Update links for build, coverage etc.
* Add the line to README
We use tox and pre-commit for testing. [Services description](https://github.com/QualiSystems/cloudshell-package-repo-template#description-of-services)