Skip to content

Commit 26eff62

Browse files
authored
Merge pull request #542 from KhiopsML/532-rename-the-dev-branch-to-main
532 rename the dev branch to main
2 parents 10fb357 + 9c37e1e commit 26eff62

File tree

4 files changed

+38
-55
lines changed

4 files changed

+38
-55
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ _Put your message here_
44
---
55

66
### TODO Before Asking for a Review
7-
- [ ] Rebase your branch to the latest version of `dev` (or `main` for release PRs)
7+
- [ ] Rebase your branch to the latest version of `main` (or `main-v10`)
88
- [ ] Make sure all CI workflows are green
99
- [ ] When adding a public feature/fix: Update the `Unreleased` section of `CHANGELOG.md` (no date)
1010
- [ ] Self-Review: Review "Files Changed" tab and fix any problems you find
1111
- API Docs (only if there are changes in docstrings, rst files or samples):
1212
- [ ] Check the docs build **without** warning: see the log of the API Docs workflow
1313
- [ ] Check that your changes render well in HTML: download the API Docs artifact and open `index.html`
14-
- If there are any problems it is faster to iterate by [building locally the API Docs](../blob/dev/doc/README.md#build-the-documentation)
14+
- If there are any problems it is faster to iterate by [building locally the API Docs](../blob/main/doc/README.md#build-the-documentation)

.github/workflows/dev-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ jobs:
8181
- name: Set up the Docker Image Tags
8282
run: |
8383
set -x
84-
# Set latest only if requested and on "dev", "dev-v10" or "main" branch
84+
# Set latest only if requested and on "main-v10" or "main" branch
8585
if [[ "${{ inputs.set-latest }}" == "true" &&
86-
("$GITHUB_REF_NAME" == "dev" || "$GITHUB_REF_NAME" == "dev-v10" || "$GITHUB_REF_NAME" == "main") ]]
86+
("$GITHUB_REF_NAME" == "main-v10" || "$GITHUB_REF_NAME" == "main") ]]
8787
then
8888
DOCKER_IMAGE_TAGS="$IMAGE_URL:latest,$IMAGE_URL:$KHIOPS_REVISION.$IMAGE_INCREMENT"
8989
else

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ jobs:
112112
rm -f requires.txt
113113
done
114114
- name: Configure Expensive Tests Setting
115-
# Skip expensive tests by default, unless on the `dev`, `dev-v10` or `main` branches
116-
if: github.ref != 'dev' && github.ref != 'dev-v10' && github.ref != 'main' && ! inputs.run-expensive-tests
115+
# Skip expensive tests by default, unless on the `main-v10` or `main` branches
116+
if: github.ref != 'main-v10' && github.ref != 'main' && ! inputs.run-expensive-tests
117117
run: echo "SKIP_EXPENSIVE_TESTS=true" >> "$GITHUB_ENV"
118118
- name: Prepare Integration Tests on remote files
119119
if: env.SKIP_EXPENSIVE_TESTS != 'true'

CONTRIBUTING.md

Lines changed: 32 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ See the documentation practices and tools [here](./doc/README.md).
125125
### Main Guiding Principles
126126
> The commit history must be the cleanest possible
127127
128-
> The `dev` branch must pass all tests
128+
> The `main` branch must pass all tests
129129
130130
### Commits
131131
#### Commit Message
@@ -143,47 +143,43 @@ eventually answer more thoroughly *What do these changes do?* but try create com
143143
"atomic" enough so that their title suffices to answer this question.
144144

145145
#### Rewriting History
146-
Rewriting commit history is only allowed in feature branches and `dev`. Rewriting the history in
147-
`dev` is very limited: it should be only done to serious problems in the history. It is forbidden to
146+
Rewriting commit history is only allowed in feature branches. It is forbidden to
148147
rebase before the last merge commit.
149148

150149
A usual application of history rewriting is to eliminate commits named "Fix previous commit". In
151150
this case use `rebase` to rewrite the history as follows:
152151
```bash
153-
git rebase -i <ROOT-REF> # Usually ROOT-REF is either "dev", "HEAD~2" or a specific hash
152+
git rebase -i <ROOT-REF> # Usually ROOT-REF is either "main", "HEAD~2" or a specific hash
154153
```
155154
to interactively move and squash fix commits with the `fixup` or `squash` operator. Usually this
156155
operation will make your feature branch diverge from `origin` (GitHub repo), so a `git push --force`
157156
is necessary to update it.
158157

159-
More generally, rewriting allows to obtain a commit history that is the cleanest possible. See [Git
160-
Rewriting History](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) for more details.
158+
More generally, history rewriting allows to obtain a commit history that is the cleanest possible.
159+
See [Git Rewriting History](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) for more details.
161160

162161
**Warning:** Do not rebase on a commit before the branching point of your feature branch as it may
163162
screw up your local repository by erasing merge commits.
164163

165164
### Branches and Development Workflow
166-
We use feature branches that branch/merge from/to `dev`. The `main` branch is only used for final
165+
We use feature branches that branch/merge from/to `main`, which is also used for
167166
releases.
168167

169168
The rules for the branches are:
170-
- Feature branches: You can commit and rewrite the branch at will. It should pass the CI/CD workflows
171-
before merging to `dev`. Note that only short tests are run in feature branches.
172-
- `dev` branch: You should avoid directly commit and rewrite this branch (and only maintainers
173-
can do it). This branch may not succeed all the CI/CD workflows since short and long tests are run.
174-
You may release beta versions from this branch.
175-
- `main` branch: Only merges from `dev` are accepted. All CI/CD workflows must succeed (this
169+
- Feature branches: You can commit and rewrite the branch history at will. It should pass the CI/CD workflows
170+
before merging to `main`. Note that only short tests are run in feature branches.
171+
- `main` branch: Only merges from feature branches are accepted. All CI/CD workflows must succeed (this
176172
includes the long tests).
177173

178174
As for the use of feature branches, GitHub makes it easy to implement the following workflow:
179175
- Create an issue for the particular feature/fix/etc.
180176
- Create a branch for the issue by clicking the "Create a branch" link in the issue's right column.
181177
- Develop, commit changes locally. Don't hesitate to rewrite the branch history if it is clearer.
182-
This will create a feature branch from `dev` with a name starting with the issue number followed
178+
This will create a feature branch from `main` with a name starting with the issue number followed
183179
by the issue title.
184180
- Once you have some commits (`WIP`s or otherwise), you may push your branch and create a pull
185181
request (PR) for the issue.
186-
- pull `dev` and rebase on it if there are new changes (see [below](#rebasing-on-develop))
182+
- pull `main` and rebase on it if there are new changes (see below)
187183
- Push your feature branch to GitHub (if necessary, use `push --force` to rewrite the feature branch
188184
history) and ensure that it passes the CI/CD jobs.
189185
- Ask the PR be reviewed by another team member:
@@ -206,18 +202,18 @@ _Pros:_
206202

207203
_Cons:_
208204
- Extra commits in history.
209-
- Non-linear `dev` and `main` history.
205+
- Non-linear `main` history.
210206

211-
### Rebasing on `dev`
212-
It may happen that the `dev` branch was updated while you are developing your feature branch.
207+
### Rebasing on `main`
208+
It may happen that the `main` branch was updated while you are developing your feature branch.
213209
To avoid extra merge commits do the following to update your local copy of your feature branch:
214210
```bash
215211
# on my-feat-branch
216212
git stash # only when you have non-committed changes
217-
git switch dev
213+
git switch main
218214
git pull
219215
git switch my-feat-branch
220-
git rebase dev
216+
git rebase main
221217
# fix any conflicts you may have
222218
git stash pop # only when you have non-committed changes
223219
```
@@ -232,25 +228,25 @@ data-science packages:
232228
- [Scikit-learn](https://scikit-learn.org/stable/)
233229
- [Pandas](https://pandas.pydata.org/)
234230

235-
Note that these 4 packages already have a sizable number of dependencies. We should discuss
231+
Note that these 2 packages already have a sizable number of dependencies. We should discuss
236232
thoroughly the pros and cons of any new external package dependency before adding it.
237233

238234
### Development/Build dependencies
239235
For development dependencies (eg. `black`, `isort`, `sphinx`, `wrapt`, `furo`) we can be more
240-
carefree while still trying to not add too many dependencies.
236+
carefree while still trying not to add too many dependencies.
241237

242238
### Python Support Policy
243239
Our Python support policy is the following:
244240
- We start supporting a new Python version **within 3 months** of its official release.
245241
- We support an old Python version **up to 6 months** from its official end of
246242
support by the Python developers.
247243

248-
By _supporting a Python version_ we mean that we pass all our test batteries in the specified
244+
By _supporting a Python version_ we mean that we pass all our test suites in the specified
249245
version.
250246

251247
## Versioning
252248
We follow a non-standard `MAJOR.MINOR.PATCH.INCREMENT[-PRE_RELEASE]` versioning convention. The
253-
first three numbers `MAJOR.MINOR.PATCH` are the latest Khiops version that is compatible with the
249+
first three numbers `MAJOR.MINOR.PATCH` are the Khiops version that is compatible with the
254250
package. The number `INCREMENT` indicates the evolution of the Khiops Python library followed by an
255251
optional `[-PRE_RELEASE]` version for alpha, beta and release candidate releases (eg. `b.2`).
256252

@@ -263,10 +259,9 @@ by `pip` and `conda`.
263259
## Releases
264260

265261
## Pre-releases
266-
When tagging a revision the CI will create the packages and upload them to the `khiops-dev` channel.
267-
Prefer to augment the pre-release revision number to re-create a tag because the CI overwrites
268-
packages with the same tag in the `khiops-dev` channel. Do not forget to clean any temporary
269-
pre-releases from `khiops-dev` and the releases GitHub page.
262+
When tagging a revision the CI will create the Pip packages.
263+
Prefer to augment the pre-release revision number to re-create a tag. Do not forget to clean any temporary
264+
pre-releases from the releases GitHub page.
270265

271266

272267
## Public Releases
@@ -280,29 +275,17 @@ Checklist:
280275
- Update your local repo and save your work:
281276
- `git stash # if necessary`
282277
- `git fetch --tags --prune --prune-tags`
283-
- `git switch dev`
284-
- `git pull`
285278
- `git switch main`
286279
- `git pull`
287-
- Merge the `dev` branch into `main`
288-
- `git switch main`
289-
- `git merge dev`
290280
- Tag the merge commit with the release version (see Versioning above)
291281
- `git switch main`
292-
- `git tag 10.3.0.1 # Just an example`
293-
- Make `dev` point to the merge commit just created in `main`
294-
- This is necessary to include the merge commit into master to calculate intermediary versions
295-
with Versioneer.
296-
- Steps:
297-
- `git switch dev`
298-
- `git reset --hard main`
299-
- `git push dev` (you need to remove the protections of `dev` for this step)
282+
- `git tag 11.0.0.2 # Just an example`
300283
- Workflows
301-
- Execute the `Conda Package` workflow specifying:
302-
- The release tag
303-
- `khiops` as the release channel
304-
- Execute the `API Docs` workflow specifying "Deploy GH Pages".
305-
306-
To make a public release, you must execute the `Conda Package` CI workflow manually on a tag and
307-
specify the `khiops` anaconda channel for upload. These uploads do not overwrite any packages in
308-
this channel, so you must correct any mistake manually.
284+
- Execute the `Pip Package` workflow specifying:
285+
- The tag on which to launch the workflow
286+
- The Pip repository: `Test PyPI` (for pre-releases) or `PyPI` (for
287+
releases)
288+
289+
To make a public release, you must execute the `Pip Package` CI workflow manually on a tag and
290+
specify the `PyPI` Pip repository for upload. These uploads do not overwrite any packages in
291+
the repository, so you must correct any mistake manually.

0 commit comments

Comments
 (0)