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.6.1 * is reachable: true * tree hash: 04c738083f29f86e62c8afc341f0967d8717bdb8 * Julia code in `src`: 12029 lines * Julia code in `ext`: 0 lines (0.0% of `test` + `src` + `ext`) * Julia code in `test`: 29964 lines (71.4% of `test` + `src` + `ext`) * documentation in `docs`: 7608 lines (38.7% of `docs` + `src` + `ext`) * documentation in README & docstrings: 7374 lines (38.0% of README + `src`) * has license(s) in file: MIT * filename: LICENSE.md * OSI approved: true * number of contributors: 202 (and 22 anonymous contributors) * number of commits: 2796 * 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.14 * is reachable: true * tree hash: 502d0232ec6430d40b6e5b57637333f32192592e * Julia code in `src`: 2675 lines * Julia code in `ext`: 363 lines (5.4% of `test` + `src` + `ext`) * Julia code in `test`: 3636 lines (54.5% of `test` + `src` + `ext`) * documentation in `docs`: 4134 lines (57.6% of `docs` + `src` + `ext`) * documentation in README & docstrings: 3853 lines (59.0% of README + `src`) * has license(s) in file: MIT * filename: LICENSE.md * OSI approved: true * number of contributors: 213 (and 13 anonymous contributors) * number of commits: 4846 * 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