Skip to main content

Python Package Template

Project description

MPPT

A Modern Python Package Template

About

A Modern Python Package Template.

Features

  • Rye: Package Management
  • MkDocs: Documentation
  • Pre-Commit: Linters
  • Pytest: Testing
  • Codecov: Testing
  • Thu pypi source: China pypi source

Get Started

Step1: Create a repository by this template

  • Create & Clone

Step2: GitHub Configuration

  • Needed in building documentation site: Set the github action can write the repo
    • In the repository: Setting -> Actions -> Workflow permissions: Select Read and write permissions
  • Needed in package publishing: Set the pypi token PYPI_API_TOKEN
    • Login your pypi account: https://pypi.org/manage/account/
    • In pypi account Acount Setting -> API tokens: Select Add API token to generate the api token and COPY it!
    • In the GitHub repository: Setting -> Environments: Select New environments and create an environment named publish
    • In the publish environment add a secrets named with PYPI_API_TOKEN and set the value with the token
  • Needed in test coverage report generation: Set the codecov token CODECOV_TOKEN
    • Login your codecov account with GitHub: https://about.codecov.io/
    • In codecov account, select the repository and you'll see a page named Let's get your repo covered. Just COPY the token here.
    • In the GitHub repository: Setting -> Secrets and variables: Add a Repository secrets named CODECOV_TOKEN and set the value with the token

Step3: Rye installation & Configuration

Step4: Pre-Commit Configuration

  • Fellow the Quick start in https://pre-commit.com/
    • Because we have already installed the pre-commit by rye and have the .pre-commit-config.yaml file in our repo, so what we ONLY need to do is run pre-commit install to install the hooks
  • Run rye shell into the created python venv environment
  • Run pre-commit run -a to check all the files in the project

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mppt-0.1.1.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

mppt-0.1.1-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page