Skip to content

Commit b1875bd

Browse files
authored
Merge branch 'main' into add-blog-rispy
2 parents 36c1a13 + 29a3a40 commit b1875bd

425 files changed

Lines changed: 19577 additions & 12130 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{py,rst,ini}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.{html,css,scss,json,yml,yaml,xml,toml}]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
indent_style = space
22+
indent_size = 2
23+
24+
[default.conf]
25+
indent_style = space
26+
indent_size = 2
27+
28+
["Makefile"]
29+
indent_style = tab
30+
31+
[*.{diff,patch}]
32+
trim_trailing_whitespace = false

.github/workflows/main.yaml

Lines changed: 57 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,72 @@
1-
21
name: main
32

43
on:
54
push:
6-
branches: [ main ]
5+
branches: [main]
76
pull_request:
8-
branches: [ main ]
7+
branches: [main]
98

109
jobs:
10+
check-branch:
11+
if: ${{ github.event_name == 'pull_request' }}
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
concurrency:
15+
group: check-pr-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Check if the PR's branch is updated
24+
uses: osl-incubator/gh-check-pr-is-updated@1.0.0
25+
with:
26+
remote_branch: origin/main
27+
pr_sha: ${{ github.event.pull_request.head.sha }}
28+
1129
build:
1230
runs-on: ubuntu-latest
1331
concurrency:
14-
group: ci-${{ github.ref }}
32+
group: ci-${{ github.event_name }}-${{ github.ref }}
1533
cancel-in-progress: true
1634
defaults:
1735
run:
1836
shell: bash -l {0}
1937
steps:
20-
- uses: actions/checkout@v2
21-
22-
- uses: conda-incubator/setup-miniconda@v2
23-
with:
24-
miniconda-version: "latest"
25-
mamba-version: "*"
26-
environment-file: conda/dev.yaml
27-
channels: conda-forge,nodefaults
28-
activate-environment: osl-web
29-
use-mamba: true
30-
miniforge-variant: Mambaforge
31-
32-
- name: Build the book
33-
run: |
34-
makim pages.build
35-
echo "opensciencelabs.org" > build/CNAME
36-
37-
# Push the book's HTML to github-pages
38-
- name: GitHub Pages action
39-
uses: peaceiris/actions-gh-pages@v3.5.9
40-
if: ${{ github.event_name == 'push' }}
41-
with:
42-
github_token: ${{ secrets.GITHUB_TOKEN }}
43-
publish_dir: ./build
38+
- uses: actions/checkout@v3
39+
40+
- uses: conda-incubator/setup-miniconda@v3
41+
with:
42+
miniconda-version: "latest"
43+
environment-file: conda/dev.yaml
44+
channels: conda-forge,nodefaults
45+
activate-environment: osl-web
46+
auto-update-conda: true
47+
conda-solver: libmamba
48+
49+
- name: Install dependencies
50+
run: |
51+
poetry check
52+
poetry install
53+
python -m nltk.downloader punkt
54+
55+
- name: Linter
56+
if: ${{ github.event_name == 'pull_request' }}
57+
run: |
58+
pre-commit install
59+
pre-commit run --all-file --verbose
60+
61+
- name: Build the book
62+
run: |
63+
makim pages.build
64+
echo "opensciencelabs.org" > build/CNAME
65+
66+
# Push the book's HTML to github-pages
67+
- name: GitHub Pages action
68+
uses: peaceiris/actions-gh-pages@v3.5.9
69+
if: ${{ github.event_name == 'push' }}
70+
with:
71+
github_token: ${{ secrets.GITHUB_TOKEN }}
72+
publish_dir: ./build

.makim.yaml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
version: 1.0
21
groups:
32
pages:
4-
targets:
3+
tasks:
54
pre-build:
65
help: pre-build step
7-
shell: bash
6+
backend: bash
87
run: |
98
mkdir -p build
109
# Directory to search for .ipynb files
@@ -16,14 +15,29 @@ groups:
1615
"*.ipynb" -exec sh -c \
1716
'jupyter nbconvert --to markdown --template=theme/custom-markdown.tpl --output-dir "$(dirname "$0")" --output "index" "$0"' {} \;
1817
18+
# remove console colors from md files
19+
find "$SEARCH_DIR" -name \
20+
"index.md" -exec sh -c \
21+
'cat "$(dirname "$0")/index.md" | python scripts/clean-output.py > "$(dirname "$0")/temp_index.md" && mv "$(dirname "$0")/temp_index.md" "$(dirname "$0")/index.md"' {} \;
22+
1923
build:
2024
help: build the static page
21-
dependencies:
22-
- target: pages.pre-build
23-
run: mkdocs build --verbose --clean
25+
hooks:
26+
pre-run:
27+
- task: pages.pre-build
28+
run: |
29+
rm -rf build/*
30+
mkdocs build --verbose --clean --strict
2431
2532
preview:
2633
help: preview the web page dynamically
27-
dependencies:
28-
- target: pages.pre-build
34+
args:
35+
run-pre-build:
36+
help: Run pre-build task
37+
type: bool
38+
action: store_true
39+
hooks:
40+
pre-run:
41+
- task: pages.pre-build
42+
if: ${{ args.run_pre_build }}
2943
run: mkdocs serve --watch pages --watch theme

.pre-commit-config.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
default_stages:
2+
- pre-commit
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.6.0
6+
hooks:
7+
- id: trailing-whitespace
8+
exclude: "pages/blog"
9+
- id: end-of-file-fixer
10+
exclude: "pages/blog"
11+
- id: check-json
12+
- id: check-toml
13+
- id: check-xml
14+
exclude: ".*.svg"
15+
- id: check-builtin-literals
16+
- id: check-case-conflict
17+
- id: check-docstring-first
18+
- id: detect-private-key
19+
exclude: "theme"
20+
21+
- repo: https://github.com/pre-commit/mirrors-prettier
22+
rev: "v3.0.2"
23+
hooks:
24+
- id: prettier
25+
exclude: "pages/blog|theme"
26+
27+
- repo: local
28+
hooks:
29+
- id: mkdocs-build
30+
name: mkdocs-build
31+
entry: makim pages.build
32+
files: pages
33+
language: system
34+
pass_filenames: false
35+
36+
- id: linkcheckmd
37+
name: linkcheckmd
38+
entry: python scripts/check-broken-links-md.py
39+
language: system
40+
pass_filenames: false
41+
42+
- id: check-internal-links
43+
name: check-internal-links
44+
entry: python scripts/check-broken-links-internal.py
45+
language: system
46+
pass_filenames: false
47+
48+
- id: ruff-format
49+
name: ruff-format
50+
entry: ruff format
51+
language: system
52+
pass_filenames: true
53+
types:
54+
- python
55+
56+
- id: ruff-linter
57+
name: ruff-linter
58+
entry: ruff check
59+
language: system
60+
pass_filenames: true
61+
types:
62+
- python

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/changelog.md

.prettierrc.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
overrides:
2+
- files: "*.md"
3+
options:
4+
parser: remark
5+
proseWrap: always
6+
printWidth: 80

.wellKnown/funding-manifest-urls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Find the OSL funding.json file at: www.opensciencelabs.org/funding.json

CODE_OF_CONDUCT.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
66
community a harassment-free experience for everyone, regardless of age, body
77
size, visible or invisible disability, ethnicity, sex characteristics, gender
88
identity and expression, level of experience, education, socio-economic status,
9-
nationality, personal appearance, race, religion, or sexual identity
10-
and orientation.
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
1111

1212
We pledge to act and interact in ways that contribute to an open, welcoming,
1313
diverse, inclusive, and healthy community.
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
26-
overall community
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
31-
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
35-
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -60,8 +60,8 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
opensciencelabs@gmail.com.
64-
All complaints will be reviewed and investigated promptly and fairly.
63+
team@opensciencelabs.org. All complaints will be reviewed and investigated
64+
promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the
6767
reporter of any incident.
@@ -82,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.
8282

8383
### 2. Warning
8484

85-
**Community Impact**: A violation through a single incident or series
86-
of actions.
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
8787

8888
**Consequence**: A warning with consequences for continued behavior. No
8989
interaction with the people involved, including unsolicited interaction with
9090
those enforcing the Code of Conduct, for a specified period of time. This
9191
includes avoiding interactions in community spaces as well as external channels
92-
like social media. Violating these terms may lead to a temporary or
93-
permanent ban.
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
9494

9595
### 3. Temporary Ban
9696

@@ -106,20 +106,20 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112-
**Consequence**: A permanent ban from any sort of public interaction within
113-
the community.
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114114

115115
## Attribution
116116

117117
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118118
version 2.0, available at
119119
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120120

121-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122-
enforcement ladder](https://github.com/mozilla/diversity).
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
123123

124124
[homepage]: https://www.contributor-covenant.org
125125

0 commit comments

Comments
 (0)