Skip to content

Commit 82ca8e8

Browse files
committed
Add: precommit and clean up all files
1 parent 710cb91 commit 82ca8e8

32 files changed

+540
-509
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
pip install nox
1313
pip list
1414
- run:
15-
name: Build book html
15+
name: Build book html
1616
command: nox -s docs
1717

1818
- store_artifacts:

.github/workflows/build-book.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: build-test-deploy-book
22

33
# Only build PRs, the main branch, and releases. Pushes to branches will only
4-
# be built when a PR is opened. This avoids duplicated buids in PRs comming
4+
# be built when a PR is opened. This avoids duplicated buids in PRs coming
55
# from branches in the origin repository (1 for PR and 1 for push).
66
# This came from Leo's work with fatiando
77
on:
@@ -53,7 +53,7 @@ jobs:
5353
_build/html/
5454
5555
# Push the book's HTML to github-pages
56-
- name: Push to GitHub Pages
56+
- name: Push to GitHub Pages
5757
# Only push if on main branch
5858
if: github.ref == 'refs/heads/main'
5959
uses: peaceiris/[email protected]
@@ -69,5 +69,3 @@ jobs:
6969
arguments: |
7070
--ignore-files "/.+\/_static\/.+/,/genindex.html/"
7171
--ignore-status-codes "404, 403, 503"
72-
73-

.pre-commit-config.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# pre-commit is a tool that you run locally
2+
# to perform a predefined set of tasks manually and/or
3+
# automatically before git commits are made.
4+
# Here we are using pre-commit with the precommit.ci bot to implement
5+
# code fixes automagically in pr's. You will still want to install pre-commit
6+
# to run locally
7+
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
8+
# To run on a pr, add a comment with the text "pre-commit.ci run"
9+
# Common tasks
10+
#
11+
# - Run on all files: pre-commit run --all-files
12+
# - Register git hooks: pre-commit install --install-hooks
13+
14+
ci:
15+
autofix_prs: false
16+
#skip: [flake8, end-of-file-fixer]
17+
autofix_commit_msg: |
18+
'[pre-commit.ci 🤖] Apply code format tools to PR'
19+
# Update hook versions every quarter (so we don't get hit with weekly update pr's)
20+
autoupdate_schedule: quarterly
21+
22+
repos:
23+
24+
# Misc commit checks
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v4.4.0
27+
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
28+
hooks:
29+
# Autoformat: Makes sure files end in a newline and only a newline.
30+
- id: end-of-file-fixer
31+
# Lint: Check for files with names that would conflict on a
32+
# case-insensitive filesystem like MacOS HFS+ or Windows FAT.
33+
- id: check-case-conflict
34+
- id: trailing-whitespace
35+
36+
- repo: https://github.com/codespell-project/codespell
37+
rev: v2.2.2
38+
hooks:
39+
- id: codespell
40+
additional_dependencies:
41+
- tomli

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Contributing Guide for the Python open source software packaging book
1+
# Contributing Guide for the Python open source software packaging book
22

33
This is a community resource. We welcome contributions in the form of issues and/or pull requests to this guide.
44

5-
* If you have an idea for something that should be included in the guide, [please open an issue here](https://github.com/pyOpenSci/python-package-guide/issues).
6-
* If you find a typo, feel free to [submit a pull request](https://github.com/pyOpenSci/python-package-guide/pulls) to modify the text directly. Or, if you are less comfortable with pull requests, feel free to open an issue.
7-
* If you want to see a larger change to the content of the guide book, please submit an issue first!
5+
* If you have an idea for something that should be included in the guide, [please open an issue here](https://github.com/pyOpenSci/python-package-guide/issues).
6+
* If you find a typo, feel free to [submit a pull request](https://github.com/pyOpenSci/python-package-guide/pulls) to modify the text directly. Or, if you are less comfortable with pull requests, feel free to open an issue.
7+
* If you want to see a larger change to the content of the guide book, please submit an issue first!
88

99
## How this guide structured
1010

1111
Most of this repository is structured for **Sphinx**, a documentation engine built in `Python`. We are using the Sphinx Book Theme and the `myST` syntax to create each page in this book.
1212

13-
If you wish to contribute by working on the guide book locally, you
14-
will first need to
13+
If you wish to contribute by working on the guide book locally, you
14+
will first need to
1515

16-
1. Fork this repository
16+
1. Fork this repository
1717
2. Clone it locally
18-
3. Build the documentation locally
18+
3. Build the documentation locally
1919

2020
## Instructions for building the documentation locally on your computer
2121

22-
The easiest way to build the documentation in this repository is to use `nox`,
22+
The easiest way to build the documentation in this repository is to use `nox`,
2323
a tool for quickly building environments and running commands within them.
2424
Nox ensures that your environment has all the dependencies needed to build the documentation.
2525

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ pyOpenSci is devoted to building diverse, supportive community around
1515
the Python open source tools that drive open science. We do this through:
1616

1717
* open peer review
18-
* mentorship and
18+
* mentorship and
1919
* training.
2020

21-
pyOpenSci is an independent organization, fiscally sponsored by Community
22-
Initiatives.
21+
pyOpenSci is an independent organization, fiscally sponsored by Community
22+
Initiatives.
2323

2424
:construction: Construction note :construction:
2525

@@ -97,4 +97,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
9797

9898
<!-- ALL-CONTRIBUTORS-LIST:END -->
9999

100-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
100+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

_static/pyos.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ figcaption {
4141
.admonition p {
4242
font-size: 1.1em;
4343
font-weight: bold;
44-
}
44+
}

_templates/header.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
<!-- <link rel="preconnect" href="https://fonts.googleapis.com">
44
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
55
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Raleway:wght@200;300;400;600&display=swap" rel="stylesheet"> -->
6-
<!-- END custom head content -->
7-
6+
<!-- END custom head content -->

ci-and-testing/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
This section is evolving and should be published by the end of Spring 2023
55

66

7-
coming soon
7+
coming soon

code-style-structure/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Code style and structure
22

33

4-
Under development
4+
Under development

codespell-ignore.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
aways

0 commit comments

Comments
 (0)