Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,43 @@ make lint
make typecheck
```

## Testing with fixtures

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.

- `--fixture` enables fixture mode and optionally accepts a directory argument. When you pass a directory, it sets `CPA_FIXTURE_DIR` for that run.
- `CPA_CATALOG_FIXTURE=1` enables the same offline catalog path without using the flag.
- `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/`.

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.

### List templates offline

From the repository root, this works without network access:

```bash
uv run create-awesome-python-app --fixture . --list-templates
```

### Smoke scaffold with fixtures

This uses the local fixture template under [fixtures/templates/example-cli](fixtures/templates/example-cli):

```bash
repo="$(pwd)"
uv run create-awesome-python-app --fixture "$repo" --template "file://$repo/fixtures/templates/example-cli" --no-install --no-interactive ./tmp-cpa-smoke
```

If you prefer environment variables instead of the flag, the equivalent is:

```bash
export CPA_CATALOG_FIXTURE=1
export CPA_FIXTURE_DIR="$repo"
uv run create-awesome-python-app --list-templates
```

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

## Pull requests

1. Branch from `main`
Expand Down
49 changes: 46 additions & 3 deletions docs/HACKTOBERFEST.md
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
# Hacktoberfest

- Repo topics include `hacktoberfest`
- Label `Hacktoberfest` exists
- Good first issues: look for `good first issue`
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.

## Repositories newcomers can help with

| Repository | Good task types |
| --- | --- |
| [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 |
| [cpa-templates](https://github.com/Create-Python-App/cpa-templates) | Template improvements, example updates, extension polish, catalog metadata fixes |
| [website](https://github.com/Create-Python-App/website) | Landing page copy, docs navigation, examples, small UI polish |
| [taps](https://github.com/Create-Python-App/taps) | Packaging/documentation improvements, workflow tweaks, examples |

## Labels to look for

- `good first issue` for small, low-risk tasks
- `help wanted` when a maintainer is actively looking for contributions
- `Hacktoberfest` for seasonal issues that are a good fit for the event

## How to search for a task

- Start with the repository's Issues tab and filter by one of the labels above.
- Read the issue description, acceptance criteria, and linked discussion before you comment.
- Prefer tasks that are clearly scoped, have an obvious next step, and do not depend on private access.
- 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.

## Before you start

- Read [CONTRIBUTING.md](../CONTRIBUTING.md) first so you know the local workflow and expected PR style.
- Join the community Discord for quick questions and coordination: [Discord](https://discord.gg/bR5VyATgka)
- 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.

## Suggested first tasks

- Fix a typo or clarify a setup step in the docs
- Add or improve a test for a CLI or scaffolding edge case
- Help triage a small bug report or reproduce an issue locally
- Improve template metadata or examples in a repo that already has a clear scope
- Update release notes, changelog wording, or contributor-facing examples when they are clearly incomplete
- Add a small regression test for a fixture or catalog path that is currently undocumented or brittle

## What to avoid

- Do not duplicate an assigned epic just because it looks similar to another issue.
- Avoid large rewrites unless the issue explicitly asks for them or a maintainer has agreed to the scope.
- Skip tasks that require private context, deployment access, or a broad architectural decision without guidance.

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.
6 changes: 3 additions & 3 deletions packages/create-python-app-core/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,9 +75,9 @@ from create_python_app_core import resolve_source, get_template_dir_path
source = resolve_source(
"https://github.com/Create-Python-App/cpa-templates?ref=main&subdir=fastapi"
)
print(source.kind) # github
print(source.ref) # main
print(source.subdir) # fastapi
print(source.kind) # github
print(source.ref) # main
print(source.subdir) # fastapi
```

### Download a repository into the cache
Expand Down
53 changes: 26 additions & 27 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading