-
Notifications
You must be signed in to change notification settings - Fork 1k
Update CONTRIBUTING.md #4798
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
Update CONTRIBUTING.md #4798
Conversation
Job PR-4798-a7dfb58 is done. |
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 few comments but otherwise LGTM
CONTRIBUTING.md
Outdated
|
||
To send us a pull request, please: | ||
|
||
1. Fork the repository. | ||
1. Fork the repository and clone the source code to your local machine. |
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 we add pointers to the official GitHub docs on forking & cloning?
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.
great idea, added
CONTRIBUTING.md
Outdated
|
||
To send us a pull request, please: | ||
|
||
1. Fork the repository. | ||
1. Fork the repository and clone the source code to your local machine. | ||
2. Modify the source (see details below); please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. | ||
3. Ensure local tests pass. |
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.
Do we have an example showing which tests need to pass?
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.
removed reference to tests since it would take too long for them to run
CONTRIBUTING.md
Outdated
2. Modify the source (see details below); please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. | ||
3. Ensure local tests pass. | ||
4. Commit to your fork using clear commit messages. | ||
5. Send us a pull request, answering any default questions in the pull request interface. | ||
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. | ||
7. To spin up the platform tests, which test autogluon among macos and windows, comment on the PR with `/platform_tests`(You would need write permission to AutoGluon repo). It is recommended to run the platform tests only after you have passed the default CI. | ||
7. (Optional) To spin up the platform tests, which test autogluon among MacOS and Windows, comment on the PR with `/platform_tests`(You would need write permission to AutoGluon repo). It is recommended to run the platform tests only after you have passed the default CI and only for changes that are likely to cause platform specific issues. |
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.
IIRC, one can only start platform tests from a branch of the autogluon/autogluon
repo and not for branches of the forks. It makes sense for us (maintainers) to be aware of this, but probably not something for the users to worry about since they cannot run the tests.
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, moved to a different section focusing on maintainer specific contribution instructions
CONTRIBUTING.md
Outdated
@@ -69,10 +70,51 @@ cd ../multimodal/ | |||
pytest | |||
cd ../timeseries/ | |||
pytest |
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.
Lines 61-72 could be replaced with
pytest common/tests
pytest core/tests
...
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.
nice, updated
CONTRIBUTING.md
Outdated
# the below will check for changes that will occur if performing linting | ||
|
||
# black | ||
ruff format --diff "timeseries/" | ||
# isort | ||
ruff check --select I "timeseries/" | ||
|
||
# black | ||
ruff format --diff "common/" | ||
# isort | ||
ruff check --select I "common/" | ||
|
||
# black | ||
ruff format --diff "features/" | ||
# isort | ||
ruff check --select I "features/" | ||
``` |
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 the following is shorter / more readable?
# Check formatting and the order of imports
for dir in "timeseries" "common" "features"; do
ruff format --diff $dir
ruff check --select I $dir
done
These checks don't technically perform linting, only style checks (formatting and import sorting). Linting would be done with ruff check $dir
and that's only enabled for timeseries
(equivalent to flake8).
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, updated and changed wording
CONTRIBUTING.md
Outdated
# the below will actively change files to satisfy linting | ||
# DO NOT run the below commands before running the above commands, as you risk introducing many unintended changes. | ||
|
||
# black | ||
ruff format "timeseries/" | ||
# isort | ||
ruff check --fix --select I "timeseries/" | ||
|
||
# black | ||
ruff format "common/" | ||
# isort | ||
ruff check --fix --select I "common/" | ||
|
||
# black | ||
ruff format "features/" | ||
# isort | ||
ruff check --fix --select I "features/" | ||
``` |
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.
Same here
for dir in "timeseries" "common" "features"; do
ruff format $dir
ruff check --fix --select I $dir
done
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.
updated thanks
CONTRIBUTING.md
Outdated
|
||
- After you open your pull request, our CI system will run for little while to check your code and report found errors. Please check back and fix any errors encountered at this stage (you can retrigger a new CI check by pushing updated code to the same PR in a new commit). | ||
|
||
- We also encourage you to contribute new tutorials or example scripts using AutoGluon for applications you think other users will be interested in. Please see [`docs/tutorials/`](https://github.com/autogluon/autogluon/tree/master/docs/tutorials) or [`examples/`](https://github.com/autogluon/autogluon/tree/master/examples). All tutorials should be Jupyter notebooks (.ipynb) files. |
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.
Side note: Is our examples
folder up-to-date / maintained?
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.
almost certainly not, will remove the mention here.
|
||
- After you open your pull request, our CI system will run to check your code and report found errors. This may take a few hours. Please check back and fix any errors encountered at this stage (you can retrigger a new CI check by pushing updated code to the same PR in a new commit). |
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.
The maintainers would need to approve the CI run first.
CONTRIBUTING.md
Outdated
``` | ||
|
||
- Lint the code, so it adheres to our code style by running the below command. Note that our lint check for tabular, core, and multimodal modules are temporarily disabled. |
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 we enable linting & style checks for these modules now that we are done with v1.2.0?
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.
Yeah, I plan to soonish, once some of the old PRs are merged (working on it)
Co-authored-by: Oleksandr Shchur <oleks.shchur@gmail.com>
Job PR-4798-6c9071c is done. |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.