Repository navigation
docs: add code of conduct and contributing guide - #406
Conversation
Add the Contributor Covenant 3.0 code of conduct, identical to Cloud Registry's, and a short CONTRIBUTING.md with a Contributing docs page, adapted from Cloud Registry's to FOCA: development setup and checks, the test jobs (Python 3.11 to 3.14, MongoDB 7.0 and 8.0, lowest direct dependencies, petstore integration tests, Helm chart tests), and the Python, commit and documentation guidelines. The README's development instructions move to that page; README and docs link to the new files instead of the organization's. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThis documentation-only PR establishes local community and contribution guidance, then centralizes FOCA’s development workflow and project-specific testing, compatibility, packaging, and documentation practices in a new navigated documentation page. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #406 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 2510 2510
=========================================
Hits 2510 2510
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/contributing.md" line_range="144" />
<code_context>
+```bash
+cd examples/petstore
+docker compose build foca-petstore-root # FOCA image
+docker compose up -d --build
+cd ../..
+pytest tests/integration_tests.py
</code_context>
<issue_to_address>
**Integration tests fail during startup**
When the petstore app has not finished starting when pytest begins, `pytest tests/integration_tests.py` sends HTTP requests before the app is listening on port 8080, so the requests fail with connection errors and contributors see flaky integration-test failures.
Wait for the petstore service to become ready before running pytest.
Also at `docs/contributing.md:146`.
</issue_to_address>
### Comment 2
<location path="docs/contributing.md" line_range="144" />
<code_context>
+```bash
+cd examples/petstore
+docker compose build foca-petstore-root # FOCA image
+docker compose up -d --build
+cd ../..
+pytest tests/integration_tests.py
</code_context>
<issue_to_address>
**Stale MongoDB data blocks integration tests**
When the petstore data directory contains files written by MongoDB 8.0, the Compose stack starts MongoDB 7.0 against the existing data directory, which MongoDB 7.0 cannot use if it was written by MongoDB 8.0; MongoDB fails to start and the integration tests fail to connect.
Add a note to remove `examples/petstore/data/petstore/db` before starting Compose when its data was created with MongoDB 8.0.
</issue_to_address>
### Comment 3
<location path="docs/contributing.md" line_range="146" />
<code_context>
+docker compose build foca-petstore-root # FOCA image
+docker compose up -d --build
+cd ../..
+pytest tests/integration_tests.py
+```
+
</code_context>
<issue_to_address>
**Concurrent integration runs interfere**
When two contributors or test processes run the documented integration tests concurrently against the same local Compose stack, both pytest processes target the same petstore service and database. If each reads the initial record count before either inserts, each expects one new record but sees two, so the integration test fails.
Isolate each run with its own service and database, or explicitly serialize local integration-test runs.
</issue_to_address>
### Comment 4
<location path="CONTRIBUTING.md" line_range="23" />
<code_context>
+
+**See [Contributing in the
+documentation](https://foca.readthedocs.io/en/latest/contributing/) for the
+details**, including the development setup, the tests (Python versions,
+MongoDB, Helm charts) and the Python guidelines.
</code_context>
<issue_to_address>
**Hosted guide link stays unavailable**
When the change has merged into `dev` but has not yet been included in a release on `main`, the Read the Docs `latest` build follows the default branch, where the new page is absent until a release advances `main`; these links therefore lead contributors to a missing page after this change is merged into `dev`.
Link to the `dev` source page or configure Read the Docs to publish this page to the `latest` version before release.
Also at `README.md:182`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 4 findings to address first, and the new conduct policy gives moderators a basis to limit, suspend, or permanently remove someone from community spaces. Reverting the documents would not automatically reverse actions already taken, though access can be restored and the impact is bounded.
Blocking findings: docs/contributing.md:144, docs/contributing.md:144, docs/contributing.md:146, CONTRIBUTING.md:23
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Resolves #399 (merged into
dev, so the issue is closed by hand).CODE_OF_CONDUCT.md: Contributor Covenant 3.0, byte-identical to Cloud Registry's (contact[email protected]).CONTRIBUTING.md: short, as in Cloud Registry (issues, branches and pull requests, PR titles, setup and checks), pointing to the docs page.docs/contributing.md(new nav entry "Contributing"): Cloud Registry's page adapted to FOCA. FOCA has no separate development page, so the development setup and checks are a section of this page: Python 3.11+, pre-commit + mypy + coverage, themongodbtests on port 12345, the CI test matrix (Python 3.11 to 3.14 with MongoDB 7.0, Python 3.13 with MongoDB 8.0, lowest direct dependencies, petstore integration tests), and the Helm chart tests (linking to "Developing the library chart"). The Python guidelines add library concerns: compatibility with all supported Python and dependency versions, migration notes for breaking changes,py.typed. Releasing stays in the README and is linked from the page.dev, the page says PRs refer to issues withResolves #<issue>and the maintainers close issues after the merge (Cloud Registry:Closes).CONTRIBUTING.md, the docs page and the code of conduct (instead of the organization's files); its test and docs-build commands moved to the docs page.docs/index.mdlinks to the new page and file.Light lane: documentation only (no code, CI, secrets or permissions), so the reviewer subagents and the Sourcery wait are skipped.
Verification
mkdocs build --strict(Python 3.13,.[docs]): builds without warnings.diffagainst Cloud Registry'sCODE_OF_CONDUCT.md: identical.Declined review findings
mongodbservice.latestlacking the page until a release: FOCA'slatestis built fromdev(unreleased pages such asmigration-0.16are served there).Fixed: the integration-test snippet now waits until the app is ready (Sourcery).
Open questions
None.
🤖 Generated with Claude Code