Skip to content

eLearningHub/academic-project-template

Repository files navigation

Academic Project Page and arXiv Article Template

Features

  • 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

Requirements

  • Python >= 3.11
  • Pixi package manager

Installation

  1. Clone the repository:
git clone https://github.com/eLearningHub/pixi-template.git
cd pixi-template
  1. Install dependencies using Pixi:
sudo apt-get install lmodern
curl -fsSL https://pixi.sh/install.sh | bash
pixi install
pixi run install-quarto-extensions

Documentation

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.

Development Tasks

The project includes several predefined tasks that can be run using pixi run:

  • test: Run pytest test suite

    pixi run test
  • lint: Check code with Ruff

    pixi run lint
  • format: Format code with Ruff

    pixi run format
  • docs: Build Quarto documentation

    pixi run docs
  • cli: Run CLI tool

    pixi run cli

Testing

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].

Code Style

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

Project Structure

pixi-template/
├── src/
│   └── pixi_project/
│       └── cli.py
├── tests/
├── docs/
├── pyproject.toml
├── README.md
└── LICENSE

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a new branch for your feature
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

Acknowledgements

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.

Contact

Behzad Samadi

Releases

No releases published

Packages

No packages published