This template helps you start Python projects and complete EpicLaunchX tasks. Just follow the steps below!
Note: You do not need to fork this repository. You have been added as a collaborator, so please work directly in this repo and create your branches here.
This cheat sheet summarizes the required branch naming, commit message, PR, and code quality conventions for this project. Following these standards is essential for your work to be accepted!
Recommended! For the easiest and most reliable onboarding, use GitHub Codespaces for a one-click, cloud-based development environment. This is the preferred way to do tasks in this project.
Just click the "Code" button at the top of this repository and select "Create codespace on main". All dependencies and tools will be set up automatically!
Note: If you use GitHub Codespaces (preferred), some of these steps are handled automatically and can be skipped (e.g., environment setup and dependency installation).
- Accept the invitation for being a collaborator in this repo
- Clone the repo (Codespaces: done for you)
- Create and activate virtualenv (Codespaces: done for you)
- Install dependencies (Codespaces: done for you)
- Implement your first task
- Run tests
- Open your first Pull Request (pass all checks and earn points upon successful Merge)
If you get stuck, jump in to our Discord
-
Clone the repository
git clone <your-repo-url> cd <your-repo-name>
-
Create a virtual environment
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
make install-flit make install-dev
-
Activate pre-commit hooks
make enable-pre-commit-hooks
-
Run tests
make test
If you are on Windows and can't use make
, you have two options:
- Recommended: Use WSL or Git Bash to run Makefile commands.
- Manual: Run the equivalent Python commands below:
Make Command | Manual Command(s) |
---|---|
make install-flit | python -m pip install flit==3.8.0 |
make install-dev | python -m flit install -s --env --deps=develop --symlink |
make test | python -m pytest -svvv -m "not slow and not integration" tests |
make format | see Makefile |
If you get stuck, ask for help in our Discord!
src/
pytemplate/
... # Layers of the application (domain, service, etc.)
tests/ # Add your tests here
Makefile # Common commands (install, run, test, lint, etc.)
.pre-commit-config.yaml # Pre-commit hooks for code quality
pyproject.toml # Project configuration and dependencies
- Modern Python packaging with flit
- Pre-configured code quality tools: black, isort, flake8, bandit, pytype
- Easy testing with pytest
- Pre-commit hooks for consistent code style
- Makefile for common developer tasks
- Edit your code in
src/pytemplate/
. - Add tests in
tests/
. - Use
make format
andmake lint
to keep your code clean. - Commit with confidence—pre-commit hooks will check your code!
Q: I get an error about flit not found!
A: Run make install-flit
first.
Q: How do I add a new dependency?
A: Add it to pyproject.toml
under [project.dependencies]
and run make install-dev
.
Q: How do I run a specific test?
A: Use pytest tests/test_yourfile.py::test_function_name
.