Skip to content

Commit c04c75f

Browse files
Adds Project Manager Samples
1 parent d0762d4 commit c04c75f

3 files changed

Lines changed: 49 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ It is *installed* by running `pre-commit install` and can be run manually by cal
8585
- `isort`: Runs ISort.
8686
- `flake8`: Runs flake8.
8787

88-
The last two hooks won't ship with their own environment but will rather run shell commands. You will have to modify them if you change your dependency manager.
89-
9088
## How do I use it?
9189

9290
### Creating your Team Repository
@@ -168,7 +166,8 @@ Once the environment is activated, all the commands listed previously should wor
168166

169167
If you wish to use Pipenv or Poetry, you will have to move the dependencies in `dev-requirements.txt` to the development dependencies of your tool.
170168

171-
Additionally, you will have to open `.pre-commit-config.yaml` and `.github/workflows/lint.yaml` and uncomment the right section.
169+
We've included a porting of `dev-requirements.txt` to both [poetry](./samples/pyproject.toml) and [pipenv](./samples/Pipfile) in the [samples folder](./samples).
170+
If you use the poetry setup, make sure to change the project name, description, and authors at the top of the file.
172171

173172
When installing new dependencies, don't forget to [pin them](https://pip.pypa.io/en/stable/user_guide/#pinned-version-numbers) by adding a version tag at the end.
174173
For example, if I wish to install `Click`, a quick look at [PyPI](https://pypi.org/project/click/) tells me that 8.0.1 is the latest version.

samples/Pipfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
8+
[dev-packages]
9+
# Base tools
10+
flake8 = "~=3.7"
11+
isort = "~=5.9"
12+
pre-commit = "~=2.13.0"
13+
14+
# Flake8 plugins, see https://github.com/python-discord/code-jam-template/tree/main#plugin-list
15+
flake8-annotations = "~=2.0"
16+
flake8-bandit = "~=2.1"
17+
flake8-docstrings = "~=1.5"
18+
flake8-isort = "~=4.0"
19+
20+
[requires]
21+
python_version = "3.9"

samples/pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.poetry]
2+
name = "Name"
3+
version = "0.1.0"
4+
description = ""
5+
authors = ["Author 1 <email@mail.com>"]
6+
license = "MIT"
7+
8+
[tool.poetry.dependencies]
9+
python = "3.9.*"
10+
11+
[tool.poetry.dev-dependencies]
12+
# Base tools
13+
flake8 = "~3.7"
14+
isort = "~5.9"
15+
pre-commit = "~2.13.0"
16+
17+
# Flake8 plugins, see https://github.com/python-discord/code-jam-template/tree/main#plugin-list
18+
flake8-annotations = "~2.0"
19+
flake8-bandit = "~2.1"
20+
flake8-docstrings = "~1.5"
21+
flake8-isort = "~4.0"
22+
23+
24+
[build-system]
25+
requires = ["poetry-core>=1.0.0"]
26+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)