You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/bug_report.md
+32-11Lines changed: 32 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,50 @@
1
1
---
2
2
name: Bug report
3
-
about: Create a report to help us improve
3
+
about: Create a report to help us improve Melusine
4
4
title: ''
5
5
labels: 'type:bug'
6
6
assignees: ''
7
7
---
8
8
9
-
Hey there and thank you for using Issue Tracker!
9
+
Hey there, and thank you for using Melusine's Issue Tracker!
10
10
11
11
Do the checklist before filing an issue:
12
12
13
-
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
14
-
- Have a usage question? Ask your question on StackOverflow. We use StackOverflow for usage question and GitHub for bugs.
13
+
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
14
+
- Have a usage question? Ask your question on StackOverflow. We use StackOverflow for usage question and GitHub for bugs.
15
15
16
-
None of the above, create a bug report
16
+
None of the above, create a bug report!
17
17
18
18
Make sure to add all the information needed to understand the bug so that someone can help. If the info is missing we'll add the 'Needs more information' label and close the issue until there is enough information.
19
19
20
+
## Instructions
21
+
20
22
- Provide a minimal code snippet example that reproduces the bug.
21
-
- Provide screenshots where appropriate
22
-
- What's the version of Python you're using ?
23
-
- Are you using Mac, Linux or Windows?
23
+
- Provide screenshots where appropriate.
24
+
- What's the version of Python you're using?
25
+
- Are you using Mac, Linux or Windows? On Linux, provide details about your distribution.
26
+
27
+
## Debug Information
28
+
29
+
Please write the debug information inside <code>```</code> quotes in order to prevent text interpretation by the text editor.
30
+
31
+
**Operating System**: (run `cat /etc/os-release` in a terminal if running on a GNU/Linux distribution)
32
+
33
+
```
34
+
```
35
+
36
+
**Python version**: (run `python --version` in the environment running Melusine)
37
+
38
+
```
39
+
```
40
+
41
+
**Melusine version**: (run `pip freeze |grep melusine` in your Python environment)
42
+
43
+
```
44
+
```
24
45
25
-
**Python version** :
46
+
**Python packages**: (run `pip freeze` in your Python environment)
This guide aims to help you contributing to Melusine. If you have found any problems, improvements that can be done, or you have a burning desire to develop new features for Melusine, please make sure to follow the steps bellow.
3
+
This guide aims to help you contribute to Melusine. If you have found any problems, improvements that can be done, or you have a burning desire to develop new features for Melusine, please make sure to follow the steps bellow.
4
4
5
5
-[How to open an issue](#how-to-open-an-issue)
6
6
-[Create your contribution to submit a pull request](#create-your-contribution-to-submit-a-pull-request)
@@ -18,14 +18,14 @@ This guide aims to help you contributing to Melusine. If you have found any prob
18
18
19
19
An issue will open a discussion to evaluate if the problem / feature that you submit is eligible, and legitimate for Melusine.
20
20
21
-
Check on the project tab if your issue / feature is not already created. In this tab, you will find the roadmap of Melusine.
21
+
Before opening any new issue, check on the project tab if your issue / feature is not already created. We would like to avoid duplicates. In this tab, you will find the roadmap of Melusine.
22
22
23
-
A Pull Request must be linked to an issue.
24
-
Before you open an issue, please check the current opened issues to insure there are no duplicate. Define if it's a feature or a bugfix.
23
+
A Pull Request must be linked to an issue. Whether it is a bugfix or a feature request, please specify the labels **bug** or **enhancement**.
25
24
26
25
Next, the Melusine team, or the community, will give you a feedback on whether your issue must be implemented in Melusine, or if it can be resolved easily without a pull request.
27
26
28
27
# Create your contribution to submit a pull request
28
+
29
29
## Fork to code in your personal Melusine repo
30
30
31
31
The first step is to get our MAIF repository on your personal GitHub repositories. To do so, use the "Fork" button.
@@ -42,96 +42,99 @@ Click on the "Code" button to copy the url of your repository, and next, you can
To insure that your local forked repository is synced, you have to update your repo with the master branch of Melusine (MAIF). So, go to your repository and as follow :
47
+
To ensure that your local forked repository is synced with the upstream version available in this repository, you have to update your repo with the `master` branch of Melusine (managed by MAIF). So, go to your repository and as follows:
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
57
+
Install your local Python environment using the `venv` module of recent Python versions. Read the instructions below to build this environment for local deployments:
58
58
59
-
First create a python virtual environment
59
+
First create a Python virtual environment. Python 3.8+ is required.
60
60
```
61
-
mkvirtualenv melusine
61
+
python -m venv melusine-pyenv
62
62
```
63
-
Go in the melusine directory
63
+
64
+
Activate the environment. This step is required every time you will contribute to the development of Melusine. For more information about Python virtual environments, [read the official documentation](https://docs.python.org/3/library/venv.html). Your environment is next to the Melusine project, stored in the `melusine` directory.
64
65
```
65
-
cd melusine
66
+
source melusine-pyenv/bin/activate
66
67
```
67
-
Install you local package
68
+
69
+
Then, go to the melusine directory and install the local packages.
68
70
```
69
-
python setup.py develop
71
+
cd melusine
70
72
```
71
-
or
73
+
74
+
Then, install the dependencies using `pip`. You can add the `-e` option to keep the last modifications dynamically stored in your virtual env.
72
75
```
73
-
pip install -e .
76
+
pip install .
74
77
```
75
-
or to have optionnal dependencies
78
+
79
+
There are many other targets available to add dependencies: `dev`, `tests`, `transformers`, `docs`. You can install them like:
76
80
```
77
-
pip install ".[transformers]"
81
+
pip install ".[dev]"
78
82
```
79
83
80
-
## Start your contribution code
84
+
## Start your Contribution Code
85
+
86
+
To contribute to Melusine, you will need to create a personal branch on which you will be responsible for your changes. This means you will have to ensure your tests pass and you only modify the code related to your changes. You have to install the dependencies of the `dev` target.
81
87
82
-
To contribute to Melusine, you will need to create a personal branch.
83
88
```
84
89
git checkout -b feature/my-contribution-branch
85
90
```
86
-
We recommand to use a convention of naming branch.
87
-
-**feature/your_feature_name** if you are creating a feature
88
-
-**hotfix/your_bug_fix** if you are fixing a bug
89
91
90
-
## Commit your changes
92
+
We recommend to use a convention of naming branch:
93
+
-**feature/your_feature_name** if you are creating a feature.
94
+
-**hotfix/your_bug_fix** if you are fixing a bug.
95
+
96
+
## Commit Your Changes
91
97
92
-
Before committing your modifications, we have some recommendations:
98
+
Before committing your modifications, we have some recommendations:
93
99
94
-
- Execute pytest to check that all tests pass
100
+
- Execute `pytest` to check that all tests pass.
95
101
```
96
102
pytest
97
103
```
98
-
- Try to build Melusine
104
+
105
+
- Try to build Melusine.
99
106
```
100
-
python setup.py bdist_wheel
107
+
python -m build
101
108
```
102
-
- Check your code with **flake8**
103
-
104
-
*We will soon add **pre commit** to automatically check your code quality during commit*
Also for now, try testing tox. It will not be used for much longer as we will be moving to Github Actions and a simpler process soon.
116
+
# Initial run
117
+
pre-commit run --all-files
118
+
```
111
119
120
+
- Call `tox` to execute more automated tests.
112
121
```
113
122
tox
114
123
```
115
124
116
-
To get flake8 and tox, just pip install them into your virtualenv.
117
-
118
-
In addition, we recommend committing with clear messages and grouping your commits by modifications dependencies.
125
+
In addition, we recommend committing with clear messages and grouping your commits by modifications dependencies. Read this [GitHub Gist](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53) to have an idea of what we have in mind when speaking of which.
119
126
120
127
Once all of these steps succeed, push your local modifications to your remote repository.
121
-
122
128
```
123
-
git add .
124
-
git commit -m ‘detailed description of your change’
129
+
git add YOUR_FILES_WHAT WHERE_MODIFIED
130
+
git commit
125
131
git push origin feature/my-contribution-branch
126
132
```
127
133
128
-
Your branch is now available on your remote forked repository, with your changes.
129
-
130
-
Next step is now to create a Pull Request so the Melusine Team can add your changes to the official repository.
134
+
Your branch is now available on your remote forked repository, with your changes. Next step is now to create a Pull Request so the Melusine Team can review and merge your changes to the official repository.
131
135
132
136
## Create a Pull Request
133
137
134
-
135
138
A pull request allows you to ask the Melusine team to review your changes, and merge your changes into the master branch of the official repository.
136
139
137
140
To create one, on the top of your forked repository, you will find a button "Compare & pull request"
@@ -153,15 +156,14 @@ Once you have selected the right branch, let's create the pull request with the
153
156
154
157
<imgsrc="https://raw.githubusercontent.com/MAIF/melusine/master/docs/assets/images/contributing/melusine-pr-description.png"alt="clone your forked repository" />
155
158
156
-
In the description, a template is initialized with all informations you have to give about what you are doing on what your PR is doing.
159
+
In the description, a template is initialized with all information you have to give about what you are doing on what your PR is doing.
157
160
158
161
Please follow this to write your PR content.
159
162
160
-
161
-
## Finally submit your pull request
163
+
## Finally, submit your pull request
162
164
163
165
Your pull request is now ready to be submitted. A member of the Melusine team will contact you and will review your code and contact you if needed.
164
166
165
-
You have contributed to an Open source project, thank you and congratulations! 🥳
167
+
You have contributed to an Open source project, thank you and congratulations! 🥳
166
168
167
-
Show your contribution to Melusine in your curriculum, and share it on your social media. Be proud of yourself, you gave some code lines to the entire world!
169
+
Show your contribution to Melusine in your curriculum, and share it on your social media. Be proud of yourself, you gave some code lines to the entire world!
0 commit comments