Skip to content

Commit 309c31b

Browse files
committed
docs: create projet documentation
1 parent 209876d commit 309c31b

16 files changed

Lines changed: 856 additions & 2 deletions

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6+
7+
8+
<!-- insertion marker -->

CODE_OF_CONDUCT.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
13+
* Being respectful of differing viewpoints and experiences
14+
15+
* Gracefully accepting constructive criticism
16+
17+
* Focusing on what is best for the community
18+
19+
* Showing empathy towards other community members
20+
21+
Examples of unacceptable behavior by participants include:
22+
23+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
24+
25+
* Trolling, insulting/derogatory comments, and personal or political attacks
26+
27+
* Public or private harassment
28+
29+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
30+
31+
* Other conduct which could reasonably be considered inappropriate in a professional setting
32+
33+
## Our Responsibilities
34+
35+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
36+
37+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
38+
39+
## Scope
40+
41+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
42+
43+
## Enforcement
44+
45+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at erwan.schild@e-i.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
46+
47+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
48+
49+
## Attribution
50+
51+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
52+
53+
[homepage]: http://contributor-covenant.org
54+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# Contributing
2+
3+
Contributions are welcome, and they are greatly appreciated!
4+
Every little bit helps, and credit will always be given.
5+
6+
## Environment setup
7+
8+
Nothing easier!
9+
Follow the instructions below.
10+
11+
!!! note
12+
We **STRONGLY** recommend using a Linux distribution for Python development (Windows sometimes leads to obscure compatibility errors...)
13+
14+
15+
1. Install [`Git`](https://git-scm.com/) to version and track our software changes.
16+
17+
- On _Windows_, use the official installer: [`Git-for-Windows`](https://git-scm.com/download/win).
18+
19+
- On _Linux_, simply use your package manager.
20+
21+
!!! note
22+
`Git-for-Windows` doesn't provide the command `make`. In following step, use `pdm` instead.
23+
24+
25+
1. Install [`Python`](https://www.python.org/) as programming language for this projet.
26+
27+
- On _Windows_, use the official installer: [Python Releases for Windows](https://www.python.org/downloads/windows/).
28+
29+
- On _Linux_, simply use your package manager.
30+
31+
!!! note
32+
You can also use use [`pyenv`](https://github.com/pyenv/pyenv).
33+
34+
```bash
35+
# install pyenv
36+
git clone https://github.com/pyenv/pyenv ~/.pyenv
37+
38+
# setup pyenv (you should also put these three lines in .bashrc or similar)
39+
export PATH="${HOME}/.pyenv/bin:${PATH}"
40+
export PYENV_ROOT="${HOME}/.pyenv"
41+
eval "$(pyenv init -)"
42+
43+
# install Python 3.8
44+
pyenv install 3.8
45+
46+
# make it available globally
47+
pyenv global system 3.8
48+
```
49+
50+
51+
1. Fork and clone the repository:
52+
53+
```bash
54+
git clone https://github.com/cognitivefactory/features-maximization-metric/
55+
cd features-maximization-metric
56+
```
57+
58+
59+
1. Install the dependencies of the projet with:
60+
61+
```bash
62+
cd interactive-clustering
63+
make setup # on Linux
64+
pdm install # on Windows
65+
```
66+
67+
!!! note
68+
If it fails for some reason (especially on Windows), you'll need to install [`pipx`](https://github.com/pypa/pipx) and [`pdm`](https://github.com/pdm-project/pdm) manually.
69+
70+
You can install them with:
71+
72+
```bash
73+
python3 -m pip install --user pipx
74+
pipx install pdm
75+
```
76+
77+
Now you can try running `make setup` again, or simply `pdm install`.
78+
79+
Your project is now ready and dependencies are installed.
80+
81+
82+
## Available template tasks
83+
84+
This project uses [duty](https://github.com/pawamoy/duty) to run tasks.
85+
A Makefile is also provided.
86+
To run a task, use `make TASK` on _Linux_ and `pdm run duty TASK` _on Windows_.
87+
88+
To show the available template task:
89+
90+
```bash
91+
make help # on Linux
92+
pdm run duty --list # on Windows
93+
```
94+
95+
The Makefile will try to run certain tasks on multiple Python versions.
96+
If for some reason you don't want to run the task on multiple Python versions, you can do one of the following:
97+
98+
1. `export PYTHON_VERSIONS= `: this will run the task
99+
with only the current Python version
100+
2. run the task directly with `pdm run duty TASK`
101+
102+
The Makefile detects if a virtual environment is activated, so `make`/`pdm` will work the same with the virtualenv activated or not.
103+
104+
## Development journey
105+
106+
As usual:
107+
108+
1. create a new branch: `git checkout -b feature-or-bugfix-name`
109+
1. edit the code and/or the documentation
110+
111+
If you updated the documentation or the project dependencies:
112+
113+
1. run `make docs-regen`
114+
1. run `make docs-serve`, go to http://localhost:8000 and check that everything looks good
115+
116+
**Before committing:**
117+
118+
1. run `make format` to auto-format the code
119+
1. run `make check` to check everything (fix any warning)
120+
1. run `make test` to run the tests (fix any issue)
121+
1. follow our [commit message convention](#commit-message-convention)
122+
123+
If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.
124+
125+
Don't bother updating the changelog, we will take care of this.
126+
127+
## Commit message convention
128+
129+
Commits messages must follow the [Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message):
130+
131+
```
132+
<type>[(scope)]: Subject
133+
134+
[Body]
135+
```
136+
137+
Scope and body are optional. Type can be:
138+
139+
- `build`: About packaging, building wheels, etc.
140+
- `chore`: About packaging or repo/files management.
141+
- `ci`: About Continuous Integration.
142+
- `docs`: About documentation.
143+
- `feat`: New feature.
144+
- `fix`: Bug fix.
145+
- `perf`: About performance.
146+
- `refactor`: Changes which are not features nor bug fixes.
147+
- `style`: A change in code style/format.
148+
- `tests`: About tests.
149+
150+
**Subject (and body) must be valid Markdown.**
151+
If you write a body, please add issues references at the end:
152+
153+
```
154+
Body.
155+
156+
References: #10, #11.
157+
Fixes #15.
158+
```
159+
160+
## Pull requests guidelines
161+
162+
Link to any related issue in the Pull Request message.
163+
164+
During review, we recommend using fixups:
165+
166+
```bash
167+
# SHA is the SHA of the commit you want to fix
168+
git commit --fixup=SHA
169+
```
170+
171+
Once all the changes are approved, you can squash your commits:
172+
173+
```bash
174+
git rebase -i --autosquash master
175+
```
176+
177+
And force-push:
178+
179+
```bash
180+
git push -f
181+
```
182+
183+
If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.

0 commit comments

Comments
 (0)