|
2 | 2 |
|
3 | 3 | This is a template repository for any Python project that comes with the following dev tools:
|
4 | 4 |
|
5 |
| -* black: auto-formats code |
6 |
| -* isort: sorts the imports |
7 |
| -* flake8: looks for common errors |
8 |
| -* pyupgrade: upgrades Python syntax |
| 5 | +* `black`: auto-formats code |
| 6 | +* `isort`: sorts the imports |
| 7 | +* `flake8`: looks for common errors |
| 8 | +* `pyupgrade`: upgrades Python syntax |
9 | 9 |
|
10 | 10 | All of those checks are run as pre-commit hooks using the `pre-commit` library.
|
11 | 11 |
|
@@ -51,6 +51,29 @@ When you're ready to run tests, just run:
|
51 | 51 | pytest
|
52 | 52 | ```
|
53 | 53 |
|
54 |
| -### 🔎 Found an issue or have an idea for improvement? |
| 54 | +# File breakdown |
| 55 | + |
| 56 | +Here's a short explanation of each file/folder in this template: |
| 57 | + |
| 58 | +* `.devcontainer`: Folder containing files used for setting up a devcontainer |
| 59 | + * `devcontainer.json`: File configuring the devcontainer, includes VS Code settings |
| 60 | + * `Dockerfile`: File with commands to build the devcontainer's Docker image |
| 61 | +* `.github`: Folder for Github-specific files and folders |
| 62 | + * `workflows`: Folder containing Github actions config files |
| 63 | + * `python.yaml`: File configuring Github action that runs tools and tests |
| 64 | +* `tests`: Folder containing Python tests |
| 65 | + * `main_test.py`: File with pytest-style tests of main.py |
| 66 | +* `.flake8`: File configuring the flake8 tool |
| 67 | +* `.gitignore`: File describing what file patterns Git should never track |
| 68 | +* `.pre-commit-config.yaml`: File listing all the pre-commit hooks and args |
| 69 | +* `main.py`: The main (and currently only) Python file for the program |
| 70 | +* `pyproject.toml`: File configuring most of the Python dev tools |
| 71 | +* `README.md`: You're reading it! |
| 72 | +* `requirements-dev.txt`: File listing all PyPi packages required for development |
| 73 | +* `requirements.txt`: File listing all PyPi packages required for production |
| 74 | + |
| 75 | +For a longer explanation, read [this blog post](http://blog.pamelafox.org/2022/09/how-i-setup-python-project.html). |
| 76 | + |
| 77 | +# 🔎 Found an issue or have an idea for improvement? |
55 | 78 |
|
56 | 79 | Help me make this template repository better by letting us know and opening an issue!
|
0 commit comments