Skip to content

Commit 15375a4

Browse files
authored
Break down contribute (#638)
* update contribute index * update contribute
1 parent 08c3adf commit 15375a4

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

docs/contribute/contribute_code.rst

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ It is optional but highly advisable that you create a virtual environment. A vir
9090
is a "separate space", where you can install Feature-engine's dependencies. To create a virtual
9191
environment, use any virtual environment tool of your choice. Some examples include:
9292

93-
1. `venv <https://docs.python.org/3/library/venv.html>`_
94-
2. `conda environments <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_
93+
1. `venv <https://docs.python.org/3/library/venv.html>`_
94+
2. `conda environments <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_
9595

96-
In the previous links, you find details on how to create the environments as well. We also
97-
provide some guidelines below.
96+
In the previous links, you find details on how to create the environments. We provide
97+
some guidelines below.
9898

9999
venv
100100
~~~~
@@ -201,7 +201,7 @@ To commit changes do the following::
201201
$ git commit -m "my commit message"
202202

203203
and make sure to include an informative but succinct commit message in the present tense,
204-
for example "fixes style in imputation error message".
204+
for example "fix style in imputation error message".
205205

206206
The previous commands will commit all files that have changes. If you want to commit just 1
207207
or 2 files, you can do so as follows::
@@ -259,9 +259,9 @@ We have tests for:
259259
2. Code style, using flake8
260260
3. Typehints, using mypy
261261
4. Documentation, using sphinx.
262+
5. Coverage using coverage
262263

263-
In the following paragraphs, we will take you through how to test each of the above individually,
264-
and then altogether.
264+
In the following paragraphs, we will take you through how to test each of the above.
265265

266266
Test functionality
267267
~~~~~~~~~~~~~~~~~~
@@ -277,13 +277,16 @@ feature-engine folder. Then run::
277277

278278
$ pytest
279279

280-
These command will run all the test scripts within the test folder.
280+
These command will run all the test scripts within the test folder. It will take a few
281+
minutes.
281282

282283
Alternatively, you can run a specific script as follows::
283284

284-
$ pytest tests/test_encoding/test_categorical_encoder.py
285+
$ pytest tests/test_encoding/test_onehot_encoder.py
285286

286-
So if you just want to run the code you created, you would do::
287+
The previous command will just run the tests for the one hot encoder.
288+
289+
It will be faster if you just test the code you created, in which case you would do::
287290

288291
$ pytest tests/test_my_new_feature_folder/test_my_new_feature.py
289292

@@ -292,9 +295,16 @@ test_my_new_feature_folder.
292295

293296
If you are using Pycharm, this is even easier:
294297

295-
1. In your project directory (where you have all the files and scripts), click with the mouse right button on the folder "tests".
298+
1. In your project directory (where you have all the files and scripts), right click with the mouse on the folder "tests".
296299
2. Select "Run pytest in tests".
297-
3. Done!!
300+
301+
This will run all tests.
302+
303+
To run your specific tests:
304+
305+
1. Locate your test file
306+
2. Right click with the mouse on the test file.
307+
3. Select "Run pytest in tests".
298308

299309
Sweet, isn't it?
300310

@@ -345,7 +355,7 @@ You can fix code style by running::
345355
Black and isort may make changes to your file. Don't forget to commit those changes::
346356

347357
$ git add my_new_script.py
348-
$ git commit -m "fixes code styling"
358+
$ git commit -m "fix code style"
349359
$ git push origin my_feature_branch
350360

351361
Now, you can go ahead and test that your scripts pass the code styling tests. To do so,

docs/contribute/index.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ Contribute
55
==========
66

77
Feature-engine is an open source project, originally designed to support the online
8-
course `Feature Engineering for Machine Learning <https://courses.trainindata.com/p/feature-engineering-for-machine-learning>`_,
8+
course `Feature Engineering for Machine Learning <https://www.trainindata.com/p/feature-engineering-for-machine-learning>`_,
99
but has now gained popularity and supports transformations beyond those taught in the
1010
course.
1111

12-
Feature-engine is currently supported by a small community and we will be delighted to
12+
Feature-engine is currently supported by a growing community and we will be delighted to
1313
accept contributions, large or small, that you wish to make to the project.
14+
1415
Contributing to open-source is a great way to learn and improve coding skills, and also
1516
a fun thing to do. If you've never contributed to an open source project, we hope to
1617
make it easy for you with the following guidelines.
@@ -25,12 +26,12 @@ There are many ways to contribute to Feature-engine:
2526
- Create a new transformer
2627
- Enhance functionality of current transformers
2728
- Fix a bug
28-
- If you find a bug, let us know by creating an `issues <https://github.com/feature-engine/feature_engine/issues/>`_ on Github.
29+
- If you find a bug, let us know by creating an `issue <https://github.com/feature-engine/feature_engine/issues/>`_ on Github.
2930
- If you would like additional functionality or a new feature, create an `issue <https://github.com/feature-engine/feature_engine/issues/>`_ on Github.
30-
- Add a Jupyter notebook to our `Jupyter notebooks example gallery <https://github.com/feature-engine/feature_engine/tree/master/examples>`_.
31+
- Add a Jupyter notebook to our `Jupyter notebooks example gallery <https://github.com/feature-engine/feature-engine-examples>`_.
3132
- Improve our documentation, i.e., fix typos, improve grammar, or add more code examples.
3233
- Write a blog, tweet, or share our project with others.
33-
- Use Feature-engine in your lectures if you teach
34+
- Use Feature-engine in your lectures if you teach.
3435
- `Sponsor us <https://github.com/sponsors/feature-engine>`_.
3536

3637
With plenty of ways to get involved, we would be happy for you to support the project.

0 commit comments

Comments
 (0)