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

resolve #5610 add PrefixData, SubdirData, and PackageCacheData to conda/api.py #6922

Merged
merged 11 commits into from Feb 23, 2018

Conversation

kalefranz
Copy link
Contributor

resolve #5610

@kalefranz kalefranz requested a review from a team as a code owner February 22, 2018 22:06
@kalefranz kalefranz added this to the 4.5.0 milestone Feb 22, 2018
@kalefranz kalefranz changed the title resolve #5610 add PrefixData, SubdirData, and PackageCacheData to conda/api.py [WIP] resolve #5610 add PrefixData, SubdirData, and PackageCacheData to conda/api.py Feb 22, 2018
@kalefranz kalefranz changed the title [WIP] resolve #5610 add PrefixData, SubdirData, and PackageCacheData to conda/api.py resolve #5610 add PrefixData, SubdirData, and PackageCacheData to conda/api.py Feb 22, 2018
conda/api.py Outdated
DepsModifier = _DepsModifier


class Solver(object):
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need a docstring here, that also explains why this Solver wrapper is needed, or intended for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any recommendation on how to do this without duplicating everything that's already in the underlying Solver class? Plenty of nice docstrings here: https://github.com/conda/conda/blob/master/conda/core/solve.py#L52

conda/api.py Outdated


class SubdirData(object):

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need a docstring here, that also explains why this Solver wrapper is needed, or intended for?

conda/api.py Outdated


class PackageCacheData(object):

Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

Copy link
Collaborator

@goanpeca goanpeca left a comment

Choose a reason for hiding this comment

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

Looks good in general, but being in the api and exposed to the "public" we will need to document the class wrappers and all the methods, with examples of usage.

@kalefranz
Copy link
Contributor Author

If we want this incorporated into conda 4.5, we might have to move on it without docstrings. Conda 4.5.0 needs to be in canary tomorrow. If we don't mind bumping it to conda 4.6, then we can add docstrings.

conda/api.py Outdated
class Solver(object):

def __init__(self, prefix, channels, subdirs=(), specs_to_add=(), specs_to_remove=()):
self._internal = _Solver(prefix, channels, subdirs, specs_to_add, specs_to_remove)
Copy link
Collaborator

@goanpeca goanpeca Feb 23, 2018

Choose a reason for hiding this comment

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

This will only work for interactive scripting but we could do at least

    self.solve_final_state.__doc__ = self._internal.solve_final_state.__doc__

@kalefranz ?

@kalefranz
Copy link
Contributor Author

Ok, no solid examples yet, but pretty solid documentation. Is that a reasonable compromise to get this into 4.5.0?

@kalefranz
Copy link
Contributor Author

I think we should add "beta" tags to every docstring in conda/api.py right now. I'd like @msarahan to start really using this with conda-build to see how it works out. There might need to be some tweaks once it's in use and we gain further information.

@kalefranz
Copy link
Contributor Author

@msarahan has done a quick review. We discussed needing to add a way to add individual packages to repodata. That's beyond the scope of this PR, as it'll take some work to the underlying SubdirData class. That'll be done in a future PR.

@kalefranz
Copy link
Contributor Author

merging based on approval by @goanpeca

@kalefranz kalefranz merged commit 370e059 into conda:master Feb 23, 2018
@kalefranz kalefranz deleted the conda-4.5-api branch February 23, 2018 19:40
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

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 6, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 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.

Add PrefixData, SubdirData, and PackageCacheData to conda/api.py
2 participants