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

Improve pylint compatibility #433

Open
tcmitchell opened this issue Apr 11, 2023 · 7 comments
Open

Improve pylint compatibility #433

tcmitchell opened this issue Apr 11, 2023 · 7 comments
Milestone

Comments

@tcmitchell
Copy link
Collaborator

Get on the road to supporting pylint in the GitHub Actions. Current score is -36.20/10. We can do better.

Of note, pylint does not like all the wildcard imports. There are more than 9,000 wildcard import issues.

@tcmitchell tcmitchell added this to the 1.2 milestone Apr 11, 2023
@bbartley bbartley modified the milestones: 1.2, 1.3 Feb 21, 2025
@GeneCodeSavvy
Copy link
Contributor

GeneCodeSavvy commented Feb 25, 2025

Hello everyone,

Can I work on this issue? I realize that addressing over 9,000 wildcard import issues—and potentially many other linting problems—is a significant undertaking. However, I see this as a fantastic opportunity to deeply familiarize myself with the codebase.

I’m committed to seeing this through. I am already familiar with Python, Git and Github. Understanding this codebase and eventually pySBOL2 would greatly help me when I start with utility function for converting between SBOL2 and SBOL3.

Best regards,
Harsh

EDIT: After reviewing the specification of SBOL 3 (especially section 10:Mapping Between SBOL 1, SBOL 2, and SBOL 3), I’ve come to realize that understanding the specification itself, is far more valuable than the Python implementation. However, I’m still interested in working on this issue because I’d gain valuable experience.

@tcmitchell
Copy link
Collaborator Author

Hi @GeneCodeSavvy, you are welcome to work on this issue. My strong recommendation is that you make iterative progress. Try to tackle one pylint issue at a time. This will reduce the set of disabled checks. Start with the easy ones and work towards the harder ones. Submit PRs on a regular basis. Don't make too many changes in a PR, they will be too hard to review. Start by fixing just one disabled pylint warning per PR. I would prefer 10 PRs, each with one pylint warning fix, to 1 PR with intermingled changes fixing 10 pylint warnings. The latter will be very hard to review.

Make use of this command, slightly modified from what you see in setup.cfg:

pylint --rcfile=/dev/null --reports=y --max-line-length=120 sbol3 test

Note: this assumes Linux or macOS. I don't know what the Windows equivalent of /dev/null is.

This will generate a report and show what pylint warnings have just a few occurrences, and what pylint warnings have lots of occurrences.

@GeneCodeSavvy
Copy link
Contributor

Great! I'll get to work. I am on a Mac, so the command won't be an issue.

@tcmitchell
Copy link
Collaborator Author

@GeneCodeSavvy you asked on #465 for next steps. There are still a lot of pylint warnings. Were you asking what pylint warnings should be tackled next, or were you seeking a task other than pylint work?

@GeneCodeSavvy
Copy link
Contributor

@tcmitchell Yes, I wanted to know about our priorities for pylint warnings because I’ve already addressed all the easy fixes (please let me know if I have missed any)

@tcmitchell
Copy link
Collaborator Author

Here are some that might be easy. These are guesses, you'll have to judge for yourself once you start looking at them:

  • unused-variable
  • unnecessary-pass
  • useless-return
  • unspecified-encoding
  • isinstance-second-argument-not-valid-type (use caution here, it might be complicated)
  • useless-parent-delegation

I appreciate all the work that you are doing to improve the code!

@GeneCodeSavvy
Copy link
Contributor

GeneCodeSavvy commented Mar 8, 2025

Thank you, I'll work on them this weekend.

I’m having a great time contributing. In just two weeks, I’ve gained exposure to CI/CD workflows, pylint, and most importantly, how to navigate mature codebases like pySBOL3.

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

No branches or pull requests

3 participants