Code Monkey home page Code Monkey logo

cookiecutter-pcds-python's Introduction

PCDS Python Cookiecutter

A project template for python projects in the Photon Controls and Data Systems Department (PCDS). However, in principle, there is no reason it cannot be used for projects outside PCDS. To learn more about cookiecutter:

Requirements for the Template

  • Python >= 3.5
  • Cookiecutter Python package >= 1.4.0: This can be installed with pip by or conda depending on how you manage your Python packages:
$ pip install cookiecutter

or :

$ conda install cookiecutter -c conda-forge

Starting a New Project

If using for the first time or in need of a new clone: :

$ cookiecutter https://github.com/pcdshub/cookiecutter-pcds-python

or :

$ cookiecutter gh:pcdshub/cookiecutter-pcds-python

Otherwise: :

$ cookiecutter cookiecutter-pcds-python

Configuring a New Project

setuptools-scm automatically configures versioning for you, with no setup steps required - when using pip.

Documentation generation and deployment requires only some repository settings configuration. See here for more information: https://confluence.slac.stanford.edu/display/PCDS/Using+GitHub+Actions

Resulting Directory Structure

The directory structure of your new project looks like this:

├── .github/             <- GitHub templates and workflow settings
│
├── {{ import_name }}    <- Source code for use in this project.
│   │
│   ├── __init__.py      <- Init file for the project
│   │
│   └── tests            <- Tests for the module
│       │
│       ├── __init__.py  <- Init file for the tests
│       │
│       └── conftest.py  <- Pytest conftest file
│
├── docs                 <- A default Sphinx project; see sphinx-doc.org for details
│
├── dev-requirements.txt <- Requirements to develop and test the package
│
├── docs-requirements.txt <- Requirements to make the sphinx documentation
│
├── .gitignore           <- Gitignore for the repo
│
├── .logging.yml         <- Yaml configuration for Python logging
│
├── LICENSE              <- License for the project
│
├── MANIFEST.in          <- setup.py manifest of files
│
├── README.rst           <- The top-level README for developers using this project
│
├── requirements.txt     <- The requirements to install the project.
│
├── run_tests.py         <- Script that runs the files in the tests directory

Installing Development Requirements

$ pip install -Ur requirements.txt
$ pip install -Ur dev-requirements.txt
$ pip install -Ur docs-requirements.txt

cookiecutter-pcds-python's People

Contributors

klauer avatar n-wbrown avatar tangkong avatar zllentz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cookiecutter-pcds-python's Issues

Conda Recipe

  • Create base conda-recipe
  • Update Travis to use the conda-recipe
  • Upload packages to pcds-tag

Remove tests from this repo?

Or at least modify them.

No idea... I think that the tests also can go away here... while reading them it looks like it is testing cookiecutter more than the product of this cookiecutter template...
I'm not sure if we need the tests here.

Originally posted by @hhslepicka in #23 (comment)

Warning on clone

I get the following warning which is slightly annoying on a clone of this repository

}}/_version.py is not a valid attribute name: {{ cookiecutter.folder_name }}/.gitattributes:1

Add checklists to Pull Request template

Current Behavior

Add standard checklist:

## Pre-merge checklist
- [ ] Code works interactively
- [ ] Code contains descriptive docstrings, including context and API
- [ ] New/changed functions and methods are covered in the test suite where possible
- [ ] Test suite passes locally
- [ ] Test suite passes on GitHub Actions

Suggest also adding "follows PCDS style guide" as users have reported not knowing about it

README badge for GitHub Actions status

Current Behavior

The badge for Travis CI was removed in #38

Possible Solution

We should probably add a new badge for GitHub Actions
Look into the URL that'll work for it

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.