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

DOC Adding more details on how to contribute to the library #1131

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rcap107
Copy link
Contributor

@rcap107 rcap107 commented Oct 29, 2024

Very early and rough draft for some improvements to the page on how to contribute to skrub. Follow-up on #1130, and still very much a work in progress.

I added some of the points that I mentioned in the issue, and some examples. As I already said, this is an early draft that we could use for discussing what should be added, and wording and stuff.

I would like to add something more on writing doctests and maybe be more specific when it comes to CI, but I don't know enough about either do do that 😅

A checklist of the operations that should be performed for the PR (pre-commit, write tests, update the changelog etc.)
-[x] How to run tests using a specific environment with pixi on the local machine for debugging
-[x] How to check for code coverage on the local machine
-[x] How to check doctests
-[x] Some information on where the code for testing is, and how to structure tests
-[ ] The documentation style to use (numpydoc)

@rcap107 rcap107 changed the title Adding more details on how to contribute to the library DOC Adding more details on how to contribute to the library Oct 29, 2024
Copy link
Contributor

@TheooJ TheooJ left a comment

Choose a reason for hiding this comment

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

Such a useful page, thanks a lot @rcap107 !

Makes me wonder if we want to add doc to the optional dependencies of the dev page, currently it's just pip install -e ".[dev, lint, test]"

CONTRIBUTING.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
and update the file ``skrub/tests/test_table_vectorizer.py`` so that it
takes into account the new transformer.

Additionally, you might have updated the dataframe API in
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't mention the dataframe API in skrub, you could say something like "have implemented some dispatched functions"


.. code:: sh

pytest --doctest-modules skrub/path/to/file
Copy link
Contributor

Choose a reason for hiding this comment

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

Or just

Suggested change
pytest --doctest-modules skrub/path/to/file
pytest skrub/path/to/file

as you wish

Copy link
Contributor

Choose a reason for hiding this comment

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

Sometimes I also found it useful to test examples with python examples/my_example.py


.. code:: sh

pixi run -e ci-py309-min-optional-deps pytest skrub/tests/path/to/test
Copy link
Contributor

Choose a reason for hiding this comment

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

To be honest pixi has a learning curve but this functionality is very helpful !

rcap107 and others added 2 commits October 30, 2024 22:34
Co-authored-by: Théo Jolivet <[email protected]>
Co-authored-by: Théo Jolivet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants