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

Create PackageCollection type for nicer show method #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ericphanson
Copy link
Member

We could return a stuct instead of a raw Vector{PackageV1} from functions which return multiple packages so we could add a custom show method to surface info. Here is a quick version to see.

julia> using PackageAnalyzer

julia> analyze_manifest()
57-element PackageCollection
* Source code
  * Total Julia source code: 51_733 lines
  * Total Julia extension code: 257 lines (0.3% of `test` + `src` + `ext`)
  * Julia code test code: 36_066 lines (41.0% of `test` + `src` + `ext`)
  * Lines of documentation: 5_686 lines (9.9% of `docs` + `src` + `ext`)
  * Total lines of documentation in README & docstrings: 14862 lines (22.3% of README + `src`)
* Licenses
  * MIT (54): AbstractTrees, BitFlags, BitIntegers, CodecLz4, CodecZlib, CodecZstd, Compat, ConcurrentUtilities, DataAPI, DataValueInterfaces, EnumX, ExceptionUnwrapping, Expat_jll, ExprTools, Git, GitHub, Git_jll, HTTP, InlineStrings, IteratorInterfaceExtensions, JLLWrappers, JSON, JSON3, JuliaSyntax, LazilyInitializedFields, Legolas, Libiconv_jll, LicenseCheck, LoggingExtras, Lz4_jll, MbedTLS, Mocking, OpenSSL, OpenSSL_jll, OrderedCollections, Parsers, PooledArrays, PrecompileTools, Preferences, RegistryInstances, Scratch, SentinelArrays, SodiumSeal, StructTypes, TZJData, TableTraits, Tables, TimeZones, Tokei_jll, TranscodingStreams, URIs, Zstd_jll, libsodium_jll, licensecheck_jll
  * Apache-2.0 (3): Arrow, ArrowTypes, MbedTLS

I've subtyped AbstractVector so most of the same things still work as before. Nonetheless it's probably breaking since we documented the return type.

cc @tecosaur who probably knows how to make it look a lot nicer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant