- Modern Python project structure with Pixi
- Built-in testing with pytest
- Code formatting and linting with Ruff
- Documentation with MkDocs and Quarto
- CLI tool integration with Typer
- Python >= 3.11
- Pixi package manager
- Clone the repository:
git clone https://github.com/eLearningHub/pixi-template.git
cd pixi-template
- Install dependencies using Pixi:
sudo apt-get install lmodern
curl -fsSL https://pixi.sh/install.sh | bash
pixi install
pixi run install-quarto-extensions
The project uses Quarto for documentation:
pixi run docs
There is also a shorter form:
pixi r docs
You can then find the project page and the arXiv article in the docs/_output
folder.
The project includes several predefined tasks that can be run using pixi run
:
-
test
: Run pytest test suitepixi run test
-
lint
: Check code with Ruffpixi run lint
-
format
: Format code with Ruffpixi run format
-
docs
: Build Quarto documentationpixi run docs
-
cli
: Run CLI toolpixi run cli
Tests are written using pytest. Run the test suite with:
pixi run test
Test configuration is specified in pyproject.toml
under [tool.pytest.ini_options]
.
This project uses Ruff for code formatting and linting:
- Line length is set to 100 characters
- Enforces import sorting
- Checks for common bugs and code smells
Format your code with:
pixi run format
Check for issues with:
pixi run lint
pixi-template/
├── src/
│ └── pixi_project/
│ └── cli.py
├── tests/
├── docs/
├── pyproject.toml
├── README.md
└── LICENSE
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a new branch for your feature
- Make your changes
- Run tests and linting
- Submit a pull request
We extend our heartfelt gratitude to the authors of Nerfies for generously open-sourcing their website template, which inspired this project’s design and functionality.
We also sincerely thank Michael J. Mahoney for creating and sharing the invaluable Quarto template for arXiv preprints.