-
Notifications
You must be signed in to change notification settings - Fork 107
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
Updating contributing doc to add more detail on how to start #1185
Conversation
CONTRIBUTING.rst
Outdated
- Set up your environment by forking the repository ((`Github doc on | ||
forking and | ||
cloning <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo>`__)). | ||
- While at the root of your local copy of skrub, install the required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a short paragraph about creating a virtual env?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
CONTRIBUTING.rst
Outdated
@@ -129,8 +129,12 @@ To contribute, you will first have to run through some steps: | |||
- Set up your environment by forking the repository ((`Github doc on | |||
forking and | |||
cloning <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo>`__)). | |||
- While at the root of your local copy of skrub, install the required | |||
development dependencies by running | |||
- Create a new virtual environment either with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I add the specific commands for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as they're quite short I would say yes, this one someone following along can just copy-paste without needing to follow the links
git switch -c branch_name | ||
At this point, if you visit again the `pull requests | ||
page <https://github.com/skrub-data/skrub/pulls>`__ github should show a | ||
banner asking if you want to open a pull request from your new branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I don't think the "Implementation guidelines" below is very helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeromedockes Do you think it's too generic? Otherwise, I believe it summarizes our first principles quite well for a new contributor.
Avoid using binary extensions, Cython, or other compiled languages.
This one for example is not obvious and it's good to have it highlighted there.
``pip install --editable ".[dev, lint, test, doc]"``. | ||
- Run all the tests by running ``pytest -s skrub/tests``. | ||
- Run ``pre-commit install`` to activate some checks that will run every | ||
time you do a ``git commit`` (mostly, formatting checks). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one thing that can be confusing with pre-commit is it can modify some files and cancel the commit, and then you need to stage its modification and run commit
again. I'm not sure what would be the best place to add a little explanation about that without making this section too long 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a section on that a bit further down
@@ -197,6 +218,7 @@ Once you are satisfied with your changes, you can run all the tests to make sure | |||
that your change did not break code elsewhere: | |||
|
|||
.. code:: sh | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe another important pytest feature we could mention is running a specific test either with pytest the_file.py::the_test
or pytest the_file.py -k 'test_name_pattern'
to avoid waiting for all the other tests to run.
Also, I've noticed that in some cases in windows pytest
can fail (I guess that depends on how it was installed) while python -m pytest
seems a bit more robust. in the CI it is good to use pytest
to avoid adding the current working directory to the python path but for local development I think python -m pytest
is a good option; WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also we could add a link to the pytest documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added notes
(``TableVectorizer``, ``tabular_learner``, ...), and more. | ||
(``TableVectorizer``, ``tabular_learner``, ...), and explore interactively your data (``TableReport``). | ||
|
||
.. figure:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessarily the final position, I can move it around if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of remarks
git switch -c branch_name | ||
At this point, if you visit again the `pull requests | ||
page <https://github.com/skrub-data/skrub/pulls>`__ github should show a | ||
banner asking if you want to open a pull request from your new branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeromedockes Do you think it's too generic? Otherwise, I believe it summarizes our first principles quite well for a new contributor.
Avoid using binary extensions, Cython, or other compiled languages.
This one for example is not obvious and it's good to have it highlighted there.
CONTRIBUTING.rst
Outdated
of 1 to 3 reviews depending on the size of the change before we consider | ||
merging the PR. | ||
|
||
Please be mindful that maintainers are volunteers, so review times may vary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be mindful that maintainers are volunteers
I don't think this is technically correct nowadays 😁
I misclicked on approved, this PR is not finished yet
Should we merge the current version and open a new one to add the section on "Advanced contributors"? |
Not very important, but this looks quite inaccurate to me:
|
I removed that line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @rcap107 ! we'll keep improving this documentation as it is super important, as we said separating 2 sections one for first-time setup and one for more advanced details. this is already a significant improvement, another nice outcome from the sprint!
* bump version after 0.4.0 (#1162) * DOC Correct typo in TableReport docstring (#1168) * Add codespell support (#1126) * add python 3.13 (#1170) * add sections for the next release's changelogs (#1183) * Add a verbosity parameter to TableReport to control the printing of messages in stdout when opening summary report (#1182) * add verbose parameter to print_display to toggle on or off printing of progress messages when generating table report (#1188) * DOC add example for Cramer V for column_associations (#1186) * ENH adding alias "regression" and "classification" (#1180) * Bump codecov/codecov-action from 5.0.7 to 5.1.1 in the actions group (#1191) * remove use of matplotlib.rc_context (#1172) * MAINT adapt for scikit-learn 1.6 (#1135) * Revert "MAINT adapt for scikit-learn 1.6 (#1135)" (#1194) This reverts commit 18af508. * MAINT compatibility sklearn 1.6.0 (#1169) * MAINT fix nightly builds (#1193) * Updating contributing doc to add more detail on how to start (#1185) * FIX better display of object columns with multi-line repr in tablereport (#1196) * update changelog --------- Co-authored-by: Matt J. <[email protected]> Co-authored-by: Yaroslav Halchenko <[email protected]> Co-authored-by: priscilla baah <[email protected]> Co-authored-by: Reshama Shaikh <[email protected]> Co-authored-by: mrastgoo <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Guillaume Lemaitre <[email protected]> Co-authored-by: Riccardo Cappuzzo <[email protected]>
I added more detail on how to prepare the dev environment and reordered some of the sections to hopefully make the process clearer.