Skip to content

docs: add code of conduct and contributing guide - #406

Merged
uniqueg merged 3 commits into
devfrom
docs/contributing
Oct 22, 2026
Merged

uniqueg merged 3 commits into
devfrom
docs/contributing

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

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, the mongodb tests 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.
  • Since FOCA's default branch isn't dev, the page says PRs refer to issues with Resolves #<issue> and the maintainers close issues after the merge (Cloud Registry: Closes).
  • README: the Contributing section now links to 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.md links to the new page and file.
  • No repository-level issue or PR templates exist in FOCA, so nothing to remove.

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.
  • No trailing whitespace; new Markdown wrapped at 80 characters except tables and code.
  • diff against Cloud Registry's CODE_OF_CONDUCT.md: identical.
  • CI: all checks pass.

Declined review findings

  • Sourcery, stale MongoDB 8.0 data in the petstore data directory: the Compose file already documents it next to the mongodb service.
  • Sourcery, concurrent integration-test runs against one local stack: not a supported workflow.
  • Sourcery, Read the Docs latest lacking the page until a release: FOCA's latest is built from dev (unreleased pages such as migration-0.16 are served there).

Fixed: the integration-test snippet now waits until the app is ready (Sourcery).

Open questions

None.

🤖 Generated with Claude Code

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]>
@sourcery-ai

sourcery-ai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This 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

Change Details Files
Add repository-local community standards and contributor entry points.
  • Add a Contributor Covenant 3.0 code of conduct with ELIXIR On-Cloud reporting contact.
  • Add a concise root contributing guide covering issues, branching, PR conventions, setup, and checks.
  • Replace organization-level README links and commands with links to the local guides and documentation.
CODE_OF_CONDUCT.md
CONTRIBUTING.md
README.md
Publish a comprehensive FOCA-specific contribution workflow in the documentation.
  • Document issue, branch, PR, squash-merge, and Conventional Commit practices for the dev workflow.
  • Document development setup, MongoDB and integration tests, CI matrices, Helm chart tests, documentation builds, and Python/library guidelines.
  • Add the page to the MkDocs navigation and link it from the documentation index.
docs/contributing.md
docs/index.md
mkdocs.yml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8ec8486) to head (2583a97).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #406   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         2510      2510           
=========================================
  Hits          2510      2510           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 22, 2026 20:33

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/contributing.md Resolved
Comment thread docs/contributing.md Resolved
Comment thread docs/contributing.md Resolved
Comment thread CONTRIBUTING.md Resolved
@uniqueg
uniqueg merged commit edf57c8 into dev Oct 22, 2026
15 checks passed
@uniqueg
uniqueg deleted the docs/contributing branch October 22, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant