sarugaku / resolvelib

Resolve abstract dependencies into concrete ones
ISC License
138 stars 31 forks source link

Add documentation #109

Open pombredanne opened 2 years ago

pombredanne commented 2 years ago

Adding some documentation would go a very long way to help adopters of this library beyond pip. For a start I suggest adding some generated API ReST doc using sphinx and published on RTD. Would you need help for this?

uranusjr commented 2 years ago

It would be best of someone could help set up things for me, of course! Once Sphinx is set up I can configure RTD for this.

pombredanne commented 2 years ago

@uranusjr ack... I'll try to get down to something ... FWIW this is the tool we are using it in: https://github.com/nexB/python-inspector

pombredanne commented 2 years ago

@TG1999 ping

pradyunsg commented 8 months ago

I am currently mapping the entire public API, to figure out what the documentation needs to look like. Here's what I have at the moment:

resolvelib

    AbstractProvider
        AbstractProvider.identify()
        AbstractProvider.get_preference()
        AbstractProvider.find_matches()
        AbstractProvider.is_satisfied_by()
        AbstractProvider.get_dependencies()
    AbstractResolver
        AbstractResolver.base_exception
        AbstractResolver.__init__()
        AbstractResolver.resolve()
    BaseReporter
        BaseReporter.starting()
        BaseReporter.starting_round()
        BaseReporter.ending_round()
        BaseReporter.ending()
        BaseReporter.adding_requirement()
        BaseReporter.resolving_conflicts()
        BaseReporter.rejecting_candidate()
        BaseReporter.pinning()
    InconsistentCandidate
        InconsistentCandidate.__init__()
    Resolver
        Resolver.base_exception
        Resolver.resolve()
    RequirementsConflicted
        RequirementsConflicted.__init__()
    ResolutionError
    ResolutionImpossible
        ResolutionImpossible.__init__()
    ResolutionTooDeep
        ResolutionTooDeep.__init__()

resolvelib.reporters

    BaseReporter
        BaseReporter.starting()
        BaseReporter.starting_round()
        BaseReporter.ending_round()
        BaseReporter.ending()
        BaseReporter.adding_requirement()
        BaseReporter.resolving_conflicts()
        BaseReporter.rejecting_candidate()
        BaseReporter.pinning()

resolvelib.resolvers

    Result
        Result.mapping
        Result.graph
        Result.criteria
        Result.__new__()
    ResolverException
    RequirementsConflicted
        RequirementsConflicted.__init__()
    InconsistentCandidate
        InconsistentCandidate.__init__()
    ResolutionError
    ResolutionImpossible
        ResolutionImpossible.__init__()
    ResolutionTooDeep
        ResolutionTooDeep.__init__()
    Resolution
        Resolution.__init__()
    AbstractResolver
        AbstractResolver.base_exception
        AbstractResolver.__init__()
        AbstractResolver.resolve()
    Resolver
        Resolver.base_exception
        Resolver.resolve()

resolvelib.structs

    RequirementInformation
        RequirementInformation.requirement
        RequirementInformation.parent
        RequirementInformation.__new__()
    State
        State.mapping
        State.criteria
        State.backtrack_causes
        State.__new__()
    DirectedGraph
        DirectedGraph.__init__()
        DirectedGraph.copy()
        DirectedGraph.add()
        DirectedGraph.remove()
        DirectedGraph.connect()
    IteratorMapping
        IteratorMapping.__init__()
    IterableView
    build_iter_view()
    Criterion
        Criterion.__init__()

I don't really enjoy that there's a bunch of thing re-exported at multiple levels and things are being imported (and used) from places where they're not really supposed to be public API.

pradyunsg commented 8 months ago

https://readthedocs.org/dashboard/resolvelib/ is a thing, I'll file a PR for adding documentation soon.