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

Updating contributing doc to add more detail on how to start #1185

Merged
merged 15 commits into from
Dec 11, 2024

Conversation

rcap107
Copy link
Contributor

@rcap107 rcap107 commented Dec 7, 2024

I added more detail on how to prepare the dev environment and reordered some of the sections to hopefully make the process clearer.

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
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Contributor Author

@rcap107 rcap107 Dec 7, 2024

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?

Copy link
Member

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.
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be removed?

Copy link
Member

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 Show resolved Hide resolved
``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).
Copy link
Member

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 🤔

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Member

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

Copy link
Contributor Author

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::
Copy link
Contributor Author

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

Copy link
Member

@Vincent-Maladiere Vincent-Maladiere left a 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

CONTRIBUTING.rst Show resolved Hide resolved
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.
Copy link
Member

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 Show resolved Hide resolved
CONTRIBUTING.rst Show resolved Hide resolved
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.
Copy link
Member

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 😁

@Vincent-Maladiere Vincent-Maladiere dismissed their stale review December 9, 2024 09:30

I misclicked on approved, this PR is not finished yet

@rcap107
Copy link
Contributor Author

rcap107 commented Dec 9, 2024

Should we merge the current version and open a new one to add the section on "Advanced contributors"?

@Vincent-Maladiere
Copy link
Member

Not very important, but this looks quite inaccurate to me:

Please be mindful that maintainers are volunteers, so review times may vary.

@rcap107
Copy link
Contributor Author

rcap107 commented Dec 10, 2024

Not very important, but this looks quite inaccurate to me:

Please be mindful that maintainers are volunteers, so review times may vary.

I removed that line

@rcap107 rcap107 marked this pull request as ready for review December 11, 2024 12:54
Copy link
Member

@jeromedockes jeromedockes left a 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!

@jeromedockes jeromedockes merged commit 32be3ba into skrub-data:main Dec 11, 2024
25 checks passed
jeromedockes pushed a commit to jeromedockes/skrub that referenced this pull request Dec 11, 2024
TheooJ pushed a commit that referenced this pull request Dec 11, 2024
* 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]>
@rcap107 rcap107 deleted the contribute branch December 12, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants