diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 47052a551..5fe5819fc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -70,3 +70,10 @@ _(REQUIRED)_ Describe to which degree an LLM was used in creating this pull request. Failure to accurately disclose LLM usage may result in review delays or closure of your PR. --> + + diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0c46df504..2521e04a2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,7 @@ on: branches: [mealie-next] paths: - 'docs/**' + - 'CONTRIBUTING.md' - '.github/workflows/docs.yml' workflow_dispatch: diff --git a/AGENTS.md b/AGENTS.md index a7ba28ffe..0d1cc0dfa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -163,6 +163,9 @@ task docker:prod # Build and run production Docker compose ### Before Submitting a PR +Read `CONTRIBUTING.md` first. Its "Writing Style" section sets the rules for PR titles, PR bodies, and commit messages written by an LLM. + + 1. **Draft PRs are optional:** Create a draft PR early if you want feedback while working, or open directly as ready when complete 2. **Verify code generation:** If you modified Pydantic schemas, ensure `task dev:generate` was run 3. **Follow Conventional Commits:** Title your PR according to the conventional commits format (see PR template) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..d63215e5e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing to Mealie + +[Please Join the Discord](https://discord.gg/QuStdQGSGK). We are building a community of developers working on the project. + +## We Develop with GitHub +We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. + +## We Use [GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow), So All Code Changes Happen Through Pull Requests +Pull requests are the best way to propose changes to the codebase (we use [GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow)). We actively welcome your pull requests: + +1. Fork the repo and create your branch from `mealie-next`. +2. Checkout the Discord, the PRs page, or the Projects page to get an idea of what's already being worked on. +3. If you're interested on working on major changes please get in touch on discord and coordinate with other developers. No sense in doubling up on work if someones already on it. +4. Once you've got an idea of what changes you want to make, create a draft PR as soon as you can to let us know what you're working on and how we can help! +5. If you've changed APIs, update the documentation. +6. Run tests, including `task py:check`. +7. Issue that pull request! First make a draft PR, make sure that the automated GitHub tests all pass, then mark as ready for review. We follow Conventional Commits syntax; please title your PR as described in the PR template. +8. Be sure to add release notes to the pull request. + +## Writing Style +This guidance applies to all contributor prose. It includes pull request titles, pull request bodies, and commit messages. + +**Human authors**: Write naturally. Use short-to-medium sentences, active voice, and direct language. Assume that the reader knows the codebase. + +**LLM authors**: Use [ASD-STE100 Simplified Technical English](https://www.asd-ste100.org/) for all text. Use this practical subset: + +- Use words from the STE approved-vocabulary dictionary. Technical names that are not in the dictionary can be used as-is (for example `mealie-next`, `task py:check`, `BaseUserController`, or `HttpRepo`). +- Use one word for one meaning. Do not vary synonyms for style. +- Use active voice only. Do not use passive constructions. +- Use present or simple past tense. Do not use `-ing` gerunds or participles as nouns. +- Limit procedures to 20 words per sentence. Limit descriptions to 25 words per sentence. +- Put one instruction in each sentence. +- Do not use idioms, metaphors, or hedging. + +The goal is text that each reviewer can understand in one read. + +## Any contributions you make will be under the AGPL Software License +In short, when you submit code changes, your submissions are understood to be under the same [AGPL License](https://choosealicense.com/licenses/agpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern. + +## Report bugs using GitHub's [issues](https://github.com/mealie-recipes/mealie/issues) +We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/mealie-recipes/mealie/issues/new); it's that easy! + +## Write bug reports with detail, background, and sample code +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce + * Be specific! + * Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) + +People *love* thorough bug reports. I'm not even kidding. + + +## License +By contributing, you agree that your contributions will be licensed under its AGPL License. + +## References +This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebookarchive/draft-js/blob/main/CONTRIBUTING.md) diff --git a/docs/docs/contributors/developers-guide/code-contributions.md b/docs/docs/contributors/developers-guide/code-contributions.md index 4acc5a4db..ea38c9bff 100644 --- a/docs/docs/contributors/developers-guide/code-contributions.md +++ b/docs/docs/contributors/developers-guide/code-contributions.md @@ -1,44 +1 @@ -# Contributing to Mealie - -[Please Join the Discord](https://discord.gg/QuStdQGSGK). We are building a community of developers working on the project. - -## We Develop with GitHub -We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. - -## We Use [GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow), So All Code Changes Happen Through Pull Requests -Pull requests are the best way to propose changes to the codebase (we use [GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow)). We actively welcome your pull requests: - -1. Fork the repo and create your branch from `mealie-next`. -2. Checkout the Discord, the PRs page, or the Projects page to get an idea of what's already being worked on. -3. If you're interested on working on major changes please get in touch on discord and coordinate with other developers. No sense in doubling up on work if someones already on it. -4. Once you've got an idea of what changes you want to make, create a draft PR as soon as you can to let us know what you're working on and how we can help! -5. If you've changed APIs, update the documentation. -6. Run tests, including `task py:check`. -7. Issue that pull request! First make a draft PR, make sure that the automated GitHub tests all pass, then mark as ready for review. We follow Conventional Commits syntax; please title your PR as described in the PR template. -8. Be sure to add release notes to the pull request. - -## Any contributions you make will be under the AGPL Software License -In short, when you submit code changes, your submissions are understood to be under the same [AGPL License](https://choosealicense.com/licenses/agpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern. - -## Report bugs using GitHub's [issues](https://github.com/mealie-recipes/mealie/issues) -We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/mealie-recipes/mealie/issues/new); it's that easy! - -## Write bug reports with detail, background, and sample code -**Great Bug Reports** tend to have: - -- A quick summary and/or background -- Steps to reproduce - * Be specific! - * Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing -- What you expected would happen -- What actually happens -- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) - -People *love* thorough bug reports. I'm not even kidding. - - -## License -By contributing, you agree that your contributions will be licensed under its AGPL License. - -## References -This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebookarchive/draft-js/blob/main/CONTRIBUTING.md) +--8<-- "CONTRIBUTING.md" diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 4ee409db0..7a46bf00c 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -52,6 +52,10 @@ markdown_extensions: class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - pymdownx.details + # Lets docs pages include files from the repo root (e.g. CONTRIBUTING.md). Paths resolve from docs/, where the docs build runs. + - pymdownx.snippets: + base_path: [".."] + check_paths: true extra: demo_url: https://demo.mealie.io extra_css: