Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonboothroyd/python-template
A robust template for new python projects
https://github.com/simonboothroyd/python-template
Last synced: 25 days ago
JSON representation
A robust template for new python projects
- Host: GitHub
- URL: https://github.com/simonboothroyd/python-template
- Owner: SimonBoothroyd
- License: mit
- Created: 2024-01-18T13:58:58.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-20T12:06:07.000Z (12 months ago)
- Last Synced: 2024-01-20T13:24:45.504Z (12 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Template
An opinionated template for Python projects that was originally based on the fantastic
[MolSSI Cookiecutter template](https://github.com/MolSSI/cookiecutter-cms), but has
now diverged significantly.The template provides
- a basic python package project structure.
- a pre-commit configuration for linting and formatting using [`ruff`](https://github.com/astral-sh/ruff)
- a makefile with common commands, such as conda environment creation and linting.
- a GitHub Actions workflow for running tests and code coverage.
- automation to deploying documentation to GitHub Pages using GitHub Actions.
- simple GitHub issue / PR templates.## Usage
To create a project using this template, run
```shell
cookiecutter gh:SimonBoothroyd/python-template
```and follow the instructions.
Once created, a development conda environment can be created by running
```shell
make env
conda activate {{ package_name }}
```in the newly created project directory.
### GitHub Pages
To enable automatic deployment of documentation to GitHub Pages, you will need to
allow GitHub Actions to push to your repository. To do this, go to your repository's
settings page, and select `Actions -> General` from the left-hand menu. Then enable
`"Read and write permissions"` under `"Workflow permissions"`.You will also need to enable GitHub Pages for your repository. To do this, go to your
repository's settings page, and select `Pages` from the left-hand menu. Then under
`"Branch"`, select `gh-pages` and click `Save`.You will probably also want to commit an `index.html` file to your repository `gh-pages`
branch that redirects to the latest documentation:```html
Redirecting to latest documentation
If you are not redirected, click here to go to the latest documentation.
```