Skip to content

Commit 22c275f

Browse files
authored
Merge branch 'main' into add-data-section-to-guide
2 parents 277c576 + d5665b7 commit 22c275f

File tree

183 files changed

+54687
-21251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+54687
-21251
lines changed

.all-contributorsrc

Lines changed: 669 additions & 5 deletions
Large diffs are not rendered by default.

.circleci/config.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
version: 2.1
22
jobs:
3-
build_book:
3+
build-book:
44
docker:
5-
- image: cimg/python:3.9
5+
- image: cimg/python:3.13
66
steps:
77
- checkout
8+
- run:
9+
name: Restore mtimes from git history
10+
command: |
11+
sudo apt-get update
12+
sudo apt-get install git-restore-mtime
13+
git restore-mtime
814
- run:
915
name: setup environment
1016
command: |
@@ -22,6 +28,6 @@ jobs:
2228
# Tell CircleCI to use this workflow when it builds the site
2329
workflows:
2430
version: 2
25-
build_book:
31+
build-book:
2632
jobs:
27-
- build_book
33+
- build-book

.github/dependabot.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
insecure-external-code-execution: allow
6+
schedule:
7+
interval: "monthly"
8+
open-pull-requests-limit: 100
9+
labels:
10+
- "maintenance"
11+
- "dependencies"
12+
groups:
13+
pip:
14+
patterns:
15+
- "*"
16+
commit-message:
17+
prefix: "chore"
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: "monthly"
22+
open-pull-requests-limit: 100
23+
labels:
24+
- "maintenance"
25+
- "dependencies"
26+
groups:
27+
actions:
28+
patterns:
29+
- "*"
30+
commit-message:
31+
prefix: "chore"
32+
- package-ecosystem: "github-actions"
33+
directory: "examples/pure-hatch/.github/workflows"
34+
schedule:
35+
interval: "weekly"
36+
open-pull-requests-limit: 100
37+
labels:
38+
- "maintenance"
39+
- "dependencies"
40+
groups:
41+
actions:
42+
patterns:
43+
- "*"
44+
commit-message:
45+
prefix: "chore"
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
name: Book Preview
2-
1+
name: Book Preview Redirect
32
on: [status]
43

4+
concurrency:
5+
group: docs-preview-${{ github.ref }}
6+
cancel-in-progress: true
7+
58
jobs:
69
circleci_artifacts_redirector_job:
710
runs-on: ubuntu-latest
8-
if: "${{ github.event.context == 'ci/circleci: build_book' }}"
11+
# For testing this action on a fork, remove the "github.repository =="" condition.
12+
if: "github.event.context == 'ci/circleci: build-book'"
13+
permissions:
14+
statuses: write
915
name: Run CircleCI artifacts redirector
1016
steps:
1117
- name: GitHub Action step
1218
id: step1
1319
uses: larsoner/circleci-artifacts-redirector-action@master
1420
with:
1521
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
api-token: ${{ secrets.CIRCLECI_TOKEN }}
1623
artifact-path: 0/html/index.html
17-
circleci-jobs: build_book
18-
job-title: Click to preview rendered book
24+
circleci-jobs: build-book
25+
job-title: View rendered book here!

.github/workflows/build-book.yml

Lines changed: 54 additions & 47 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 coming
4+
# be built when a PR is opened. This avoids duplicated builds 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:
@@ -15,57 +15,64 @@ jobs:
1515
build-test-book:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v5
19+
with:
20+
fetch_depth: 0
1921

20-
- name: Setup Python
21-
uses: actions/setup-python@v2
22-
with:
23-
python-version: '3.9'
22+
- name: Restore mtimes from git history
23+
run: |
24+
sudo apt-get install git-restore-mtime
25+
git restore-mtime
2426
25-
- name: Upgrade pip
26-
run: |
27-
# install pip=>20.1 to use "pip cache dir"
28-
python3 -m pip install --upgrade pip
29-
- name: Get pip cache dir
30-
id: pip-cache
31-
run: echo "::set-output name=dir::$(pip cache dir)"
27+
- name: Setup Python
28+
uses: actions/setup-python@v6
29+
with:
30+
python-version: "3.13"
3231

33-
- name: Cache dependencies
34-
uses: actions/cache@v2
35-
with:
36-
path: ${{ steps.pip-cache.outputs.dir }}
37-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
38-
restore-keys: |
39-
${{ runner.os }}-pip-
32+
- name: Upgrade pip
33+
run: |
34+
# install pip=>20.1 to use "pip cache dir"
35+
python3 -m pip install --upgrade pip
36+
- name: Get pip cache dir
37+
id: pip-cache
38+
run: echo "::set-output name=dir::$(pip cache dir)"
4039

41-
- name: Install dependencies
42-
run: python3 -m pip install nox
40+
- name: Cache dependencies
41+
uses: actions/cache@v4
42+
with:
43+
path: ${{ steps.pip-cache.outputs.dir }}
44+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
45+
restore-keys: |
46+
${{ runner.os }}-pip-
4347
44-
- name: Build book
45-
run: nox -s docs
48+
- name: Install dependencies
49+
run: python3 -m pip install nox
4650

47-
# Save html as artifact
48-
- name: Save book html as artifact for viewing
49-
uses: actions/upload-artifact@v3
50-
with:
51-
name: book-html
52-
path: |
53-
_build/html/
51+
- name: Build book
52+
run: nox -s docs-test
5453

55-
# Push the book's HTML to github-pages
56-
- name: Push to GitHub Pages
57-
# Only push if on main branch
58-
if: github.ref == 'refs/heads/main'
59-
uses: peaceiris/[email protected]
60-
with:
61-
github_token: ${{ secrets.GITHUB_TOKEN }}
62-
publish_dir: ./_build/html
54+
# Save html as artifact
55+
- name: Save book html as artifact for viewing
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: book-html
59+
path: |
60+
_build/html/
6361
64-
# Test for bad links and ensure alt tags for usability
65-
- name: Check HTML using htmlproofer
66-
uses: chabad360/htmlproofer@master
67-
with:
68-
directory: '_build/html'
69-
arguments: |
70-
--ignore-files "/.+\/_static\/.+/,/genindex.html/"
71-
--ignore-status-codes "404, 403, 503"
62+
# Push the book's HTML to github-pages
63+
- name: Push to GitHub Pages
64+
# Only push if on main branch
65+
if: github.ref == 'refs/heads/main'
66+
uses: peaceiris/[email protected]
67+
with:
68+
github_token: ${{ secrets.GITHUB_TOKEN }}
69+
publish_dir: ./_build/html
70+
71+
# Test for bad links and ensure alt tags for usability
72+
- name: Check HTML using htmlproofer
73+
uses: chabad360/htmlproofer@master
74+
with:
75+
directory: "_build/html"
76+
arguments: |
77+
--ignore-files "/.+\/_static\/.+/,/genindex.html/"
78+
--ignore-status-codes "0, 200, 403, 429, 503"

.github/workflows/crowdin_sync.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Crowdin Sync
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
sync-translations:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v5
13+
14+
- name: Sync with Crowdin
15+
uses: crowdin/github-action@v2
16+
with:
17+
upload_sources: true
18+
upload_translations: false
19+
download_translations: true
20+
localization_branch_name: l10n_crowdin_translations
21+
create_pull_request: true
22+
pull_request_title: "Crowdin: New translations"
23+
pull_request_body: "Crowdin synced updated translations via GitHub Action."
24+
pull_request_base_branch_name: "main"
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_CROWDIN }}
27+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
28+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Add help-wanted issues to help wanted board
2+
3+
on:
4+
issues:
5+
types:
6+
- labeled
7+
8+
jobs:
9+
add-help-wanted:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Add issue to project
13+
id: add-to-project
14+
uses: actions/[email protected]
15+
with:
16+
project-url: https://github.com/orgs/pyOpenSci/projects/3
17+
# This is a organization level token so it can be used across all repos in our org
18+
github-token: ${{ secrets.GHPROJECT_HELP_WANTED }}
19+
labeled: help wanted, sprintable
20+
label-operator: OR

.gitignore

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
1-
_build
2-
.vscode
3-
*/.ipynb_checkpoints/*
1+
# Vscode
2+
.vscode/
3+
4+
# Python
45
tmp/
56
.DS_Store
6-
.nox
7-
__pycache__
87
*notes-from-review.md
98
*.idea*
9+
# Grammar / syntax checkers
10+
styles/
11+
# Exclude translation .mo files
12+
locales/*/LC_MESSAGES/*.mo
13+
14+
# Exclude Jupyter Notebook checkpoints
15+
.ipynb_checkpoints/
16+
*/.ipynb_checkpoints/*
17+
18+
# Exclude Python bytecode
19+
__pycache__/
20+
21+
# Exclude build directories
22+
_build/
23+
24+
# Exclude virtual environments
25+
venv/
26+
env/
27+
ENV/
28+
.venv/
29+
.ENV/
30+
*/venv/
31+
.nox
32+
*/.nox/

.pre-commit-config.yaml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
# - Register git hooks: pre-commit install --install-hooks
1313

1414
repos:
15-
1615
# Misc commit checks
1716
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.4.0
17+
rev: v6.0.0
1918
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
2019
hooks:
2120
# Autoformat: Makes sure files end in a newline and only a newline.
@@ -26,16 +25,31 @@ repos:
2625
- id: trailing-whitespace
2726

2827
- repo: https://github.com/codespell-project/codespell
29-
rev: v2.2.5
28+
rev: v2.4.1
29+
hooks:
30+
- id: codespell
31+
additional_dependencies:
32+
- tomli
33+
exclude: >
34+
(?x)^(
35+
(.*vale-styles.*)|(.*\.po)
36+
)$
37+
38+
- repo: https://github.com/errata-ai/vale
39+
rev: v3.12.0
40+
hooks:
41+
- id: vale
42+
43+
- repo: https://github.com/rbubley/mirrors-prettier
44+
rev: v3.6.2
3045
hooks:
31-
- id: codespell
32-
additional_dependencies:
33-
- tomli
46+
- id: prettier
47+
types_or: [yaml, html, css, scss, javascript, json, toml]
3448

3549
ci:
36-
autofix_prs: false
37-
#skip: [flake8, end-of-file-fixer]
38-
autofix_commit_msg: |
39-
'[pre-commit.ci 🤖] Apply code format tools to PR'
40-
# Update hook versions every month (so we don't get hit with weekly update pr's)
41-
autoupdate_schedule: monthly
50+
autofix_prs: false
51+
#skip: [flake8, end-of-file-fixer]
52+
autofix_commit_msg: |
53+
'[pre-commit.ci 🤖] Apply code format tools to PR'
54+
# Update hook versions every month (so we don't get hit with weekly update pr's)
55+
autoupdate_schedule: monthly

.vale.ini

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Configuration file for using Vale in the python-package-guide repository
2+
#
3+
# To disable checks on parts of a MarkDown or HTML file, delimit the section
4+
# using these HTML comments:
5+
# to disabled Vale checks after this line: <!-- vale off -->
6+
# to enable Vale checks after this line: <!-- vale on -->
7+
#
8+
# To disable checks based on MarkDown scope, see IgnoredScopes.
9+
# To disable checks on certain HTML elements, see IgnoredClasses.
10+
#
11+
# More information about the configuration can be found here:
12+
# https://vale.sh/docs/topics/config
13+
14+
15+
# Path to the styles directory, where style rules are defined
16+
StylesPath = vale-styles
17+
18+
# Path to a dictionary folders inside the StylesPath config subdirectory. This
19+
# folder can contain two files, accept.txt and reject.txt, with one word per
20+
# line. These words will be used to check for spelling mistakes in addition to
21+
# the internal dictionary, if the 'Vale' ruleset is enabled (see below)
22+
# See https://vale.sh/docs/topics/vocab/#folder-structure for more details
23+
Vocab = sample
24+
25+
26+
# Checks are defined in sections by file type, like the one below for
27+
# MarkDown. In each section you can enable groups of style rules, defined in folders
28+
# inside the StylesPath directory.
29+
# Use 'Vale' to enable the internal style rules and checks.
30+
31+
[*.md]
32+
BasedOnStyles = package-guide-test

0 commit comments

Comments
 (0)