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

fix (moPepGen): cyclic-import #849

Merged
merged 3 commits into from
Feb 28, 2024
Merged

fix (moPepGen): cyclic-import #849

merged 3 commits into from
Feb 28, 2024

Conversation

zhuchcn
Copy link
Member

@zhuchcn zhuchcn commented Feb 27, 2024

Description

Cyclic import is fixed. I moved a lot of constant variables to a separate module which resolved most of the issue. And then certain imports that are only needed for type notation, I moved them under TYPE_CHECKING.

Adding Nick because you were involved in the earlier discussion.

Closes #838

Checklist

  • This PR does NOT contain PHI or germline genetic data. A repo may need to be deleted if such data is uploaded. Disclosing PHI is a major problem.
  • This PR does NOT contain molecular files, compressed files, output files such as images (e.g. .png, .jpeg), .pdf, .RData, .xlsx, .doc, .ppt, or other non-plain-text files. To automatically exclude such files using a .gitignore file, see here for example.
  • I have read the code review guidelines and the code review best practice on GitHub check-list.
  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
  • I have added the major changes included in this pull request to the CHANGELOG.md under the next release version or unreleased, and updated the date.
  • All test cases passed locally.

@zhuchcn zhuchcn marked this pull request as ready for review February 27, 2024 20:54
Copy link
Collaborator

@lydiayliu lydiayliu left a comment

Choose a reason for hiding this comment

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

Best for @nwiltsie to comment! Seems like you made the lintr happy so that's good with me lol

Copy link
Member

@nwiltsie nwiltsie left a comment

Choose a reason for hiding this comment

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

I don't know too much about the internals here, but the general form of pulling constants into a separate file seems good to me. I tried using pydeps --show-cycles to visualize the dependency changes, but unfortunately the output was incorrect.

As long as pylint is satisfied and the tool still works, I'm happy!

@zhuchcn
Copy link
Member Author

zhuchcn commented Feb 28, 2024

Thank you for your comment! I'm merging it now. @nwiltsie

@zhuchcn zhuchcn merged commit edf1aea into main Feb 28, 2024
2 checks passed
@nwiltsie nwiltsie deleted the czhu-fix-cyclic-import branch February 28, 2024 17:31
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.

Fix cyclic import
3 participants