-
Notifications
You must be signed in to change notification settings - Fork 87
Update README and CONTRIBUTING guidelines #98
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
Draft
ioreka
wants to merge
6
commits into
main
Choose a base branch
from
update-contributing-and-readme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c9139cd
Update jobs link from octo to kraken
ioreka 53e4980
First TW pass over the CONTRIB page
ioreka 8c48af5
Fix typo and failing tests
ioreka 6dd550c
Linting to fix failing test
ioreka 8953244
Rejig the contributing guide
codeinthehole 6b2068f
Add clarification about Docker installation
ioreka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,120 @@ | ||
# Contributing | ||
|
||
Markdown code in this repo must pass several static analysis tests, which are | ||
detailed below. Note that you can run: | ||
You're welcome to suggest changes if you spot a broken link or typo. Clone the repo or use the GitHub UI to make a PR. | ||
|
||
## Installation | ||
|
||
You'll need a few tools to make and test your changes before pushing them to a PR. | ||
|
||
### Prettier | ||
|
||
All Markdown should be formatted with [Prettier](https://prettier.io/) version 3.1 | ||
Install with: | ||
|
||
```sh | ||
make ci | ||
npm install -g [email protected] | ||
``` | ||
|
||
to run these checks before pushing to Github. | ||
Once installed, ensure your editor runs Prettier on a pre-save hook: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see |
||
|
||
## Git commit subjects | ||
- [PyCharm instructions](https://www.jetbrains.com/help/pycharm/prettier.html) | ||
- [VSCode instructions](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
- [Vim instructions](https://prettier.io/docs/en/vim.html) | ||
|
||
Git commit subjects must: | ||
Prettier conformance is checked in CI and configured via `.prettierrc.yaml` and | ||
`.prettierignore`. | ||
|
||
- Be no longer than 70 characters; | ||
- Start with a capital letter; | ||
- Not end with a full stop; | ||
### Docker | ||
ioreka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Further, pull request branches should rebase off `main` to incorporate upstream | ||
changes; don't merge `main` into your branch. | ||
### Pyenv | ||
ioreka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
These rules are checked using Pytest in CI. | ||
## Development | ||
|
||
## Formatting | ||
### Run CI tests locally | ||
|
||
All markdown should be formatted with [Prettier](https://prettier.io/) version 3.0.0 | ||
This can be installed on your host OS with: | ||
If your changes include Markdown, be aware that Markdown code in this repo must pass several static analysis tests. Before pushing to GitHub, run | ||
|
||
npm install -g [email protected] | ||
```sh | ||
make ci | ||
``` | ||
|
||
Once installed, ensure your editor runs Prettier on a pre-save hook: | ||
to run these checks. | ||
|
||
- [PyCharm instructions](https://www.jetbrains.com/help/pycharm/prettier.html) | ||
- [VSCode instructions](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
- [Vim instructions](https://prettier.io/docs/en/vim.html) | ||
### Git commit subjects | ||
|
||
Prettier conformance is checked in CI and configured via `.prettierrc.yaml` and | ||
`.prettierignore`. | ||
Git commit subjects must: | ||
|
||
- Be no longer than 70 characters. | ||
- Start with a capital letter. | ||
- Not end with a full stop. | ||
|
||
Further, PR branches should rebase off `main` to incorporate upstream | ||
changes; don't merge `main` into your branch. | ||
|
||
These rules are checked using Pytest in CI. | ||
|
||
## Spelling | ||
### Spelling | ||
|
||
Pull requests must pass a spell-check before merge. This is done using the | ||
[`tmaier/markdown-spellcheck`](https://hub.docker.com/r/tmaier/markdown-spellcheck) | ||
Docker image. | ||
|
||
To run the spell-test locally run: | ||
|
||
make spell_check | ||
```sh | ||
make spell_check | ||
``` | ||
|
||
or: | ||
|
||
docker run --rm -ti -v $(pwd):/workdir tmaier/markdown-spellcheck:latest \ | ||
--report --ignore-numbers --ignore-acronyms "**/*.md" | ||
```sh | ||
docker run --rm -ti -v $(pwd):/workdir tmaier/markdown-spellcheck:latest \ | ||
--report --ignore-numbers --ignore-acronyms "**/*.md" | ||
``` | ||
|
||
Add exceptions to the custom dictionary in `.spelling`. | ||
|
||
## Linting | ||
### Linting | ||
|
||
Markdown files are linted by | ||
[`markdownlint-cli`](https://github.com/igorshubovych/markdownlint-cli). | ||
|
||
To run the linting locally run: | ||
|
||
docker run -i --rm -v `pwd`:/work tmknom/markdownlint:0.33.0 | ||
```sh | ||
docker run -i --rm -v `pwd`:/work tmknom/markdownlint:0.33.0 | ||
``` | ||
|
||
or, if installed on your host OS, run: | ||
|
||
markdownlint . | ||
```sh | ||
markdownlint . | ||
``` | ||
|
||
or: | ||
|
||
make markdownlint | ||
```sh | ||
make markdownlint | ||
``` | ||
|
||
Configuration for the enforced rules is in `.markdownlint.yaml`. | ||
|
||
Many linting issues can be fixed by running: | ||
|
||
markdownlint --fix . | ||
```sh | ||
markdownlint --fix . | ||
``` | ||
|
||
## Preview rendered pages | ||
|
||
You can use [`grip`](https://github.com/joeyespo/grip) to render Github-flavour | ||
markdown files. Install with: | ||
|
||
brew install grip | ||
```sh | ||
brew install grip | ||
``` | ||
|
||
While working on docs, run a local, auto-reloading server with: | ||
|
||
make server | ||
```sh | ||
make server | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.