Skip to content

This is pure python 3 template for new projects on github

License

Notifications You must be signed in to change notification settings

lidofinance/python-base-template

Repository files navigation

Lido Python template

License: MIT

General

This is pure python 3 template for new projects and bots on GitHub.

🚧 CI and deploy

After creating repo from the template make sure that you have correctly filled TARGET_WORKFLOW field in:

  • .github/workflows/ci-dev.yml
  • .github/workflows/ci-staging.yml
  • .github/workflows/ci-prod.yml

HOW TO USE THIS TEMPLATE

DO NOT FORK this is meant to be used from Use this template feature.

  1. Click on Use this template
  2. Give a name to your project
    (e.g. my_awesome_project recommendation is to use all lowercase and underscores separation for repository names.)
  3. Rename myproject to {your_project_name}
  4. Then clone your new project and happy coding!

Secrets

List of secrets that you should add to secrets

  • TARGET_REPO - Repository with our infra (lidofinance/infra-mainnet). This var need to run workflows from target repository.
  • APP_ID and APP_PRIVATE_KEY - are ID and key to application that calls workflows in another application.

What is included on this template?

  • 🐋 A simple Dockerfile to build a container image for your project.
  • 🧪 Testing structure using pytest.
  • 🔄 Continuous integration using GitHub Actions with jobs to lint, tests.
  • 🌊 Tracking and logging via Prometheus.
  • 🦸 Lint everything with lido linters.

Lido My Project

License: MIT

Myproject is a base template for all python project with preinstalled packages that are common for Lido's codebase.

How to install

  1. poetry install - to install dep

Usage

from myproject import BaseClass
from myproject import base_function

BaseClass().base_method()
base_function()
$ python -m myproject

Hello world!

Release flow

To create new release:

  1. Merge all changes to the main branch
  2. Navigate to Repo => Actions
  3. Run action "Prepare release" action against main branch
  4. When action execution is finished, navigate to Repo => Pull requests
  5. Find pull request named "chore(release): X.X.X" review and merge it with "Rebase and merge" (or "Squash and merge")
  6. After merge release action will be triggered automatically
  7. Navigate to Repo => Actions and see last actions logs for further details

About

This is pure python 3 template for new projects on github

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published