ISISComputingGroup / ISISComputingGroup/IBEX
Set up python `copier` template for python repositories
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 6
- Fork
- 2
- Merge medio
- 16h 40m
- PR unite (30g)
- 2
Descrizione
We have a number of python repositories that use many common components, e.g.
- `pyproject.toml` metadata
- Github actions CI setup including dependabot
- `ruff` & `pyright` or `ty` configuration
- `pytest` + coverage configuration
- Docs/sphinx boilerplate configuration
- Github releases
- Optional `pypi` publishing
- License
Examples include `ibex_bluesky_core`, `genie`, `lewis`, `fastcs-secop`, `IBEX-device-generator` (currently a bit different, can be made consistent), `saluki`, and others.
As a developer I would like it to be easier to:
- Set up a new python project, following modern best-practices - i.e. in approximately the shape of the repositories above, with GHA, docs, tests, linting, releases all configured
- Update to newer best-practices across all python repos, as and when we choose to use different tools for linting/ci/docs/building etc
- But still allow each project to make local modifications to it's local configuration as makes sense for that specific project
A common tool for this in python is [copier](https://copier.readthedocs.io/en/stable/), see the following repositories for Diamond and ESS example templates using this tool:
- https://github.com/diamondLightSource/python-copier-template
- https://github.com/scipp/copier_template
Our "template structure" should look roughly like this: https://github.com/ISISComputingGroup/kafka_dae_diagnostics/commit/f716e5b85cdd21d941a6c585e326c72b168eb567 (but don't just _blindly_ copy that commit - there'll be a few things we want to adjust).
Copier "questions" to include:
- Repo/project name
- module name
- Whether to publish to pypi
- Docs theme colour
- CI (windows only / linux only / windows + linux)
- choice of `pyright` or `ty` for type-checking
### Acceptance criteria
- "Copier" template set up for our repository shape and our team's current practices, to make it easier to create new python projects and update the repository setup of existing projects as and when best practices change
- Document how to use it, either in the copier template repo itself, and/or in the dev wiki
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Esamina i pattern comuni relativi a pyproject.toml, GitHub Actions, Dependabot, documentazione, test, release e pubblicazione nei repository di esempio elencati, quindi confrontali con gli esempi di copier e il commit sulla struttura del template indicati. Il lavoro è completato quando un template copier supporta le domande elencate, riflette le pratiche attuali del team e include la documentazione d’uso per creare e aggiornare i repository.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github-actions, python
- Ambito
- ci-cd, documentation, release, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100