https://github.com/imperialcollegelondon/pip-tools-template
Template for a pip-tools-based python project without docs and license information
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 7 committers (28.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Keywords from Contributors
Repository
Template for a pip-tools-based python project without docs and license information
Basic Info
- Host: GitHub
- Owner: ImperialCollegeLondon
- Language: Python
- Default Branch: main
- Size: 376 KB
Statistics
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
pip-tools Template
This is a minimal Python 3.12 application that uses pip-tools for packaging and dependency management. It also provides pre-commit hooks (for for ruff and mypy) and automated tests using pytest and GitHub Actions. Pre-commit hooks are automatically kept updated with a dedicated GitHub Action, this can be removed and replace with pre-commit.ci if using an public repo. It was developed by the Imperial College Research Computing Service.
pip-tools is chosen as a lightweight dependency manager that adheres to the latest standards using pyproject.toml.
Usage
To use this repository as a template for your own application:
- Click the green "Use this template" button above
- Name and create your repository
- Clone your new repository and make it your working directory
- Replace instances of
myprojectwith your own application name. Edit:pyproject.toml(also change the list of authors here)tests/test_myproject.py- Rename
myprojectdirectory
- Create and activate a Virtual Environment:
bash
python -m venv .venv
source .venv/bin/activate # with Powershell on Windows: `.venv\Scripts\Activate.ps1`
- Install development requirements:
bash
pip install -r dev-requirements.txt
- Install the git hooks:
bash
pre-commit install
- Run the main app:
bash
python -m myproject
- Run the tests:
bash
pytest
Updating Dependencies
To add or remove dependencies:
- Edit the
dependenciesvariables in thepyproject.tomlfile (aim to keep develpment tools separate from the project requirements). - Update the requirements files:
pip-compileforrequirements.txt- the project requirements.pip-compile --extra dev -o dev-requirements.txtfordev-requirements.txt- the development requirements.
- Sync the files with your installation (install packages):
pip-sync dev-requirements.txt requirements.txt
To upgrade pinned versions, use the --upgrade flag with pip-compile.
Versions can be restricted from updating within the pyproject.toml using standard python package version specifiers, i.e. "black<23" or "pip-tools!=6.12.2"
Customising
All configuration can be customised to your preferences. The key places to make changes for this are:
- The
pyproject.tomlfile, where you can edit: - The
.pre-commit-config.yamlfor pre-commit settings. - The
.githubdirectory for all the CI configuration.- This repo uses
pre-commit.cito update pre-commit package versions and automatically merges those PRs with theauto-merge.ymlworkflow. - Note that
pre-commit.ciis an external service and free for open source repos. For private repos uncomment the commented portion of thepre-commit_autoupdate.ymlworkflow.
- This repo uses
Publishing
The GitHub workflow includes an action to publish on release.
To run this action, uncomment the commented portion of publish.yml, and modify the steps for the desired behaviour (publishing a Docker image, publishing to PyPI, deploying documentation etc.)
Owner
- Name: Imperial College London
- Login: ImperialCollegeLondon
- Kind: organization
- Email: icgithub-support@imperial.ac.uk
- Location: Imperial College London
- Repositories: 311
- Profile: https://github.com/ImperialCollegeLondon
Imperial College main code repository
GitHub Events
Total
- Watch event: 2
- Delete event: 33
- Push event: 32
- Pull request event: 67
- Create event: 33
Last Year
- Watch event: 2
- Delete event: 33
- Push event: 32
- Pull request event: 67
- Create event: 33
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| dependabot[bot] | 4****] | 63 |
| pre-commit-ci[bot] | 6****] | 22 |
| Adrian D'Alessandro | a****o@i****k | 20 |
| Diego Alonso Álvarez | 6****a | 5 |
| AdrianDAlessandro | A****o | 4 |
| Alex Dewar | a****r@i****k | 3 |
| Tom Bland | t****d@h****k | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 3
- Total pull requests: 204
- Average time to close issues: 10 days
- Average time to close pull requests: 1 day
- Total issue authors: 2
- Total pull request authors: 8
- Average comments per issue: 0.67
- Average comments per pull request: 0.11
- Merged pull requests: 194
- Bot issues: 0
- Bot pull requests: 189
Past Year
- Issues: 0
- Pull requests: 39
- Average time to close issues: N/A
- Average time to close pull requests: 1 minute
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 39
- Bot issues: 0
- Bot pull requests: 39
Top Authors
Issue Authors
- AdrianDAlessandro (2)
- barneydobson (1)
Pull Request Authors
- dependabot[bot] (167)
- pre-commit-ci[bot] (99)
- AdrianDAlessandro (6)
- tsmbland (6)
- github-actions[bot] (5)
- alexdewar (4)
- dalonsoa (3)
- cc-a (1)