python-template

Python package template

https://github.com/gpauloski/python-template

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.5%) to scientific vocabulary

Keywords

python template
Last synced: 6 months ago · JSON representation ·

Repository

Python package template

Basic Info
Statistics
  • Stars: 16
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Topics
python template
Created almost 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation Security

README.md

Python Package Template Repo

docs tests pre-commit.ci status

Python package template repo that provides: - Package, examples, and testing layout. - GitHub PR and Issue templates. - Example docs with MKDocs and GitHub Pages. - CI framework with pre-commit and tox. - GitHub actions for running tests and publishing packages.

This package setup was based on Anthony Sottile's project setup but deviates in some places (e.g., pyproject.toml and ruff).

Setup Instructions

  1. Click the "Use this template" button at the top right of this page.
  2. Delete and directories you will not be using (commonly docs/ if you do not want to use MKDocs or examples/ if you will not have example code).
  3. Follow the instructions to create the new repo then clone your repo locally.
  4. The template uses "foobar" to indicate things that need to be changed. Start by searching for all instances (git grep foobar) and changing them accordingly.
  5. Configure pre-commit:
    • Go to https://pre-commit.ci/ and enable pre-commit on your repo.
    • Update the pre-commit badge URL in this README with your new badge URL.
  6. Configure GitHub pages:
    • Go to the "Pages" section of your repository settings.
    • Select "Deploy from a branch" and use the "gh-pages" branch.
  7. Configure PyPI releases (if relevant):
    • Create a new API token for https://pypi.org/.
    • Add the token as a GitHub actions secret (see the instructions here).
  8. Delete this boilerplate stuff in the README.
  9. Commit and push changes.

GitHub Configuration

I recommend making a few other changes to the repo's setting on GitHub. - In "General" - Select/deselect features you need/don't need. - Select "Automatically delete head branches - In "Branches": enable branch protection on main. - Check "Require a pull request before merging" - Check "Require status checks to pass before merging" - Check "Require branches to be up to date before merging" - Set required checks (e.g., pre-commit.ci, tests, etc.) - Check "Do not allow bypassing the above settings"

Installation

Install via pip: $ pip install foobar

For local development: $ tox --devenv venv -e py310 $ pre-commit install or $ pip install -e .

Additional README Sections

...

Owner

  • Name: Greg Pauloski
  • Login: gpauloski
  • Kind: user
  • Company: University of Chicago

Computer Science Ph.D. Student at UChicago. Interested in systems for ML and HPC.

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it as below.
authors:
  - family-names: Pauloski
    given-names: Greg
    orcid: https://orcid.org/0000-0002-6547-6902
license: MIT
repository-code: https://github.com/foobar-author/foobar
title: FooBar
url: https://foobar.dev

GitHub Events

Total
  • Watch event: 6
  • Delete event: 38
  • Push event: 73
  • Pull request event: 76
  • Create event: 36
Last Year
  • Watch event: 6
  • Delete event: 38
  • Push event: 73
  • Pull request event: 76
  • Create event: 36

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 29
  • Average time to close issues: N/A
  • Average time to close pull requests: about 14 hours
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 27
Past Year
  • Issues: 0
  • Pull requests: 29
  • Average time to close issues: N/A
  • Average time to close pull requests: about 14 hours
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 27
Top Authors
Issue Authors
  • braceal (1)
  • pre-commit-ci[bot] (1)
Pull Request Authors
  • pre-commit-ci[bot] (67)
  • gpauloski (7)
  • dependabot[bot] (2)
Top Labels
Issue Labels
documentation (1)
Pull Request Labels
dependencies (3) documentation (2) github_actions (1) bug (1)

Dependencies

docs/requirements.txt pypi
  • sphinx *
  • sphinx_rtd_theme *
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/tests.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
  • importlib-metadata python_version<'3.8'
  • requests *