Saving results

PackageAnalyzer uses Legolas.jl to define several schemas to support serialization. These schemas may be updated in backwards-compatible ways in non-breaking releases, by e.g. adding additional optional fields.

A table compliant with the package-analyzer.package schema may be serialized with

using Legolas
Legolas.write(io, table, PackageV1SchemaVersion())

and read back by

io = Legolas.read(io)

For example,

julia> using DataFrames, Legolas, PackageAnalyzer
julia> results = analyze_packages(find_packages("DataFrames", "Flux"));
julia> Legolas.write("packages.arrow", results, PackageV1SchemaVersion())2-element Vector{PackageV1}: PackageV1 DataFrames: * repo: https://github.com/JuliaData/DataFrames.jl.git * uuid: a93c6f00-e57d-5684-b7b6-d8193f3e46c0 * version: 1.7.0 * is reachable: true * tree hash: fb61b4812c49343d7ef0b533ba982c46021938a6 * Julia code in `src`: 12162 lines * Julia code in `ext`: 0 lines (0.0% of `test` + `src` + `ext`) * Julia code in `test`: 30131 lines (71.2% of `test` + `src` + `ext`) * documentation in `docs`: 7840 lines (39.2% of `docs` + `src` + `ext`) * documentation in README & docstrings: 7489 lines (38.1% of README + `src`) * has license(s) in file: MIT * filename: LICENSE.md * OSI approved: true * number of contributors: 203 (and 25 anonymous contributors) * number of commits: 2817 * has `docs/make.jl`: true * has `test/runtests.jl`: true * has continuous integration: true * GitHub Actions PackageV1 Flux: * repo: https://github.com/FluxML/Flux.jl.git * uuid: 587475ba-b771-5e3f-ad9e-33799f191a9c * version: 0.14.21 * is reachable: true * tree hash: f3b4e96288e8bee94cd1e230c1a9387d3e03f788 * Julia code in `src`: 2862 lines * Julia code in `ext`: 642 lines (9.1% of `test` + `src` + `ext`) * Julia code in `test`: 3556 lines (50.4% of `test` + `src` + `ext`) * documentation in `docs`: 4097 lines (53.9% of `docs` + `src` + `ext`) * documentation in README & docstrings: 3983 lines (58.2% of README + `src`) * has license(s) in file: MIT * filename: LICENSE.md * OSI approved: true * number of contributors: 224 (and 14 anonymous contributors) * number of commits: 4929 * has `docs/make.jl`: true * has `test/runtests.jl`: true * has continuous integration: true * GitHub Actions * Buildkite
julia> roundtripped_results = DataFrame(Legolas.read("packages.arrow"))2×22 DataFrame Row name uuid repo ⋯ │ String Base.UUID String ⋯ ─────┼────────────────────────────────────────────────────────────────────────── 1 │ DataFrames a93c6f00-e57d-5684-b7b6-d8193f3e46c0 https://github.com/Ju ⋯ 2 │ Flux 587475ba-b771-5e3f-ad9e-33799f191a9c https://github.com/Fl 20 columns omitted