Skip to content

Commit 9ea86f8

Browse files
Add justfile & Update contributing guidelines to mention justfile (#855)
* feat(footer): use dynamic year variable * ci(scorecard): add manually trigger * ci(scorecard): update upload artifact name * ci(scorecard): switch upload-artifact to v4 * ci(scorecard): switch to v4 * ci(scorecard): switch to v2.4.3 * ci(scorecard): fix pre-commit * fix: leadership summit page typo * feat: add justfile * adjust: change 'install' to 'sync' * docs: update contributing guidelines to mention justfile * docs: update contributing guidelines to mention justfile * adjust(justfile): update * docs: add new contributors
1 parent af642cf commit 9ea86f8

File tree

3 files changed

+117
-17
lines changed

3 files changed

+117
-17
lines changed

CONTRIBUTING.md

Lines changed: 67 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ class About(Page):
6969
data = yaml.safe_load(pathlib.Path("_data/leadership.yaml").read_text())
7070
```
7171

72-
```
73-
7472
The `@app.page` tells Render Engine that we're building a single page vs a collection of pages.
7573

7674
The `class About(Page):` tells us about the Page object. Attributes will pass information on render engine and the jinja template that will be loaded
@@ -144,6 +142,64 @@ This project uses uv as it is currently the easiest way for developers with diff
144142

145143
![Pytest terminal](/assets/images/pytest_run_terminal.png)
146144

145+
### Using Justfile
146+
147+
This project provides a [justfile](./justfile) to simplify common development tasks.
148+
149+
Before running any of the commands below, ensure that [just](https://just.systems/man/en/introduction.html) is installed on your system.Once installed, you can run the following commands from the project root:
150+
151+
- Install all dependencies using `uv sync`
152+
153+
```
154+
just sync
155+
```
156+
157+
- Run the development server
158+
159+
```
160+
just serve
161+
```
162+
163+
- Run build
164+
165+
```
166+
just build
167+
```
168+
169+
- Run linters
170+
171+
```
172+
just lint
173+
```
174+
175+
- Run the test
176+
177+
```
178+
just test
179+
```
180+
181+
- Run pre-commit hooks
182+
183+
```
184+
just pre-commit
185+
```
186+
187+
- Run the full development workflow
188+
189+
```
190+
just dev
191+
```
192+
193+
- List available commands
194+
195+
```
196+
just
197+
198+
or
199+
200+
just --list
201+
```
202+
147203
### Pushing Changes
148204

149205
- Run `git commit -m "<Your commit message>"` to commit your changes.
@@ -160,26 +216,23 @@ This project uses uv as it is currently the easiest way for developers with diff
160216

161217
Events are currently created manually by adding entries to `_data/events.json`. To create a conference, use the following JSON structure:
162218

163-
```
164-
219+
```json
165220
{
166-
"name": "Conference name",
167-
"url": "https://blackpythondevs.com/",
168-
"start_date": "2025-02-10",
169-
"end_date": "2025-09-20",
170-
"location": "Thailand",
171-
"description": "Lorem ipsum dolor sit amet consectetur adipiscing elit ...",
172-
"speaker": "Tim Osahenru"
221+
"name": "Conference name",
222+
"url": "https://blackpythondevs.com/",
223+
"start_date": "2025-02-10",
224+
"end_date": "2025-09-20",
225+
"location": "Thailand",
226+
"description": "Lorem ipsum dolor sit amet consectetur adipiscing elit ...",
227+
"speaker": "Tim Osahenru"
173228
}
174-
175229
```
176230

177231
### Regular meetups
178232

179233
We have two recurring meetups: **Coffee and Code** and our **Monthly Meetup**. These events remain consistent in format, with only the **date, time, and speaker** subject to change. Updates can be made within the `meetups` list:
180234

181-
```
182-
235+
```json
183236
{
184237
"name": "Coffee and Code",
185238
"date": "2023-09-20",
@@ -196,7 +249,4 @@ We have two recurring meetups: **Coffee and Code** and our **Monthly Meetup**. T
196249
"speaker": "Jay Miller",
197250
"topic": "Open Source"
198251
}
199-
200-
```
201-
202252
```

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ You can deploy your project locally but the fastest way to contribute is to use
226226
<br />
227227
<sub><b>Brijesh Thummar</b></sub>
228228
</a>
229+
</td>
230+
<td align="center">
231+
<a href="https://github.com/danielcrisho">
232+
<img src="https://avatars.githubusercontent.com/u/69733783?v=4" width="100;" alt="danielcristho"/>
233+
<br />
234+
<sub><b>Daniel Pepuho</b></sub>
235+
</a>
229236
</td></tr>
230237
</table>
231238
<!-- readme: collaborators,contributors -end -->

justfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Black Python Devs Website - Just recipes
2+
# Run tasks with: just <task-name>
3+
4+
# Display all available commands
5+
help:
6+
@just --list
7+
8+
# Install dependencies
9+
sync:
10+
uv sync --all-extras
11+
12+
# Run development server
13+
serve:
14+
uv run render-engine serve
15+
16+
# Build static site
17+
build:
18+
uv run --no-dev --prerelease=allow render-engine build
19+
20+
# Run linters
21+
lint:
22+
uv run ruff check .
23+
uv run ruff format --check .
24+
25+
# Install hooks
26+
install-hooks:
27+
uv run pre-commit install
28+
29+
# Run pre-commit hooks
30+
pre-commit:
31+
uv run pre-commit run --all-files
32+
33+
# Run tests
34+
test:
35+
uv run --dev pytest
36+
37+
# Run tests with verbose output
38+
test-verbose:
39+
uv run --dev pytest -v
40+
41+
# Run full development workflow
42+
dev: sync lint test build
43+
@echo "✓ Development workflow complete"

0 commit comments

Comments
 (0)