Skip to content

Commit 6697a5f

Browse files
Update maintainer guide (#1263)
* Update maintainer guide * update makefile
1 parent 741773f commit 6697a5f

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ docs_watch: ## Build docs and watch for changes
6767
python scripts/docs.py build --source docs --destination ${FRONTEND_PATH}/content/docs --watch
6868

6969
docs_publish: ## Tag and push `docs-next` ref
70+
git tag -d docs && git tag docs && git push --force origin docs
71+
72+
docs_publish_dev: ## Tag and push `docs-next` ref
7073
git tag -d docs-next && git tag docs-next && git push --force origin docs-next
7174

7275
##

docs/14.contributing.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,21 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH
5858

5959
### Git workflow
6060

61-
- Default branches are `next` for the latest release and `current` for the previous one. `next` is the default branch for pull requests.
62-
- Branch names SHOULD follow the `prefix/short-description` format. Prefixes currently in use: `feat` for features, `fix` for bugfixes, `docs` for documentation, `exp` for experiments, `ref` for refactoring, `ci` for GitHub Actions, scripts and Docker stuff, `aux` for everything else.
61+
- Default branch for pull requests is `next`.
6362
- Commits in pull requests MUST be squashed when merging to `next`.
6463
- Issues and pull requests MUST have a descriptive title; they SHOULD be linked to each other, appropriately labeled, and assigned to maintainers while in progress.
64+
- Branch names SHOULD follow the `prefix/short-description` format.
65+
66+
Consider using the following prefixes:
67+
68+
- `feat` for features,
69+
- `fix` for bugfixes,
70+
- `docs` for documentation
71+
- `exp` for experiments
72+
- `ref` for refactoring
73+
- `ci` for GitHub Actions, scripts and Docker stuff
74+
- `bump` for version bumps
75+
- `aux` for everything else.
6576

6677
### Codestyle
6778

@@ -81,13 +92,23 @@ We use several tools to enforce code style and quality: `ruff` for both formatti
8192

8293
### Documentation
8394

84-
- We have a complex process of building and deploying docs. It starts with Markdown files in the `docs` directory. Then the `scripts/docs.py` script generates several dynamic pages, API references, processes custom Cookiecutter-style macros, and so on. The resulting Markdown is pushed to the private frontend repository via the `docs.yml` GitHub Action. The `docs.py` script code should answer most of your questions.
95+
We have a complex process of building and deploying docs. It starts with Markdown files in the `docs` directory. Then the `scripts/docs.py` script generates several dynamic pages, API references, processes custom Cookiecutter-style macros, and so on. The resulting Markdown is pushed to the private frontend repository `dipdup-io/interface` via the `docs.yml` GitHub Action. The `docs.py` script code should answer most of your questions.
96+
8597
- All public APIs MUST be documented using docstrings. We use the reStructuredText (reST) syntax.
8698
- A page in the "Release notes" section MUST accompany all major and minor releases. Avoid using the `#include` macro in Release notes as they should not change after publication.
8799

100+
#### Publishing docs
101+
102+
To publish the docs you need to force-push `docs` or `docs-next` tags. Use the following table:
103+
104+
| url | `dipdup` tag | `interface` branch | description | command |
105+
| ------------- | ------------ | ------------------ | --------------------------------- | ----------------------- |
106+
| dipdup.io | `docs` | `master` | Stable version docs | `make docs_publish` |
107+
| dev.dipdup.io | `docs-next` | `dev` | Latest docs and interface changes | `make docs_publish_dev` |
108+
88109
### Dependencies
89110

90-
- All dependencies MUST be declared in the `pyproject.toml` file and pinned to non-breaking versions. We are more of an application than a library, so no asterisks, please.
111+
- All dependencies MUST be declared in the `pyproject.toml` file and pinned to non-breaking versions. Do not use extras until PEP 771 is implemented.
91112

92113
### Security
93114

@@ -119,13 +140,15 @@ We use several tools to enforce code style and quality: `ruff` for both formatti
119140
Releasing a new version currently requires some manual actions:
120141

121142
1. Ensure that all GitHub issues and PRs are closed and linked to the milestone.
122-
2. Checkout to an `aux/X.Y.Z` branch from `next`. Update DipDup version in `pyproject.toml`.
123-
3. Run `make before_release` to lock dependencies, dump `requirements.txt` files, generate demo projects, etc.
143+
2. Checkout to an `bump/X.Y.Z` branch from `next`. Update DipDup version in `pyproject.toml`.
144+
3. Run `make before_release` to lock dependencies, dump `requirements.txt` files, generate demo projects, docs, etc. Avoid adding other changes to this branch.
124145
4. Commit and push all changes with a message like `Bump version X.Y.Z`. Open a PR and link it to the milestone.
125-
5. Optionally, switch Docker images of hosted demos to the `aux-X.Y.Z` tag as a smoke test.
126-
6. Merge the PR, then `git tag X.Y.Z && git push origin X.Y.Z`. Wait for `release.yml` and `docs.yml` pipelines to finish.
146+
5. Optionally, temporary switch Docker images of hosted demos to the `aux-X.Y.Z` tag as a smoke test.
147+
6. Merge the PR, then `git tag X.Y.Z && git push origin X.Y.Z`. Wait for `release.yml` pipeline to finish.
127148
7. Announce the release on Twitter and Discord.
128149

150+
This process should be automated in the future.
151+
129152
## MIT License
130153

131154
<!-- markdownlint-disable first-line-h1 -->

0 commit comments

Comments
 (0)