@@ -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
148147rebase before the last merge commit.
149148
150149A usual application of history rewriting is to eliminate commits named "Fix previous commit". In
151150this 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```
155154to interactively move and squash fix commits with the ` fixup ` or ` squash ` operator. Usually this
156155operation will make your feature branch diverge from ` origin ` (GitHub repo), so a ` git push --force `
157156is 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
163162screw 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
167166releases.
168167
169168The 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
178174As 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.
213209To avoid extra merge commits do the following to update your local copy of your feature branch:
214210``` bash
215211# on my-feat-branch
216212git stash # only when you have non-committed changes
217- git switch dev
213+ git switch main
218214git pull
219215git switch my-feat-branch
220- git rebase dev
216+ git rebase main
221217# fix any conflicts you may have
222218git 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
236232thoroughly the pros and cons of any new external package dependency before adding it.
237233
238234### Development/Build dependencies
239235For 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
243239Our 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
249245version.
250246
251247## Versioning
252248We 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
254250package. The number ` INCREMENT ` indicates the evolution of the Khiops Python library followed by an
255251optional ` [-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