Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] CI and precommit hooks #1

Closed
wants to merge 6 commits into from

Conversation

luizirber
Copy link

@luizirber luizirber commented Sep 14, 2019

(why not use this repo as a testing ground for sourmash-bio/sourmash#696 and sourmash-bio/sourmash#680? 😺 )

Dev dependency installation becomes pip install tox (or, even better, pipx install tox). Tests, checks, coverage upload... all tasks are executed by tox, which also takes care of setting up virtualenvs.

Linting and code formatting are executed by pre-commit, which can be installed (using the tox venvs) to be executed every time a new commit is made. This makes sure that new commits follow a formatting standard, and avoid adding common errors.
At the end of tox -e fix_lint execution there are instructions on how to set up pre-commit.

I tried to keep commits independent, so they can be dropped individually:

  • 864d42a sets up the basic infrastructure: add travis, tox, and initial pre-commit hooks configuration (but doesn't execute it by default in tox). It also moves config and setup.py into pyproject.toml, and uses flit for packaging.
  • 9596ddb starts using a subset of pre-commit hooks, disabling black and flake8
  • 18dc87e moves tests to new dir, for better coverage tracking
  • a0a5dfa turns on flake8 and fix detected errors
  • 5700c3c turns on black, the code autoformatter.
  • 56e344a sets up docs using sphinx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant