Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve pylint compatibility #433

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

Improve pylint compatibility #433

tcmitchell opened this issue Apr 11, 2023 · 10 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.

@GeneCodeSavvy
Copy link
Contributor

GeneCodeSavvy commented Mar 19, 2025

Hello @tcmitchell, I’ve completed all the easy fixes. The last two of your recommendations would require some not-so-straightforward refactoring.
I’d like to know which one I should tackle next.

I have also completed reading the SBOL2 and SBOL3 specifications and the SBOL_NOTEBOOKS repository. If you have any additional tasks that require completion, I am more than willing to take them on.

Regards,
Harsh Sharma

@tcmitchell
Copy link
Collaborator Author

Hi @GeneCodeSavvy , thank you for the PRs to make progress on this issue. It is greatly appreciated!

I don't have specific issues in this repository to point you at. I have browsed and many of them seem rather old which makes me believe they are not pressing issues.

Here are a few possibilities of things you could do if you're interested:

  • There is an effort in the SBOL community to work on the SBOL2 to SBOL3 translator. That's going on in the SynBioDex/SBOL-utilities repository and people like @bbartley and @Gonza10V have been involved. I'm sure they would appreciate another set of hands.
  • The SBOL Editors set up SynBioDex/SBOL-Notebooks to teach people and to help new people get started with SBOL. You may be able to help out there. Folks like @PrashantVaidyanathan and @Gonza10V are good points of contact.
  • You are welcome to browse the SynBioDex/pySBOL3 issues and pick one out. Many are a little sticky, meaning a deeper understanding may be needed to tackle them. I suspect the easier ones got attention first, and there aren't too many of them any more.

@GeneCodeSavvy
Copy link
Contributor

@tcmitchell Thank you for the suggestions! I’d love to contribute to the SBOL2 to SBOL3 translator effort in the SynBioDex/SBOL-utilities repository. I’ll start by exploring the repo, reviewing the existing implementation, and identifying areas where I can contribute.

I'll also reach out to @bbartley and @Gonza10V to understand the current priorities and how I can be most helpful.

Thank you for your guidance!

Best,
Harsh

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants