1
1
# Template for open-source Python projects
2
2
3
- ![ ] ( https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue )
3
+ ![ Python versions ] ( https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue )
4
4
![ Tests] ( https://github.com/marvinfriede/python-project/actions/workflows/test.yml/badge.svg )
5
5
[ ![ codecov] ( https://codecov.io/gh/marvinfriede/python-project/branch/master/graph/badge.svg?token=UEKDZY459S )] ( https://codecov.io/gh/marvinfriede/python-project )
6
6
[ ![ pre-commit.ci status] ( https://results.pre-commit.ci/badge/github/marvinfriede/python-project/master.svg )] ( https://results.pre-commit.ci/latest/github/marvinfriede/python-project/master )
@@ -12,6 +12,7 @@ This repository aims to provide a starting template for Python projects containi
12
12
I tried to incorporate most "best practices" but in the end, most of the design choices and tools are just personal preferences.
13
13
14
14
The following tools are used: black, codecov, pre-commit, pylint, pytest, pytest-cov, tox
15
+
15
16
<br >
16
17
17
18
## Source code
@@ -34,8 +35,8 @@ The [conftest.py](test/conftest.py) file is sort of a setup file that can be use
34
35
([ small example] ( https://github.com/tbmalt/tbmalt/blob/main/tests/conftest.py ) ) and setup code (fixtures) for all tests.
35
36
36
37
The test environment for pytest is setup with the ` setup.cfg ` and/or ` pyproject.toml ` file. ` tox ` needs extra configuration
37
- which can be found in the * deps * section of [ tox.ini] ( tox.ini ) . Some projects also use a ` requirements-tests.txt ` file that lists
38
- all test dependencies and is also given in the * deps * section with ` deps = -rrequirements-tests.txt ` .
38
+ which can be found in the _ deps _ section of [ tox.ini] ( tox.ini ) . Some projects also use a ` requirements-tests.txt ` file that lists
39
+ all test dependencies and is also given in the _ deps _ section with ` deps = -rrequirements-tests.txt ` .
39
40
Furthermore, to run pytest from tox, the ` commands ` section must be given. Here, additional options for the code coverage report
40
41
from the ` coverage ` tool are given.
41
42
@@ -49,7 +50,8 @@ test module. Before committing, however, it is a good idea to check if your code
49
50
time. Certain environments can be selected with ` tox -e py37 ` . Note that ` tox ` must be able to find a Python interpreter for
50
51
each version given in the envlist.
51
52
52
- <details ><summary >How to provide the Python interpreters for tox.</summary >
53
+ <details >
54
+ <summary >How to provide the Python interpreters for tox.</summary >
53
55
54
56
Unfortunately, this does not directly work with something like a conda environment but you can setup the environments and provide
55
57
a symlink to a directory which is in your path.
@@ -125,3 +127,6 @@ The package can be installed with `pip install .` or something like `pip install
125
127
126
128
[ pre-commit.ci] ( https://github.com/apps/pre-commit-ci/ )
127
129
[ codecov] ( https://github.com/apps/codecov/ )
130
+
131
+ [ gitignore] ( https://www.toptal.com/developers/gitignore )
132
+ [ choose-a-license] ( https://choosealicense.com/ )
0 commit comments