Git Product home page Git Product logo

cookie's Introduction

Cookiecutter Template

Cookiecutter is command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python package project template.

PDM

This cookie assumes that you've installed PDM via these instructions

The post_gen_project.sh hook can be modified to install PDM in virtual environment via pip, if desired (though not recommended).

Included Tools

Function Tool Link
Dependency management PDM https://pdm.fming.dev/latest/
Documentation MkDocs https://www.mkdocs.org/
Documentation: theme Material for MkDocs https://squidfunk.github.io/mkdocs-material/
Documentation: auto docstrings mkdocstrings-python https://mkdocstrings.github.io/python/
Automated testing Nox https://nox.thea.codes/en/stable/index.html
Testing pytest https://docs.pytest.org/en/7.3.x/
Linting ruff https://beta.ruff.rs/docs/
Type checking Pyright https://microsoft.github.io/pyright/#/
Formatting Black https://black.readthedocs.io/en/stable/
Automated QA pre-commit https://pre-commit.com/
QA isort https://pycqa.github.io/isort/
QA check-manifest https://github.com/mgedmin/check-manifest
Linting SQLFluff https://www.sqlfluff.com/
Documentation: Build and publish GitHub Actions https://docs.github.com/en/actions
PyPI: Publish GitHub Actions https://docs.github.com/en/actions

Getting Started

Using a Python environment with cookiecutter installed, run:

cookiecutter https://github.cloud.capitalone.com/lno127/cookie.git

and complete the prompts.

cd <your project dir>
conda env create -f environment.yml
conda activate <your env name>
pdm install
git init
pre-commit install

This cookie executes a post-generation script (hooks/post_gen_project.sh) that will:

1. Create a virtual environment via Conda 2. Install all development dependencies in your virtual environment 3. Install your project (editable) in your virtual environment 4. Initialize a git repo in your new project directory 5. Install pre-commit in your repo

PDM Quickstart

As installed via this cookie, PDM will automatically detect the Conda virtual environment and operate within. See Working with Virtual Environments for other options.

Here are a few commands to get you started. For much more, see the CLI Reference or Manage Dependencies guide.

Add a required dependency

pdm add <package>

Example: pdm add numpy

Add a development dependency

pdm add -d <package>

Example: pdm add -d flake8

Add a development dependency into a specific group

pdm add -dG <group name> <package>

Example: pdm add -dG qa flake8

List Dependencies

pdm list

List Dependencies as Graph

pdm list --graph

Export Dependencies

pdm export -o requirements.txt

cookie's People

Contributors

chris-santiago avatar

Stargazers

 avatar  avatar

Watchers

 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.