Git Product home page Git Product logo

dotlas / cookiecutter-pypackage Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 0.0 125 KB

๐Ÿ‘ท๐Ÿพโ€โ™€๏ธ A cookiecutter template for modern python projects. Supports pnpm, conventional commits, git hooks, linters and more.

License: BSD 3-Clause "New" or "Revised" License

Shell 11.10% Python 86.54% JavaScript 2.36%
cookiecutter-python3 cookiecutter-template dotlas pnpm template conventional-commits docs-generator mkdocs-material pre-commit python

cookiecutter-pypackage's Introduction

๐Ÿฅ  Cookiecutter Template for Modern Python Package Projects ๐Ÿ

A package template that comes pre-configured with pre-commit, conventional-commits, mkdocs docs generation and hosting, linting frameworks and a unit testing suite out-of-the-box for better python project development.

About

Cookiecutter templates enables developers and data scientists to create projects from a predefined template. This template is a modern Python package project structure that utilizes a number of tools to automate and align with best practices in order to have smoother development. The project template can be viewed from the structure document. The template creates a project that can be hosted on GitHub and deployed to PyPI.

This template uses husky, commitlint and pre-commit managed by pnpm to use git hooks to automate tasks such as linting, formatting, testing, etc. before a commit is made. This ensures that the code is always in a consistent state and that the commit history is clean and easy to read. The commit messages are also linted to ensure that they follow the Conventional Commits specification.

mkdocs is used to generate a static site for documentation of the project from the docs folder. This is hosted on GitHub Pages through a GitHub Action in .github. The site is automatically built and deployed on every push to the main branch. Mkdocs Material is used as the theme for the documentation site.

This project is primarily built for .vscode but can be used with other editors as well. The .vscode folder contains a number of settings and extensions that are recommended for the project. These are automatically installed when the project is opened in VS Code.

Code style: black

This project uses Pytest as a testing framework with code coverage. A number of python linters are configured to run through pyproject.toml.


  • โ‰๏ธ Helper Resources for more information on choice of tools and how to use them.
  • ๐ŸŽ‹ Project structure for more information on the project structure.

๐Ÿช Setup

  • Clone the repository

    git clone https://github.com/dotlas/cookiecutter-pypackage
    cd cookiecutter-template
  • Initialize base conda environment for cookiecutter dependencies and install requirements

    Developers @Dotlas can directly use the dotlas environment instead of base

    conda activate base
    python -m pip install -r requirements.txt

๐Ÿงฐ Usage

Run the following command to create a new project:

cookiecutter .

Or use directly from source:

cookiecutter gh:dotlas/cookiecutter-pypackage

cookiecutter-pypackage's People

Contributors

cricksmaidiene avatar kelvindecosta avatar pranavsrikanth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cookiecutter-pypackage's Issues

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.