Skip to content

Latest commit

 

History

History
90 lines (70 loc) · 2.45 KB

CONTRIBUTING.md

File metadata and controls

90 lines (70 loc) · 2.45 KB

Contributing

Report Bugs and Submit Feedback

Report bugs at https://github.com/yt-project/jupyter_libyt/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Setting Up Development Environment

Fork and Clone the jupyter_libyt Repo

  1. Fork the jupyter_libyt repo on GitHub.
  2. Clone your fork locally:
git clone https://github.com/<your-github-account>/jupyter_libyt.git
  1. Create a branch for local development:
git checkout -b name-of-your-bugfix-or-feature

Using tox to Test, Do Code-Formatting, and Linting

We use tox to run:

  • Python unit test (pytest)
  • Converting old string to f-string (flynt)
  • Code formatting (black)
  • Sort import order (isort)
  • Linting (flake8)

Python Unit test

tox

Converting Old String to F-String

tox -e fstring

Code Formatting

tox -e format

Sort Import Order

tox -e sort_import

Linting

tox -e lint

Pre-Commit

We use pre-commit to check code format and style before committing:

  • Converting old string to f-string (flynt)
  • Code formatting (black)
  • Sort import order (isort)
  • Linting (flake8)

Set up pre-commit for the first time:

pre-commit install

Check every file:

pre-commit run --all-files

Commit your changes and push your branch to GitHub, pre-commit will apply to staged files before committing:

git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature