Skip to content

Repository Structure

Jaeyeong Yang edited this page Sep 2, 2019 · 1 revision

The hBayesDM repository includes two interfaces: R and Python. The codes are stored in their respective subdirectories as shown below:

 hBayesDM/
 ├── commons/
 ├── Python/
 ├── R/
 └── travis/

commons/

commons/ includes common files for R and Python interfaces, such as model specifications, Stan files, and example data files.

 hBayesDM/
 └── commons/
     ├── extdata/
     ├── models/
     ├── stan_files/
     ├── templates/
     ├── convert-to-py.py
     ├── convert-to-r.py
     ├── example.yml
     └── generate-codes.sh
  • extdata/ contains examples data files in a tab-seperated format (for example, bandit2arm_exampleData.txt, ra_exampleData.txt).
  • models/ contains YAML-formatted model specifications. An example on how to define a model is stored as example.yml
  • stan_files/ contains Stan model files (for example, bandit2arm_delta.stan, ra_prospect.stan).
  • templates/ contains template files for generating R and Python codes, based on specified model information.
  • convert-to-py.py and convert-to-r.py are Python scripts to generate R and Python codes. To read YAML files using Python, it requires PyYAML (It can be installed with pip install pyyaml).
  • example.yml is an example for how to specify model information. Contributors can copy this file and modify it to specify their models.
  • generate-codes.sh generates both R and Python codes using convert-to-py.py and convert-to-r.py. Python 3.5 or higher version and PyYAML are required to run the script.

Python/

Python/ includes codes for a Python interface for hBayesDM.

 hBayesDM/
 └── Python/
     ├── docs/
     ├── hbayesdm/
     ├── tests/
     ├── MANIFEST.in
     ├── README.rst
     ├── requirements.txt
     ├── setup.cfg
     └── setup.py

R/

R/ includes codes for a R interface for hBayesDM.

 hBayesDM/
 └── R/
     ├── R/
     ├── docs/
     ├── inst/
     ├── man-roxygen/
     ├── man/
     ├── pkgdown/
     ├── src/
     ├── tests/
     ├── tools/
     ├── vignettes/
     ├── DESCRIPTION
     ├── NAMESPACE
     ├── README.md
     ├── README.Rmd
     ├── _pkgdown.yml
     ├── cran-comments.md
     └── hBayesDM.Rproj

travis/

travis/ contains several shell scripts for Travis CI to automatically check if the package works fine.

 hBayesDM/
 └── travis/
     ├── after-failure.sh
     ├── after-success.sh
     ├── script.sh
     └── setup.sh