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

build: pre-commit infrastructure and update travis #243

Merged
merged 1 commit into from May 22, 2020
Merged

Conversation

yangchoo
Copy link
Contributor

@yangchoo yangchoo commented May 21, 2020

Add pre-commit infrastructure to help with basic lint tasks. This is in
preparation of adding an autoformatter for the repo.

As part of this, the travis file is reorganized to help with clearer
delineation of jobs.

Documention is also updated, with the Contributing section updated with
more explicit testing steps and the new environment and lint setup.

This includes all the fixes from the pre-commit hooks added.

@yangchoo yangchoo force-pushed the add-pre-commit branch 3 times, most recently from 70fdfae to 3ecdab5 Compare May 21, 2020 08:58
@yangchoo
Copy link
Contributor Author

Please do check out the Travis build for the new test matrix: https://travis-ci.org/github/autoprotocol/autoprotocol-python/builds/689570208

rhysormond
rhysormond previously approved these changes May 21, 2020
Copy link
Member

@rhysormond rhysormond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat! thanks for simplifying things.

overall:

  • pre-commit is now the primary source of truth for what's to be run
  • tox is a small virtualenv wrapper around it
  • travis calls individual tox steps directly

- python: '3.6'
env: TOXENV=lint
- python: '3.6'
env: TOXENV=clean,py36,stats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the clean step here necessary still?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yea, its to blow away coverage artifacts if present. It seems common in other travis integration libraries, so I assume its doing something but haven't validated

CONTRIBUTING.rst Outdated Show resolved Hide resolved
@rhysormond
Copy link
Member

somewhat related, can we configure travis so that it's using something newer than xenial?

@yangchoo
Copy link
Contributor Author

yea, could use Bionic (https://docs.travis-ci.com/user/reference/linux/).

It shouldn't really matter since we're using mostly pip/tox for the running, so it should be fine to upgrade. I'll try it

Add pre-commit infrastructure to help with basic lint tasks. This is in
preparation of adding an autoformatter for the repo.

As part of this, the travis file is reorganized to help with clearer
delineation of jobs.

Documention is also updated, with the Contributing section updated with
more explicit testing steps and the new environment and lint setup.

This includes all the fixes from the pre-commit hooks added.
@yangchoo yangchoo merged commit 1775a46 into master May 22, 2020
@yangchoo yangchoo deleted the add-pre-commit branch May 22, 2020 01:15
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.

None yet

2 participants