From ae250d81366bc34a77853ea18684867ec53eb880 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Tue, 13 Aug 2024 13:56:41 -0700 Subject: [PATCH] Copy "Working on this repo" section from nextstrain/ingest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copied the section from the nextstrain/ingest README ยน --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 352bd20..e11336d 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,26 @@ and workflow organization that is expected of a Nextstrain maintained pathogen. However, the workflows will require customizations to support your specific pathogen and should not be expected to "just work". +## Working on this repo + +This repo is configured to use [pre-commit](https://pre-commit.com), +to help automatically catch common coding errors and syntax issues +with changes before they are committed to the repo. + +If you will be writing new code or otherwise working within this repo, +please do the following to get started: + +1. [install `pre-commit`](https://pre-commit.com/#install) by running + either `python -m pip install pre-commit` or `brew install + pre-commit`, depending on your preferred package management + solution +2. install the local git hooks by running `pre-commit install` from + the root of the repo +3. when problems are detected, correct them in your local working tree + before committing them. + +Note that these pre-commit checks are also run in a GitHub Action when +changes are pushed to GitHub, so correcting issues locally will +prevent extra cycles of correction. + [Creating a pathogen repository]: https://docs.nextstrain.org/en/latest/tutorials/creating-a-pathogen-repo/index.html