Skip to content

A Python science project template with underlying development structure such as Python packaging and GitHub actions.

License

Notifications You must be signed in to change notification settings

Miladiouss/py-sci-proj-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Science Project Template

This is an example of a (mainly) Python repository that can be used for scientific software development.

Guides

GitHub

Actions

Github actions run on every push and they ensure that all coding standards are met and all tests passed.

  • Coding standards are based on Rubin: https://developer.lsst.io/python/style.html
    • .github/workflows/run_flake8.yaml is the GitHub action responsible for enforcing coding standards.
    • .github/workflows/run_pytest.yaml is the GitHub action for running unit tests.
  • scripts/run-integration-test.sh is responsible for running integration tests.

Use git for code only, not for data

git and GitHub are only intended to version control source code (text files). Do not version control *.jpeg or *.png images, *.pdf documents, or data that constantly changes and is only machine-readable; it would significantly slow down git and would use limited GitHub resources. In such circumstances, ignore non-textual files under .gitignore or use git lfs.

Installation

git clone https://github.com/Miladiouss/py-sci-proj-template.git
conda env create --name sci-proj-dev --file conda/environment.yaml
conda activate sci-proj-dev
pip install -e .

The above are the instructions for cloning this repository, setting up a conda environment from conda/environment.yaml, and installing the packages under py_src. The conda environment also includes scripts dependencies (in addition to the packaging requirements) while pure packaging requirements (excluding the script dependencies) are listed under setup.cfg. The setup.cfg file also includes packaging information, styling guidelines, package data, testing requirements and more. At the time of this writing, Python packaging is rapidly evolving and at the moment it is recommended that setup.py would remain as simple as possible while tabulating the setup requirements using a setup.cfg file.

Authors

  • Tatiana Goldina at Caltech > IPAC
  • Milad Pourrahmani at Caltech > IPAC

About

A Python science project template with underlying development structure such as Python packaging and GitHub actions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published