-
Notifications
You must be signed in to change notification settings - Fork 97
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
base: main
Are you sure you want to change the base?
Conversation
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.
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
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 |
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 wouldn't mention the dataframe API in skrub, you could say something like "have implemented some dispatched functions"
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.
Right, the internal dataframe API maybe?
CONTRIBUTING.rst
Outdated
|
||
.. code:: sh | ||
|
||
pytest --doctest-modules skrub/path/to/file |
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.
Or just
pytest --doctest-modules skrub/path/to/file | |
pytest skrub/path/to/file |
as you wish
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.
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 |
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.
To be honest pixi
has a learning curve but this functionality is very helpful !
Co-authored-by: Théo Jolivet <57430673+TheooJ@users.noreply.github.com>
Co-authored-by: Théo Jolivet <57430673+TheooJ@users.noreply.github.com>
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.
Hey @rcap107, this is a very helpful addition, here are some feedback
CONTRIBUTING.rst
Outdated
@@ -126,6 +126,12 @@ Setting up the environment | |||
|
|||
Follow the steps in the :ref:`installation_instructions` > "From Source" section to | |||
set up your environment. | |||
Make sure that pre-commit hooks are enabled, and run the test suite: |
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 already mentioned in the install guide, section 4. "run the tests", do you think it's not highlighted enough?
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 slightly reworded this section to explain what's different in the installation from source.
CONTRIBUTING.rst
Outdated
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 |
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.
Right, the internal dataframe API maybe?
|
||
pytest skrub/tests/test_amazing_transformer.py | ||
|
||
All tests should pass before submitting the code. |
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.
Let's suggest a command there, maybe with pixi?
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.
Not sure what command you're suggesting
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 command to run all tests?
Co-authored-by: Vincent M <maladiere.vincent@yahoo.fr>
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.)