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

[do not merge] apply scientific-python template to enable CI/CD #1

Closed
wants to merge 9 commits into from

Conversation

ebrahimebrahim
Copy link
Member

@ebrahimebrahim ebrahimebrahim commented May 15, 2024

This PR is not meant to be merged but just to help explore/discuss the changes needed to apply the scientific-python template to HD_BET. If successful, the actual PR will be on the original repository and not this fork.

  • is the move from HD_BET to src/hd_bet okay?
  • we will probably have to turn off static type checking

@ebrahimebrahim
Copy link
Member Author

ebrahimebrahim commented May 15, 2024

@jcfr I have been trying to see if I can get things working using the scientific-python template. Instead of editing code manually to fix all the linting errors, I want to

  • accept the style fixes that can be done automatically by ruff (already done in this PR)
  • configure the linting to ignore any remaining linting rules that are broken

The latter step I am not sure how to do. I don't see any pylint or ruff configuration file where I can tell it what rules to ignore. Can you point me in the right direction? Thanks!!

@jcfr
Copy link

jcfr commented May 17, 2024

@jcfr
Copy link

jcfr commented May 17, 2024

Instead of 477a7a3, you may want to apply these changes before the transition like it is done in ImagingDataCommons/idc-index@ca633aa

@jcfr
Copy link

jcfr commented May 17, 2024

It may be sensible to have one first commit only running end-of-file-fixer, mixed-line-ending, trailing-whitespace, black, blacken-docs and mirrors-prettier pre-commit hooks, and perform the additional changes in a follow-up commit.

@ebrahimebrahim
Copy link
Member Author

Thanks for the advice on this!

@ebrahimebrahim ebrahimebrahim force-pushed the do_python_packaging_and_ci_cd branch from 4d2d7ef to 080b546 Compare May 28, 2024 12:55
@ebrahimebrahim ebrahimebrahim force-pushed the do_python_packaging_and_ci_cd branch from 080b546 to 29756e4 Compare May 28, 2024 13:23
Not doing this was resulting in a mysterious pylint error:

E0611: No name 'resize' in module 'skimage.transform' (no-name-in-module)

Not sure why this was happening
.pre-commit-config.yaml Outdated Show resolved Hide resolved
limitations under the License.
Copy link

Choose a reason for hiding this comment

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

In the commit message associated with make automated style fixes using ruff, consider listing the fixes that were applied.

For example:

@@ -123,6 +123,35 @@ ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
"EXE002", # The file is executable but no shebang is present
Copy link

Choose a reason for hiding this comment

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

Suggested change
"EXE002", # The file is executable but no shebang is present
# Exceptions below are specific to this project
"EXE002", # The file is executable but no shebang is present

@ebrahimebrahim
Copy link
Member Author

Another attempt is now at #2

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