From 152092cfb4f7605aa3a94b0222a212b6f79f3dae Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Wed, 14 Oct 2026 07:45:06 -0400 Subject: [PATCH] community: CODEOWNERS, issue and PR templates, code of conduct, claiming issues; CI on pull requests from forks Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm --- .github/CODEOWNERS | 2 ++ .github/ISSUE_TEMPLATE/bug.yml | 21 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature.yml | 16 ++++++++++++++++ .github/pull_request_template.md | 11 +++++++++++ .github/workflows/ci.yml | 19 ++++++++++++++++--- CODE_OF_CONDUCT.md | 16 ++++++++++++++++ CONTRIBUTING.md | 23 ++++++++++++++++++++++- 8 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml create mode 100644 .github/pull_request_template.md create mode 100644 CODE_OF_CONDUCT.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..c82c52c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Every change to FieldCraft needs the maintainer's review before it merges. +* @jyviko diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..6e65ee1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,21 @@ +name: Bug report +description: Something FieldCraft does wrong, or a crash +labels: [bug] +body: + - type: textarea + id: what + attributes: + label: What happened + description: What you did, what you expected, and what FieldCraft did instead. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: How to reproduce + description: The commands, script, `.fieldcraft` or `.solidcraft` file that shows it. For a crash, attach the crash report folder (`fieldcraft-cli crashes`). + - type: input + id: version + attributes: + label: Version and platform + placeholder: "v0.1.0, macOS 15 arm64" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..7556c55 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,16 @@ +name: Feature request +description: A capability FieldCraft should have +labels: [enhancement] +body: + - type: textarea + id: need + attributes: + label: What you need and why + description: The analysis or workflow you are trying to do. + validations: + required: true + - type: textarea + id: reference + attributes: + label: References + description: Papers, textbooks or published benchmarks that define the behaviour. Do not paste text, files or results from commercial CAE products. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..2b7614e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +Closes # + +## What and why + +## How it was verified + + +## Checklist +- [ ] The issue was assigned to me before I started (see CONTRIBUTING.md) +- [ ] `cargo fmt --all`, `cargo clippy -p --all-targets -- -D warnings` and their tests pass +- [ ] No code, text or data from GPL-family projects or commercial CAE products diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21dad52..c8e321f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,17 @@ name: CI -# CI runs once per merge, on main (AGENTS.md, "Workflow for every change"): pull requests are -# checked locally on the crates they touch and merged; a red main is fixed forward. +# CI runs once per merge, on main (AGENTS.md, "Workflow for every change"): the core team's pull +# requests are checked locally on the crates they touch and merged; a red main is fixed forward. +# Pull requests from forks (outside contributors) run the full gate, once the maintainer approves +# the run, so the review sees it. on: + pull_request: + paths: + - '**' + - '!**/*.md' + - '!docs/**' + - 'docs/features.md' + - 'docs/oracle.md' push: branches: [main] # A merge that only touches prose starts no run. The generated pages are checked by the jobs @@ -26,7 +35,7 @@ permissions: # once, at the tip. Nightly and manual runs are grouped apart and never cancelled by a merge. concurrency: group: ci-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: ${{ github.event_name == 'push' }} + cancel-in-progress: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} env: CARGO_TERM_COLOR: always @@ -34,6 +43,7 @@ env: jobs: ci: name: cargo xtask ci + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ubuntu-24.04 timeout-minutes: 60 steps: @@ -50,6 +60,7 @@ jobs: heavy: # The heavy verification and corpus tests (#[ignore]d) and the doc tests. name: cargo xtask test --heavy + if: github.event_name != 'pull_request' runs-on: ubuntu-24.04 timeout-minutes: 60 steps: @@ -65,6 +76,7 @@ jobs: # its fixture, and docs/oracle.md must be the table the cases produce. Cases marked `slow` # run here too while the whole set stays within a few minutes; `--quick` skips them. name: cargo xtask oracle + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ubuntu-24.04 timeout-minutes: 45 steps: @@ -80,6 +92,7 @@ jobs: advisories: name: Dependency advisories and sources + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ubuntu-24.04 timeout-minutes: 20 steps: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..a9d0dd4 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,16 @@ +# Code of conduct + +FieldCraft is built in the open by people with different backgrounds and levels of experience. +Everyone taking part — in issues, pull requests, reviews and discussions — is expected to: + +- be respectful and assume good intent; criticise work, never people; +- keep discussion technical, specific and on topic; +- not harass, insult, demean or discriminate against anyone, publicly or privately; +- respect the project's decisions on scope, licences and clean-room rules. + +The maintainer may edit or remove comments, close threads, and block anyone who does not follow +this code. Report problems privately to the maintainer through the contact on the GitHub +profile of [@jyviko](https://github.com/jyviko). + +This code is our own, written in the spirit of the +[Contributor Covenant](https://www.contributor-covenant.org/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 864d0da..8398041 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,8 +3,25 @@ Thanks for helping. Read [AGENTS.md](AGENTS.md) first: it holds the rules every change follows, whether a person or an agent writes it. +## Before you start: claim an issue + +Every change starts from an issue, and only the maintainer merges. + +1. Pick an open issue labelled **help wanted** or **good first issue** that is not labelled + **claimed**. If what you want to do has no issue, open one first and wait for a reply. +2. Comment that you would like to take it. The maintainer assigns it to you and labels it + **claimed**; then it is yours. Work on unassigned issues may not be accepted. +3. Open a draft pull request early, linked with `Closes #N`. An issue with no visible progress + for 14 days goes back to the pool. + +Issues labelled **in progress** are being worked on by the core team; please don't start on them. + +## Making the change + 1. Branch from `main`, keep a pull request to one topic. -2. Run `cargo xtask ci` before pushing; CI runs the same gates. +2. Before pushing: `cargo fmt --all`, and `cargo clippy -p --all-targets -- -D warnings` + and `cargo test -p ` for the crates you touched. CI runs the full gate on your pull + request once the maintainer approves the run. 3. User-visible behaviour is a command (`crates/engine/src/cmd/`) with tests, including hostile parameters. 4. Meshing and solver algorithms cite the paper they come from in the module docs. @@ -12,3 +29,7 @@ whether a person or an agent writes it. (see [docs/adr/0001-libraries.md](docs/adr/0001-libraries.md)). By contributing you agree your work is licensed under MIT OR Apache-2.0. + +`main` is protected: changes land only through pull requests that the maintainer has reviewed, +as rebase merges (keep each commit building and passing its tests). Be kind: see the +[code of conduct](CODE_OF_CONDUCT.md).