Skip to content

Latest commit

 

History

History
107 lines (71 loc) · 3.18 KB

development.rst

File metadata and controls

107 lines (71 loc) · 3.18 KB

For Developers

Install as Developer

Contributions to the package's development must be compatible with Python 3.8+ and debian-based Linux distros. It is strongly recommended to use the provided Makefile to duplicate workflows.

Install with development dependencies:

git clone https://github.com/gampnico/scintillometry.git
make install-dev

If conda is unavailable:

git clone https://github.com/gampnico/scintillometry.git
pip install -e .[dev]

With Python 3.9+, optionally install Scalene to profile your code.

Contribution Guidelines

Follow Git-Flow where possible, but please feel free to create feature branches that branch off from develop.

Prefix branches with feat-, feature-, or hotfix-, followed by the issue number and a description, e.g. feat-I3-description.

Avoid excess conflicts by following these guidelines:

  • Write commit messages in the style of conventional commits.
  • Write tests before committing features.
  • Push many small commits instead of a single large one.
  • Push new features to develop. Never push to main.
  • Push documentation separately. Don't push built documentation.
  • Follow the Google Style Guide.
  • Format all code with black, line length 88.
  • Format docstrings with line length 72.
  • Format .rst files with 3-space indents, line length 80.
  • Break lines in Markdown only at the end of paragraphs.
  • Spaces, not tabs.

Before Committing

Please use the provided rc files for pylint and coverage. Ensure any changes are covered by a relevant test. Always format and run tests with Python 3.8 before committing:

make tests

Tests can take a couple of minutes to run.

After adding changes with git add, run:

make commit

This formats code and runs tests before launching the commit dialogue. Write a useful commit message:

feat(backend): compute bar with function foo

Adds function foo that does bar.

Begins:
        #ABC: select input for foo via cli
        #DEF: fix bug in foo

Refs: #ABC, #DEF, #XYZ, ...

Finally push to the appropriate branch.