GithubHelp home page GithubHelp logo

tsuyama1990 / poetry_template_original Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imperialcollegelondon/poetry_template_2

0.0 0.0 0.0 106 KB

Template for a poetry-based project without docs and license information

Python 100.00%

poetry_template_original's Introduction

Poetry Template

Test and build

This is a minimal Python 3.12 application that uses poetry for packaging and dependency management. It also provides pre-commit hooks (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.

Usage

To use this repository as a template for your own application:

  1. Download and install Poetry following the instructions for your OS.

  2. Click the green "Use this template" button above

  3. Name and create your repository

  4. Clone your new repository and make it your working directory

  5. Replace instances of myproject with your own application name. Edit:

    • pyproject.toml
    • tests/test_myproject.py
    • Rename myproject directory
  6. Set up the virtual environment:

    poetry install
  7. Activate the virtual environment (alternatively, ensure any python-related command is preceded by poetry run):

    poetry shell
  8. Install the git hooks:

    pre-commit install
  9. Run the main app:

    python -m myproject
  10. Run the tests:

    pytest

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 (ie. publishing a Docker image, publishing to PyPI, deploying documentation etc.)

poetry_template_original's People

Contributors

dalonsoa avatar alexdewar avatar dependabot[bot] avatar adriandalessandro avatar tsmbland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.