Skip to content

Conversation

kalefranz
Copy link
Contributor

No description provided.

@kalefranz kalefranz added this to the 4.4.0 milestone Jun 7, 2017
Copy link
Contributor

@stefanseefeld stefanseefeld left a comment

Choose a reason for hiding this comment

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

Here are a few (mostly) high-level comments. This isn't meant to be a full and detailed review (which will come later). Just some initial thoughts as a base for discussion.

state.

"""

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the above string doing here ? Is it meant as a reminder (to the implementer) what the code should do ? Given that it's a clone of condas CLI help output (and thus is encoded elsewhere), there is a non-zero risk that it will get out-of-sync, so I would prefer not to duplicate it here.



class Solver(object):

Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming that this is going to be part of the public API, the class itself should use a docstring, too.

prune (bool):
If ``True``, the solution will not contain packages that were
previously brought into the environment as dependencies but are no longer
required as dependencies and are not user-requested.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the meaning of the default value 'NULL' ? (The same question applies to the other arguments, too.)

link_dists = tuple(Dist(d) for d in link_dists)
stp = PrefixSetup(self.index, self.prefix, unlink_dists, link_dists, 'INSTALL',
self.specs_to_add)
return UnlinkLinkTransaction(stp)
Copy link
Contributor

Choose a reason for hiding this comment

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

This separation into the three distinct solve_... methods looks great ! Why not go a step further and remove the second (solve_for_diff) and third (solve_for_transaction) from the Solver class and make them simple functions whose input is the output of Solver.solve_final_state ? It seems to me that would simplify the API as then the Solver wouldn't have to know anything about files, links, and transactions. It would simply be a computation device that transforms certain models (such as MatchSpec and PackageRecord) into other models (PackageRef).

Copy link
Contributor

@stefanseefeld stefanseefeld left a comment

Choose a reason for hiding this comment

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

Since this PR overlaps with the RepoData API work (#5267) I think it's best to complete the latter first (given that we already went through a review), then rebase and adjust this one to use the new features.
For example, it isn't clear why the Solver constructor needs to take channel arguments, given that the RepoData already carries that information in its global state.

@kalefranz kalefranz changed the title Solve API solve module cleanup Jun 12, 2017
kalefranz added a commit to kalefranz/conda that referenced this pull request Jun 12, 2017
@kalefranz kalefranz requested a review from mcg1969 June 12, 2017 21:58
@kalefranz kalefranz dismissed stefanseefeld’s stale review June 12, 2017 21:59

Talk in person, and Stefan is now ok moving forward.

@kalefranz
Copy link
Contributor Author

Incorporated into #5546. Closing.

@kalefranz kalefranz closed this Jun 20, 2017
@kalefranz kalefranz deleted the core-solve-cleanup-3 branch June 20, 2017 19:51
@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This pull request has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue or pull request if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants