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
Copy file name to clipboardExpand all lines: docs/contributing.md
+74-14Lines changed: 74 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
##Contribution Guidelines
1
+
# Contribution Guidelines
2
2
3
3
Thank you for considering contributing to our Python package! We appreciate your time and effort in helping us improve our project. Please take a moment to review the following guidelines to ensure a smooth and efficient contribution process.
4
4
5
-
###Code of Conduct
5
+
## Code of Conduct
6
6
7
7
We kindly request all contributors to adhere to our Code of Conduct when participating in this project. It outlines our expectations for respectful and inclusive behavior within the community.
8
8
9
-
###Setting Up Development Environment
9
+
## Setting Up Development Environment
10
10
11
11
Before you start contributing to the project, you need to set up your development environment. This will allow you to make changes to the codebase, run tests, and build the documentation locally. The project uses `poetry` for dependency management and packaging. Along with that, `ruff` is used for source code formatting and linting.
5. Update the documentation and examples, if necessary.
70
70
6. Build the html documentation and verify if it works as expected. We have used Sphinx for documentation, you could build the documents as follows:
71
-
-`cd src/docs`
71
+
-`cd docs`
72
72
-`make clean`
73
73
-`make html`
74
74
7. Verify the html documents created under `docs/_build/html` directory. `index.html` file is the main file which contains link to all other files and doctree.
| PR touching `docs/**`, `deeptab/**`, `README.md`, or `pyproject.toml`| Sphinx build check — PR is blocked if docs are broken | No publish |
92
+
| Merge to `main`| Sphinx build check | Publishes **latest** (dev) version |
93
+
| Stable tag pushed (`vX.Y.Z`) | Sphinx build check from that exact tagged commit | Publishes **versioned** snapshot and updates **stable** alias |
94
+
| RC tag pushed (`vX.Y.Zrc1`) | Sphinx build check from that exact tagged commit | Publishes versioned pre-release snapshot |
95
+
96
+
> **Note:** The docs CI `push` trigger has **no `paths:` filter** — tag pushes always run the full docs build regardless of which files changed in the tagged commit. The `paths:` filter only applies to PRs to keep checks fast.
97
+
98
+
> **Note:** Versioned and stable docs require **"Build tags"** to be enabled in the Read the Docs project settings under _Admin → Advanced settings_. RTD automatically sets the `stable` alias to the highest non-pre-release tag.
99
+
100
+
### Tag → versioned docs flow
101
+
102
+
```
103
+
git tag -a v1.7.0 -m "Release v1.7.0"
104
+
git push origin v1.7.0
105
+
↓
106
+
docs.yml triggers on that exact tagged commit
107
+
↓
108
+
Sphinx build succeeds (or blocks if broken)
109
+
↓
110
+
RTD webhook fires → builds docs from v1.7.0 source
111
+
↓
112
+
RTD publishes /en/v1.7.0/ (versioned)
113
+
↓
114
+
RTD updates /en/stable/ → points to v1.7.0
115
+
```
116
+
117
+
RC tags (`vX.Y.Zrc1`) follow the same flow but RTD does **not** update the `stable` alias for pre-release tags.
118
+
119
+
### Building docs locally
120
+
121
+
```bash
122
+
# Install system dependency (macOS)
123
+
brew install pandoc
124
+
# or on Ubuntu
125
+
sudo apt-get install pandoc
126
+
127
+
# Install doc dependencies
128
+
pip install -r docs/requirements_docs.txt
129
+
130
+
# Build HTML docs (warnings treated as errors)
131
+
sphinx-build -b html docs/ docs/_build/html -W --keep-going
132
+
133
+
# Open in browser
134
+
open docs/_build/html/index.html
135
+
```
136
+
137
+
### Version resolution
138
+
139
+
The docs version is read at build time from the installed package metadata via `importlib.metadata.version("deeptab")`, which reflects the version in `pyproject.toml`. No separate version file is maintained.
140
+
141
+
## Release Workflow
82
142
83
143
This project uses conventional commits and intentional, maintainer-controlled releases.
84
144
85
-
####Release Process Overview
145
+
### Release Process Overview
86
146
87
147
```
88
148
1. Make Changes → 2. Conventional Commit → 3. Merge to Main → 4. CI runs
@@ -121,15 +181,15 @@ This project uses conventional commits and intentional, maintainer-controlled re
121
181
- This tag push triggers `publish-pypi.yml` → builds and publishes to PyPI + creates GitHub Release
122
182
- For RC tags (`vX.Y.Zrc1`), push triggers `publish-testpypi.yml` → publishes to TestPyPI instead
Commit messages determine the version bump chosen by the maintainer when running `cz bump`:
135
195
@@ -140,7 +200,7 @@ Commit messages determine the version bump chosen by the maintainer when running
140
200
|`feat!:` / `BREAKING CHANGE:`| Major (x.0.0) |
141
201
|`docs:`, `style:`, `refactor:`, `test:`, `chore:`, `ci:`| No release needed |
142
202
143
-
#### Example Scenarios
203
+
### Example Scenarios
144
204
145
205
**Scenario 1: Documentation Update (No Release)**
146
206
@@ -172,14 +232,14 @@ git push origin v1.7.0rc1
172
232
# → PyPI pre-release, GitHub pre-release
173
233
```
174
234
175
-
#### Important Notes
235
+
### Important Notes
176
236
177
237
- **Merging to `main` never triggers a PyPI release**
178
238
- **Only a manually pushed `v*` tag triggers publishing**
179
239
- **Never manually edit the version number**in`pyproject.toml` — use `cz bump` on a release branch
180
240
- **PyPI publishing** uses OIDC Trusted Publishing — no API tokens are stored in GitHub secrets
181
241
182
-
### Submitting Contributions
242
+
## Submitting Contributions
183
243
184
244
When submitting your contributions, please ensure the following:
185
245
@@ -190,11 +250,11 @@ When submitting your contributions, please ensure the following:
190
250
- Update the documentation if necessary to reflect the changes made.
191
251
- Ensure that your pull request has a single, logical focus.
192
252
193
-
### Issue Tracker
253
+
## Issue Tracker
194
254
195
255
If you encounter any bugs, have feature requests, or need assistance, please visit our [Issue Tracker](https://github.com/OpenTabular/DeepTab/issues). Make sure to search for existing issues before creating a new one.
196
256
197
-
### License
257
+
## License
198
258
199
259
By contributing to this project, you agree that your contributions will be licensed under the LICENSE of the project.
200
260
Please note that the above guidelines are subject to change, and the project maintainers hold the right to reject or request modifications to any contributions. Thank you for your understanding and support in making this project better!
0 commit comments