Skip to content

Commit efd351d

Browse files
Merge branch 'gh-pages' into gh-pages
2 parents 713d3c0 + 692adae commit efd351d

28 files changed

+684
-3391
lines changed

.github/ISSUE_TEMPLATE/add_conference.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Add Conference
22
description: Add Conference dates, location, speaking and other information that you would like shared
33
title: "[CONFERENCE] <CONFERENCE NAME> YYYY"
4-
labels: ["conference"]
4+
labels: ["conference", "CFP"]
55
body:
66
- type: input
77
id: conference_name
@@ -40,6 +40,22 @@ body:
4040
placeholder: "CITY, <REGION>, COUNTRY"
4141
validations:
4242
required: false
43+
- type: input
44+
id: cfp_link
45+
attributes:
46+
label: CFP Link
47+
description: Provide the URL for the Call for Proposals (CFP) (make sure to include `https://`).
48+
placeholder: "https://example.com/cfp"
49+
validations:
50+
required: true
51+
- type: input
52+
id: cfp_deadline
53+
attributes:
54+
label: CFP Deadline
55+
description: Enter the deadline for submitting CFPs (YYYY-MM-DD).
56+
placeholder: "YYYY-MM-DD"
57+
validations:
58+
required: true
4359
- type: textarea
4460
id: conference_description
4561
attributes:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Generate and Upload Screenshots
2+
# https://devblogs.microsoft.com/python/announcing-playwright-for-python-reliable-end-to-end-testing-for-the-web/
3+
# https://github.com/marketplace/actions/run-playwright-tests
4+
5+
on:
6+
pull_request:
7+
types: [labeled]
8+
branches:
9+
- gh-pages
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
test:
15+
if: ${{ github.event.label.name == 'design_change' }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.12"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements-dev.txt
27+
python -m playwright install --with-deps chromium
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
bundler-cache: true
32+
# Run tests
33+
- name: Run Tests
34+
run: |
35+
python -m pytest -m design
36+
- name: upload images
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: page_screenshots
40+
path: test_images/
41+
compression-level: 9

.github/workflows/playwright.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,24 @@ on:
1313

1414
jobs:
1515
test:
16+
timeout-minutes: 30
1617
runs-on: ubuntu-latest
1718
steps:
1819
- uses: actions/checkout@v3
1920
- name: Set up Python
2021
uses: actions/setup-python@v4
2122
with:
22-
python-version: "3.11"
23+
python-version: "3.12"
2324
- name: Install dependencies
2425
run: |
2526
python -m pip install --upgrade pip
2627
pip install -r requirements-dev.txt
27-
python -m playwright install --with-deps
28+
python -m playwright install --with-deps chromium
2829
- name: Set up Ruby
2930
uses: ruby/setup-ruby@v1
3031
with:
3132
bundler-cache: true
32-
- name: Jekyll detached and pytest
33-
run: |
34-
# Start up local copy of site
35-
bundle exec jekyll serve --detach
36-
37-
# Sleep for 5 secs to allow Jekyll to start
38-
startup_wait=5
39-
echo "Sleeping for $startup_wait seconds"
40-
sleep $startup_wait
41-
4233
# Run tests
34+
- name: Run Tests
35+
run: |
4336
python -m pytest

.github/workflows/scorecard.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '22 15 * * 4'
14+
push:
15+
branches: [ "gh-pages" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
permissions:
25+
# Needed to upload the results to code-scanning dashboard.
26+
security-events: write
27+
# Needed to publish results and get a badge (see publish_results below).
28+
id-token: write
29+
# Uncomment the permissions below if installing in a private repository.
30+
# contents: read
31+
# actions: read
32+
33+
steps:
34+
- name: "Checkout code"
35+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36+
with:
37+
persist-credentials: false
38+
39+
- name: "Run analysis"
40+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
41+
with:
42+
results_file: results.sarif
43+
results_format: sarif
44+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
45+
# - you want to enable the Branch-Protection check on a *public* repository, or
46+
# - you are installing Scorecard on a *private* repository
47+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
48+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
49+
50+
# Public repositories:
51+
# - Publish results to OpenSSF REST API for easy access by consumers
52+
# - Allows the repository to include the Scorecard badge.
53+
# - See https://github.com/ossf/scorecard-action#publishing-results.
54+
# For private repositories:
55+
# - `publish_results` will always be set to `false`, regardless
56+
# of the value entered here.
57+
publish_results: true
58+
59+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60+
# format to the repository Actions tab.
61+
- name: "Upload artifact"
62+
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
63+
with:
64+
name: SARIF file
65+
path: results.sarif
66+
retention-days: 5
67+
68+
# Upload the results to GitHub's code scanning dashboard (optional).
69+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
70+
- name: "Upload to code-scanning"
71+
uses: github/codeql-action/upload-sarif@v3
72+
with:
73+
sarif_file: results.sarif

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ _site/
1515
.bundle/
1616
vendor/
1717
2
18+
test_images
19+
*-version

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.3.4

CONTRIBUTING.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Follow these steps and note these guidelines to begin contributing:
3838

3939
## Working on an issue
4040

41+
- Please create a separate branch for each issue you work on. Avoid working on multiple issues from the same branch, as this can complicate the review process
4142
- The easiest way to make changes and and test them is by using [![GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/BlackPythonDevs/blackpythondevs.github.io)
4243

4344
- You can also access the Codespaces from the repository main page:
@@ -58,7 +59,15 @@ Follow these steps and note these guidelines to begin contributing:
5859

5960
![Bundle install terminal](/assets/images/bundle_install_terminal.png)
6061

61-
- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve` or run the default **Build Task** <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>:
62+
- Afterwards, run the command `pip install -r requirements-dev.txt` to install the python dev dependencies.
63+
64+
![Pip install terminal](/assets/images/pip_install_terminal.png)
65+
66+
- Install the pre-commit hooks to automatically format the code before committing. Run the command `pre-commit install`:
67+
68+
![Pre-commit install terminal](/assets/images/pre-commit_install_terminal.png)
69+
70+
- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve --detach` or run the default **Build Task** <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>:
6271

6372
![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)
6473

@@ -70,6 +79,32 @@ Follow these steps and note these guidelines to begin contributing:
7079

7180
![Running page](/assets/images/running_page.png)
7281

73-
- Test your changes (create new tests as needed)
82+
### Testing Changes (create new tests as needed)
83+
84+
- To run the test suites for the codebase
85+
86+
- Ensure the site is running locally with `bundle exec jekyll serve --detach`. This will run the server in the background, and any content changes will immediately reflect on the site.
87+
88+
![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)
89+
90+
- If you need to restart the server, you can run `pkill -f jekyll` to stop the server and then run `bundle exec jekyll serve --detach` to start the server again.
91+
92+
- Run all tests in the test-suite with the command `python3 -m pytest`:
93+
94+
![Pytest terminal](/assets/images/pytest_run_terminal.png)
95+
96+
### Pushing Changes
97+
98+
- Run `pre-commit run --all` to ensure your code is formatted and linted correctly before pushing your changes.
99+
100+
![Pre-commit run terminal](/assets/images/pre-commit_run_terminal.png)
101+
102+
- Run `git commit -m "<Your commit message>"` to commit your changes.
103+
104+
![Git commit terminal](/assets/images/git_commit_terminal.png)
105+
106+
- Finally run `git push origin <your-branch-name>` to push your changes to your fork.
107+
108+
![Git push terminal](/assets/images/git_push_terminal.png)
74109

75110
- Once you’ve committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. Please ensure that you compare your feature branch to the desired branch of the repo you are supposed to make a PR to. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes in your development branch and update it. 🥳

0 commit comments

Comments
 (0)