Skip to content

Commit c674d41

Browse files
authored
Merge branch 'BlackPythonDevs:gh-pages' into gh-pages
2 parents 5b4f45c + b2eef12 commit c674d41

23 files changed

+463
-3361
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:

.github/workflows/conference.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,21 @@ jobs:
5353
labels: |
5454
report
5555
automated pr
56+
add_comment:
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: Add comment to the issue
61+
uses: actions/github-script@v6
62+
if: ${{ github.event.issue.user.type != 'User' }} #adds comment only if the issue is created by a bot
63+
with:
64+
github-token: ${{ secrets.GITHUB_TOKEN }}
65+
script: |
66+
const issueNumber = context.payload.issue.number;
67+
const comment = "Automated issue, no action is required."
68+
69+
github.issues.createComment({
70+
...context.repo,
71+
issue_number: issueNumber,
72+
body: comment
73+
});
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

.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: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,15 @@ Follow these steps and note these guidelines to begin contributing:
5858

5959
![Bundle install terminal](/assets/images/bundle_install_terminal.png)
6060

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>:
61+
- Afterwards, run the command `pip install -r requirements-dev.txt` to install the python dev dependencies.
62+
63+
![Pip install terminal](/assets/images/pip_install_terminal.png)
64+
65+
- Install the pre-commit hooks to automatically format the code before committing. Run the command `pre-commit install`:
66+
67+
![Pre-commit install terminal](/assets/images/pre-commit_install_terminal.png)
68+
69+
- 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>:
6270

6371
![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)
6472

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

7179
![Running page](/assets/images/running_page.png)
7280

73-
- Test your changes (create new tests as needed)
81+
### Testing Changes (create new tests as needed)
82+
83+
- To run the test suites for the codebase
84+
85+
- 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.
86+
87+
![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)
88+
89+
- 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.
90+
91+
- Run all tests in the test-suite with the command `python3 -m pytest`:
92+
93+
![Pytest terminal](/assets/images/pytest_run_terminal.png)
94+
95+
### Pushing Changes
96+
97+
- Run `pre-commit run --all` to ensure your code is formatted and linted correctly before pushing your changes.
98+
99+
![Pre-commit run terminal](/assets/images/pre-commit_run_terminal.png)
100+
101+
- Run `git commit -m "<Your commit message>"` to commit your changes.
102+
103+
![Git commit terminal](/assets/images/git_commit_terminal.png)
104+
105+
- Finally run `git push origin <your-branch-name>` to push your changes to your fork.
106+
107+
![Git push terminal](/assets/images/git_push_terminal.png)
74108

75109
- 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)