JuliaEcosystem / PkgDeps.jl

More insights about your packages dependencies
MIT License
23 stars 6 forks source link

Add documentation #13

Open oxinabox opened 3 years ago

oxinabox commented 3 years ago

there are no docs? Not even a readme?

mattBrzezinski commented 3 years ago

No.

I'm bad for this.

I'll add this in.

oxinabox commented 3 years ago

I still can't workout how to use this

mattBrzezinski commented 3 years ago

I still can't workout how to use this

Hehe, one day I will address this. I think at the very least I'll make it in the README. Lets say you want to find all usages of AWS,

You need to specify the name of the package, and which registry it is registered in:

using PkgDeps
users("AWS", "General")

8-element Vector{String}:
 "Zarr"
 "Minio"
 "REDACTED"
 "AWSS3"
 "REDACTED"
 "REDACTED"
 "REDACTED"
 "REDACTED"

This is fine and dandy, but what if you only want to find usages of a package in a specific private registry?

using PkgDeps
invenia = reachable_registries("Invenia")

users("DataFrames", "General"; registries=invenia)

45-element Vector{String}:
 "REDACTED"
 "REDACTED"
 "REDACTED"
 "REDACTED"
 "REDACTED"
 "REDACTED"
 ...

When going by package name you must specify as a second parameter where the package is registered in, as names along are not unique across all registries, see Agents.jl. However, you can instead pass in a UUID instead if you'd like, I actually just tested this and seemed to run into a potential bug though.

mzgubic commented 3 years ago

thanks for this comment, having a README would be great

mzgubic commented 3 years ago

Is it possible to also see all the packages where PackageA is an indirect dependency?

mattBrzezinski commented 3 years ago

Is it possible to also see all the packages where PackageA is an indirect dependency?

I don't believe so.