Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct doc #214

Merged
merged 3 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This guide is organized as follows:

## Setting up your development environment

### Prerequisite: minizinc
### Prerequisite: minizinc

You need first to install [minizinc](https://www.minizinc.org/) (version greater than 2.6) and update the `PATH` environment variable
so that it can be found by Python. See [minizinc documentation](https://www.minizinc.org/doc-latest/en/installation.html) for more details.
Expand Down Expand Up @@ -136,7 +136,7 @@ Some pages are generated from code thanks to the Python script `docs/autodoc.py`

#### Install the library in developer mode.

See [above](#installing-from-source-developer-mode) to install scikit-decide with poetry.
See [above](#installing-from-source-in-developer-mode) to install scikit-decide with poetry.

#### Install the documentation dependencies

Expand Down Expand Up @@ -219,17 +219,17 @@ Beware that doing so, you are actually modifying the files.

You can also use it when committing:

- Stage your changes: `git add your_files`
- Run pre-commit on the staged files: `pre-commit run`
- Check the changes made
- Accept them by adding modified files: `git add -u`
- Commit: `git commit`
- stage your changes: `git add your_files`,
- run pre-commit on the staged files: `pre-commit run`,
- check the changes made,
- accept them by adding modified files: `git add -u`,
- commit: `git commit`.

This can also be done automatically at each commit if you add pre-commit to git hooks with `pre-commit install`.
Beware that when doing so,
- the changes will be refused if pre-commit actually modifies the files
- you can then accept the modifications with `git add -u`
- you can still force a commit that violates pre-commit checks with `git commit -n` or `git commit --no-verify`
- the changes will be refused if pre-commit actually modifies the files,
- you can then accept the modifications with `git add -u`,
- you can still force a commit that violates pre-commit checks with `git commit -n` or `git commit --no-verify`.

If you prefer run pre-commit manually, you can remove the hooks with `pre-commit uninstall`.

Expand Down Expand Up @@ -274,9 +274,9 @@ We can summarize the process as follows:
- Do the necessary checks (see [below](#prior-checks)).
- Reorganize your commits (see [below](#reorganizing-commits)).
- Submit your pull request (see [github documentation](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)).
- See if all CI checks passed on your PR
- Wait for a review
- Take the comments and required changes into account
- See if all CI checks passed on your PR.
- Wait for a review.
- Take the comments and required changes into account.

Note that a PR needs at least one review by a core developer to be merged.

Expand All @@ -292,22 +292,22 @@ This [post](https://medium.com/google-developer-experts/how-to-pull-request-d75a
### Prior checks

Before submitting your pull request, think to
- [run the unit tests](#running-unit-tests)
- [check the documentation locally](#building-the-docs-locally) if you modified it
- check you respect the coding styles by [running linters](#coding-style-and-code-linting)
- [run the unit tests](#running-unit-tests),
- [check the documentation locally](#building-the-docs-locally) if you modified it,
- check you respect the coding styles by [running linters](#coding-style-and-code-linting).

If you do not, you will still be able to see the status of your PR as CI will do these checks for you.

### Reorganizing commits

On your way to implement your contribution, you will probably have lots of commits,
some modifying other ones from the same PR, or only modidying the code style.
some modifying other ones from the same PR, or only modifying the code style.

At the end of your work, consider reorganizing them by
- squashing them into one or only a few logical commits
- having a separate commit to reformat previous existing code if necessary
- squashing them into one or only a few logical commits,
- having a separate commit to reformat previous existing code if necessary,
- rewritting commit messages so that it explains the changes made and why, the "how" part being explained by the code itself
(see this [post](https://chris.beams.io/posts/git-commit/) about what a commit message should and should not contain)
- rebasing on upstream repository master branch if it diverged too much by the time you finished
(see this [post](https://chris.beams.io/posts/git-commit/) about what a commit message should and should not contain),
- rebasing on upstream repository master branch if it diverged too much by the time you finished.

You can use `git rebase -i` to do that, as explained in [git documentation](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
18 changes: 9 additions & 9 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installation

## Prerequisites
## Prerequisites

### Minizinc 2.6+
### Minizinc 2.6+

You need to install [minizinc](https://www.minizinc.org/) (version greater than 2.6) and update the `PATH` environment variable
so that it can be found by Python. See [minizinc documentation](https://www.minizinc.org/doc-latest/en/installation.html) for more details.
Expand All @@ -13,29 +13,29 @@ The use of a virtual environment for scikit-decide is recommended, and you will
This can be achieved either by using [conda](https://docs.conda.io/en/latest/) or by using [pyenv](https://github.com/pyenv/pyenv) (or [pyenv-win](https://github.com/pyenv-win/pyenv-win) on windows)
and [venv](https://docs.python.org/fr/3/library/venv.html) module.

The following examples show how to create a virtual environment with Python version 3.8.11 with the mentioned methods.
The following examples show how to create a virtual environment with Python version 3.8.13 with the mentioned methods.

#### With conda (all platforms)

```shell
conda create -n skdecide python=3.8.11
conda create -n skdecide python=3.8.13
g-poveda marked this conversation as resolved.
Show resolved Hide resolved
conda activate skdecide
```

#### With pyenv + venv (Linux/MacOS)

```shell
pyenv install 3.8.11
pyenv shell 3.8.11
pyenv install 3.8.13
pyenv shell 3.8.13
python -m venv skdecide-venv
source skdecide-venv
source skdecide-venv/bin/activate
```

#### With pyenv-win + venv (Windows)

```shell
pyenv install 3.8.11
pyenv shell 3.8.11
pyenv install 3.8.13
pyenv shell 3.8.13
python -m venv skdecide-venv
skdecide-venv\Scripts\activate
```
Expand Down