You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add CONTRIBUTING.md and template-only-files strip step (#44)
* docs: add CONTRIBUTING.md and template-only-files strip step
Extends tk-342 with the dual-audience contributor flow:
- CONTRIBUTING.md: new file for people improving the template scaffold
(setup, toolchain, conventions, PR workflow, plugin-vs-template
guidance). It is template-only and travels via the strip step below.
- README.md: simplified to one audience (plugin authors). The contributor
content moved entirely to CONTRIBUTING.md, which GitHub auto-surfaces
on the repo page. This avoids dead links in scaffolded plugin repos
after Step 6 runs.
- README Setup Your Plugin: new Step 6 removes template-only files
(CODE_OF_CONDUCT.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md,
.github/ISSUE_TEMPLATE/) so scaffolded plugin repos start clean.
- docs/getting-started.md: extended with the matching strip step.
* docs: only strip CONTRIBUTING.md, restore contributor section
AGENTS.md/CLAUDE.md describe the same toolchain (tox, ruff, mypy,
bandit, Conventional Commits, mloda-registry skills) that scaffolded
plugins inherit, and CODE_OF_CONDUCT.md plus .github/ISSUE_TEMPLATE/
are sensible baselines that only need a small edit (contact email,
placeholder paths). They are working scaffold content, not template
metadata, so Step 6 keeps them.
CONTRIBUTING.md is the only file that is genuinely template-only
(its subject is "contributing to this template repo"), so it stays
in the strip list with optional-edit guidance for the rest.
The README regains its dual-audience intro and "Contribute to this
template" section pointing to CONTRIBUTING.md, AGENTS.md,
CODE_OF_CONDUCT.md, and the issue template, since most of those
links now survive Step 6.
* docs: split getting-started step 7 to clarify only CONTRIBUTING.md is removed
Thanks for considering a contribution to the **template** repo itself. This document is for people who want to improve the scaffold (CI workflows, examples, dev tooling, docs) that downstream plugin authors will inherit.
4
+
5
+
> **If you arrived here after clicking "Use this template" on GitHub:** this file does not apply to your new plugin repo. Follow the README's [Use this template](README.md#use-this-template) section, which includes a step that removes this file along with the other template-only community files.
6
+
7
+
By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md).
8
+
9
+
## Getting Started
10
+
11
+
### Prerequisites
12
+
13
+
- Python 3.10 or higher
14
+
-[uv](https://docs.astral.sh/uv/) for dependency management
15
+
-`tox` for running checks (installed via the dev extras)
2. Create the virtualenv and install dependencies:
27
+
28
+
```bash
29
+
uv venv
30
+
source .venv/bin/activate
31
+
uv sync --all-extras
32
+
```
33
+
34
+
3. Verify your setup by running the full check suite:
35
+
36
+
```bash
37
+
tox
38
+
```
39
+
40
+
## Code Style
41
+
42
+
`tox` is the gate. It runs:
43
+
44
+
-`pytest` for tests
45
+
-`ruff format --check --line-length 120` for formatting
46
+
-`ruff check` for linting
47
+
-`mypy --strict --ignore-missing-imports` for type checking
48
+
-`bandit -c pyproject.toml -r -q` for security
49
+
50
+
All of these must pass before a PR is mergeable. A separate `tox -e security` environment runs `pip-audit` for CVE scanning of installed dependencies.
51
+
52
+
### Conventions
53
+
54
+
-**Type hints**: use modern forms (`list[str]`, `dict[str, int]`, `X | None`).
55
+
-**Line length**: 120.
56
+
-**Tests**: every new feature or bug fix must come with tests; follow the patterns in `tests/` and `placeholder/.../tests/`.
57
+
-**Commits**: use [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `chore:`, `docs:`, `test:`, `refactor:`, `style:`, `ci:`, `build:`, `perf:`). semantic-release uses standard rules: `feat:` triggers a minor bump, all others trigger a patch (see `.releaserc.yaml`).
58
+
-**No `Co-Authored-By` lines or other AI agent mentions** in commit messages or PR descriptions.
59
+
60
+
## Pull Request Workflow
61
+
62
+
1. Create a feature branch from `main`:
63
+
64
+
```bash
65
+
git checkout -b fix/short-description
66
+
```
67
+
68
+
2. Make your changes; run `tox` locally and confirm it passes.
69
+
3. Commit using Conventional Commits format.
70
+
4. Push to your fork and open a pull request targeting `main`.
71
+
5. CI runs the full tox suite. All checks must pass before merge.
72
+
73
+
## Reporting Issues
74
+
75
+
Use the issue form at [.github/ISSUE_TEMPLATE/issue.yml](.github/ISSUE_TEMPLATE/issue.yml). It asks for a one-sentence summary, reproduction or motivation, optional code pointers, and an optional definition of done. See the **Issue Creation** section in [AGENTS.md](AGENTS.md) for more guidance.
76
+
77
+
## Plugin Development vs. Template Contribution
78
+
79
+
This repo is the **scaffold** for new mloda plugins, not a plugin itself. If you want to:
80
+
81
+
-**Build a new plugin**: click "Use this template" on GitHub, then follow [docs/getting-started.md](docs/getting-started.md) and the README's [Use this template](README.md#use-this-template) section. The full plugin development walkthrough lives in [mloda-registry/docs/guides/](https://github.com/mloda-ai/mloda-registry/tree/main/docs/guides/).
82
+
-**Contribute to the core framework**: see [mloda](https://github.com/mloda-ai/mloda).
83
+
-**Contribute to community plugins**: see [mloda-registry](https://github.com/mloda-ai/mloda-registry).
84
+
85
+
## License
86
+
87
+
By contributing, you agree that your contributions will be licensed under the [Apache License, Version 2.0](LICENSE).
Copy file name to clipboardExpand all lines: README.md
+37-57Lines changed: 37 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,22 @@
6
6
7
7
> **A GitHub template for creating standalone mloda plugins.** Part of the [mloda](https://github.com/mloda-ai/mloda) ecosystem for open data access. Visit [mloda.ai](https://mloda.ai) for an overview and business context, the [GitHub repository](https://github.com/mloda-ai/mloda) for technical context, or the [documentation](https://mloda-ai.github.io/mloda/) for detailed guides.
8
8
9
-
Create your own FeatureGroups, ComputeFrameworks, and Extenders as standalone packages. See the [Getting Started guide](docs/getting-started.md) to create your repository, then follow the setup steps below.
9
+
Create your own FeatureGroups, ComputeFrameworks, and Extenders as standalone packages. This repository serves two audiences:
10
+
11
+
-**Plugin authors**: click *Use this template* on GitHub to scaffold a new plugin repository, then follow the [Use this template](#use-this-template) section below.
12
+
-**Template contributors**: improving the scaffold itself? See [CONTRIBUTING.md](CONTRIBUTING.md) and the [Contribute to this template](#contribute-to-this-template) section.
10
13
11
14
## Related Repositories
12
15
13
16
-**[mloda](https://github.com/mloda-ai/mloda)**: The core library for open data access. Declaratively define what data you need, not how to get it. mloda handles feature resolution, dependency management, and compute framework abstraction automatically.
14
17
15
18
-**[mloda-registry](https://github.com/mloda-ai/mloda-registry)**: The central hub for discovering and sharing mloda plugins. Browse community-contributed FeatureGroups, find integration guides, and publish your own plugins for others to use.
16
19
17
-
## Structure
20
+
## Use this template
21
+
22
+
Click *Use this template* on GitHub to scaffold a new plugin repository. See [docs/getting-started.md](docs/getting-started.md) for the GitHub template-creation walkthrough; once your repository is in place, follow the steps below to customize the scaffold for your organization.
23
+
24
+
### Structure
18
25
19
26
```
20
27
placeholder/
@@ -34,18 +41,14 @@ placeholder/
34
41
└── my_extender.py
35
42
```
36
43
37
-
## Key Files
44
+
###Key files
38
45
39
-
-`placeholder/` - Root namespace (users rename to company name)
40
-
-`pyproject.toml` - Package config (users edit directly, not auto-generated)
46
+
-`placeholder/` - Root namespace (rename to your organization's name)
47
+
-`pyproject.toml` - Package config (edit directly, not auto-generated)
41
48
-`.github/workflows/test.yml` - CI workflow running pytest
42
49
43
-
## Common Tasks
44
-
45
50
### Setup Your Plugin
46
51
47
-
Follow these steps to customize the template for your organization:
48
-
49
52
#### 1. Rename the directory
50
53
51
54
```bash
@@ -56,18 +59,18 @@ mv placeholder acme
56
59
57
60
Edit the following fields in `pyproject.toml`:
58
61
59
-
-`name`: Change`"placeholder-my-plugin"` to `"acme-my-plugin"`
60
-
-`authors`: Update name and email
61
-
-`description`: Update to describe your plugin
62
-
-`tool.setuptools.packages.find.include`: Change`["placeholder*"]` to `["acme*"]`
63
-
-`tool.pytest.ini_options.testpaths`: Change`["placeholder", "tests"]` to `["acme", "tests"]`
62
+
-`name`: change`"placeholder-my-plugin"` to `"acme-my-plugin"`
63
+
-`authors`: update name and email
64
+
-`description`: update to describe your plugin
65
+
-`tool.setuptools.packages.find.include`: change`["placeholder*"]` to `["acme*"]`
66
+
-`tool.pytest.ini_options.testpaths`: change`["placeholder", "tests"]` to `["acme", "tests"]`
64
67
65
68
#### 3. Update .releaserc.yaml
66
69
67
70
Edit the following fields in `.releaserc.yaml`:
68
71
69
-
-`message`: Change`mloda-plugin-template` to your package name (e.g., `"chore(release acme-my-plugin): ${nextRelease.version}"`)
70
-
-`repositoryUrl`: Change to your repository URL
72
+
-`message`: change`mloda-plugin-template` to your package name (e.g., `"chore(release acme-my-plugin): ${nextRelease.version}"`)
73
+
-`repositoryUrl`: change to your repository URL
71
74
72
75
#### 4. Update Python imports
73
76
@@ -86,56 +89,33 @@ Update imports in these files (change `from placeholder.` to `from acme.`):
#### 6. Remove the template-only contributor guide
90
93
91
-
**Install uv** (if not already installed):
92
-
```bash
93
-
curl -LsSf https://astral.sh/uv/install.sh | sh
94
-
```
94
+
`CONTRIBUTING.md` describes how to contribute to the template repo itself; it does not apply to your plugin. Remove it after `tox` passes:
95
95
96
-
**Create virtual environment and install dependencies:**
97
96
```bash
98
-
uv venv
99
-
source .venv/bin/activate
100
-
uv sync --all-extras
97
+
rm CONTRIBUTING.md
101
98
```
102
99
103
-
**Run all checks with tox:**
104
-
```bash
105
-
# Install tox with uv backend
106
-
uv tool install tox --with tox-uv
100
+
The remaining baseline files apply to your plugin out of the box and can be edited to match your conventions:
107
101
108
-
# Run all checks (pytest, ruff, mypy, bandit)
109
-
tox
110
-
```
111
-
112
-
### Run individual checks
113
-
114
-
```bash
115
-
# Tests only
116
-
pytest
117
-
118
-
# Format check
119
-
ruff format --check --line-length 120 .
120
-
121
-
# Lint check
122
-
ruff check .
123
-
124
-
# Type check
125
-
mypy --strict --ignore-missing-imports .
126
-
127
-
# Security check
128
-
bandit -c pyproject.toml -r -q .
129
-
```
102
+
-`AGENTS.md` and `CLAUDE.md` — toolchain and project practices for the same `tox`/ruff/mypy/bandit pipeline you inherit. Tune the bullets if you change the toolchain.
103
+
-`CODE_OF_CONDUCT.md` — short, plain-English baseline. Update the contact (`conduct@mloda.ai` → your address) if you want enforcement to come to you.
104
+
-`.github/ISSUE_TEMPLATE/issue.yml` — unified issue form. Update the placeholder file paths to point at your renamed package.
130
105
131
-
## Related Documentation
106
+
You may also want to replace this `README.md` with one that describes your plugin.
132
107
133
-
Guides for plugin development can be found in mloda-registry:
-**[mloda-registry/docs/guides/](https://github.com/mloda-ai/mloda-registry/tree/main/docs/guides/)** — full plugin development walkthrough (FeatureGroups, ComputeFrameworks, Extenders, packaging, publishing).
111
+
-**[mloda](https://github.com/mloda-ai/mloda)** — core framework reference.
112
+
-**[Claude Code skills](https://github.com/mloda-ai/mloda-registry/tree/main/.claude/skills/)** — pattern guidance and best practices for AI-assisted plugin development.
113
+
-**[docs/github-workflows.md](docs/github-workflows.md)** — CI/CD setup and required secrets for the included workflows.
136
114
137
-
Claude Code users can leverage the skills in mloda-registry for assisted plugin development:
This section is for people improving the scaffold itself (CI workflows, dev tooling, docs, examples). See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide. Quick pointers:
140
118
141
-
This template includes pre-configured GitHub Actions workflows for testing, security scanning, and automated releases. See the [GitHub Workflows documentation](docs/github-workflows.md) for setup instructions and required secrets.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,3 +49,5 @@ Regardless of which option you chose, follow the setup steps in the [README](../
49
49
4. Update `.releaserc.yaml` (change `mloda-plugin-template` to your package name and update `repositoryUrl`)
50
50
5. Update Python imports
51
51
6. Verify with `tox`
52
+
7. Remove `CONTRIBUTING.md` — it describes contributing to the template repo, not your plugin
53
+
8. Keep `CODE_OF_CONDUCT.md`, `AGENTS.md`, `CLAUDE.md`, and `.github/ISSUE_TEMPLATE/` as inherited baselines; tune them later (contact email, placeholder paths, toolchain bullets) if you want
0 commit comments