conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
470 stars 102 forks source link

Refactoring on Source Parsing Related Functions #347

Closed srilman closed 1 year ago

srilman commented 1 year ago

Description

This PR consists of some of the refactoring done in the first 2 commits of https://github.com/conda/conda-lock/pull/316. However, this PR applies some of the changes that were recommended in the comments of that PR. In total, this PR does the following:

netlify[bot] commented 1 year ago

Deploy Preview for conda-lock ready!

Name Link
Latest commit 8e36877c5d83c637c6c3ee0b28d1e0d9e667783d
Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/63f9400f1625bc00082eeeb6
Deploy Preview https://deploy-preview-347--conda-lock.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

maresb commented 1 year ago

Sorry @srilman for the arduous process. At least I think we're substantially increasing the code quality with this PR.

I added some commits which I think make this ready. Could you please review them?

I believe I managed to resolve the circular import by moving aggregate_lock_specs to its own module. Now the imports can be loaded at top-level without errors. I also hope I resolved your concern regarding conda_lock.models by marking the helper functions as private (with a _ prefix).