stan-dev / posteriordb

Database with posteriors of interest for Bayesian inference
176 stars 36 forks source link

Add posterior.information to python API #148

Closed eerolinna closed 4 years ago

eerolinna commented 4 years ago

The python API has model.information and data.information for accessing information about models and datasets. This PR adds posterior.information for accessing information about posteriors.

For example with posterior eight_schools-eight_schools_noncentered calling posterior.information["keywords"] will return ["stan_benchmark"] (or whatever https://github.com/MansMeg/posteriordb/blob/master/posterior_database/posteriors/eight_schools.json contains at the time of calling the code)

codecov-io commented 4 years ago

Codecov Report

Merging #148 into development will decrease coverage by 42.14%. The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff                @@
##           development     #148       +/-   ##
================================================
- Coverage         99.3%   57.16%   -42.15%     
================================================
  Files                6       23       +17     
  Lines              144      747      +603     
================================================
+ Hits               143      427      +284     
- Misses               1      320      +319
Impacted Files Coverage Δ
python/src/posteriordb/posterior.py 100% <100%> (ø) :arrow_up:
rpackage/R/gold_standard.R 0% <0%> (ø)
rpackage/R/utils_reference_posterior.R 0% <0%> (ø)
.../compute_reference_posterior_draws_stan_sampling.R 0% <0%> (ø)
rpackage/R/check_pdb.R 0% <0%> (ø)
rpackage/R/data_info.R 100% <0%> (ø)
rpackage/R/write_pdb.R 0% <0%> (ø)
rpackage/R/filter.R 100% <0%> (ø)
rpackage/R/remove_pdb.R 0% <0%> (ø)
rpackage/R/utils_tests.R 80% <0%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 404e848...539689e. Read the comment docs.

MansMeg commented 4 years ago

Great!