Repo for testing different stuff with open source python repos. This project is under GPL-3.0 License even if the LICENSE file shows another license because of tests.
create repo and cd into:
$ git clone xxx $ cd xxx
add basic files:
$ touch .gitignore $ touch .gitattributes $ touch LICENSE.rst $ touch README.rst $ touch CHANGELOG.rst
create venv and activate it:
$ python3 -m venv venv $ . venv/bin/activate
update pip, setuptools:
$ pip install -U pip setuptools
open in pycharm and setup venv as interpreter
- setup docs
- Badges for docs:
- License
- Version
- Travis (https://travis-ci.com/)
- Coverage (https://coveralls.io/)
- Docs (RtD)
- Black
$ pip install sphinx $ mkdir docs && pushd docs $ sphinx-quickstart $ make html $ popd $ touch .readthedocs.yaml
setup tests:
$ pip install pytest $ mkdir tests && pushd tests $ touch conftest.py $ popd $ touch pytest.ini
- setup tox
- tox:
- flake8
- pylint
- black
- isort
- coverage
- docs
- pytest
$ touch tox.ini
setup travis-ci:
$ touch .travis.yml
setup setup:
$ touch setup.py '''add stuff to setup.py''' $ pip install -e .
TODO:
badges:
pre-commit
appveyor a
bla bla bla
commit-msg hook for jira issue verification with pre-commit.
See also: https://github.com/pre-commit/pre-commit
Add this to your .pre-commit-config.yaml
:
- repo: https://github.com/Cielquan/commit-msg-jira-hook
rev: v0.1.0 # Use the ref you want to point at
hooks:
- id: jira_commit_msg
stages: [commit-msg]
Then add a jira.ini
to you projects root directory with following data:
[jira]
JIRA_URL = e.g. https://jira.atlassian.com
JIRA_TAG = tag
JIRA_USERNAME = email
JIRA_TOKEN = api-token
Lastly install the hook:
$ pre-commit install -t commit-msg