Skip to content

Commit 19e8b3c

Browse files
Fixture based offline testing , Hacktoberfest onboarding
1 parent f4232d3 commit 19e8b3c

2 files changed

Lines changed: 83 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,43 @@ make lint
1414
make typecheck
1515
```
1616

17+
## Testing with fixtures
18+
19+
The CLI can run entirely offline for catalog-related tests by switching into fixture mode. Use `--fixture` to opt in for a single run, or set the environment variables below for the current shell.
20+
21+
- `--fixture` enables fixture mode and optionally accepts a directory argument. When you pass a directory, it sets `CPA_FIXTURE_DIR` for that run.
22+
- `CPA_CATALOG_FIXTURE=1` enables the same offline catalog path without using the flag.
23+
- `CPA_FIXTURE_DIR=/path/to/repo` points to the repository root that contains the fixture tree. The CLI looks for `fixtures/catalog/templates.json` there, and local template sources live under `fixtures/templates/` and `fixtures/extensions/`.
24+
25+
The repository ships a small fixture catalog in [fixtures/catalog/templates.json](fixtures/catalog/templates.json) so you can list templates or run a smoke scaffold without hitting GitHub raw URLs.
26+
27+
### List templates offline
28+
29+
From the repository root, this works without network access:
30+
31+
```bash
32+
uv run create-awesome-python-app --fixture . --list-templates
33+
```
34+
35+
### Smoke scaffold with fixtures
36+
37+
This uses the local fixture template under [fixtures/templates/example-cli](fixtures/templates/example-cli):
38+
39+
```bash
40+
repo="$(pwd)"
41+
uv run create-awesome-python-app --fixture "$repo" --template "file://$repo/fixtures/templates/example-cli" --no-install --no-interactive ./tmp-cpa-smoke
42+
```
43+
44+
If you prefer environment variables instead of the flag, the equivalent is:
45+
46+
```bash
47+
export CPA_CATALOG_FIXTURE=1
48+
export CPA_FIXTURE_DIR="$repo"
49+
uv run create-awesome-python-app --list-templates
50+
```
51+
52+
The fixture behavior is exercised in [packages/create-awesome-python-app/tests/test_cli.py](packages/create-awesome-python-app/tests/test_cli.py) and [packages/create-awesome-python-app/tests/test_catalog_fetch.py](packages/create-awesome-python-app/tests/test_catalog_fetch.py).
53+
1754
## Pull requests
1855

1956
1. Branch from `main`

docs/HACKTOBERFEST.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Hacktoberfest
22

3-
- Repo topics include `hacktoberfest`
4-
- Label `Hacktoberfest` exists
5-
- Good first issues: look for `good first issue`
3+
Hacktoberfest is a good time to contribute to the Create Python App ecosystem, especially if you want a small, well-scoped task. The fastest way to get started is to pick a repo, scan for the right labels, and read the contributor guide before opening a PR.
4+
5+
## Repositories newcomers can help with
6+
7+
| Repository | Good task types |
8+
| --- | --- |
9+
| [create-python-app](https://github.com/Create-Python-App/create-python-app) | CLI bug fixes, docs polish, fixture/test improvements, release notes, contributor experience work |
10+
| [cpa-templates](https://github.com/Create-Python-App/cpa-templates) | Template improvements, example updates, extension polish, catalog metadata fixes |
11+
| [website](https://github.com/Create-Python-App/website) | Landing page copy, docs navigation, examples, small UI polish |
12+
| [taps](https://github.com/Create-Python-App/taps) | Packaging/documentation improvements, workflow tweaks, examples |
13+
14+
## Labels to look for
15+
16+
- `good first issue` for small, low-risk tasks
17+
- `help wanted` when a maintainer is actively looking for contributions
18+
- `Hacktoberfest` for seasonal issues that are a good fit for the event
19+
20+
## How to search for a task
21+
22+
- Start with the repository's Issues tab and filter by one of the labels above.
23+
- Read the issue description, acceptance criteria, and linked discussion before you comment.
24+
- Prefer tasks that are clearly scoped, have an obvious next step, and do not depend on private access.
25+
- If you are not sure where to begin, ask in Discord or open a short note on the issue to say you are reviewing it.
26+
27+
## Before you start
28+
29+
- Read [CONTRIBUTING.md](../CONTRIBUTING.md) first so you know the local workflow and expected PR style.
30+
- Join the community Discord for quick questions and coordination: https://discord.gg/bR5VyATgka
31+
- If you are considering an assigned epic such as AI/ML catalog work, avoid duplicating it casually. Confirm the issue is still open and ask in Discord or on the issue thread before you start a parallel effort.
32+
33+
## Suggested first tasks
34+
35+
- Fix a typo or clarify a setup step in the docs
36+
- Add or improve a test for a CLI or scaffolding edge case
37+
- Help triage a small bug report or reproduce an issue locally
38+
- Improve template metadata or examples in a repo that already has a clear scope
39+
- Update release notes, changelog wording, or contributor-facing examples when they are clearly incomplete
40+
- Add a small regression test for a fixture or catalog path that is currently undocumented or brittle
41+
42+
## What to avoid
43+
44+
- Do not duplicate an assigned epic just because it looks similar to another issue.
45+
- Avoid large rewrites unless the issue explicitly asks for them or a maintainer has agreed to the scope.
46+
- Skip tasks that require private context, deployment access, or a broad architectural decision without guidance.
47+
48+
A good rule of thumb is to choose a task that is small enough to finish in one PR and clearly linked to an existing issue or discussion.

0 commit comments

Comments
 (0)