Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 2.05 KB

BUILD.md

File metadata and controls

52 lines (35 loc) · 2.05 KB

Documentation about the build process

Step 1: Build Simulation Specifications

In this step, we collect information about the different "cases" we need to present in the book. The actual cases are outlined in text/specs.py. This is a largely declarative listing of the use cases.

Execution of this script produces the following files:

  • The text/results/Makefile which defines how to build all simulations and their associated results.
  • A json encoded representation of each case in text/results/json/<CaseId>-case.json.
  • A script to build and simulation each individual case in text/results/<CaseId>.mos.
  • A Python script to generate the plots for each case in text/plots/<CaseId>.py.

NB: The hash of the text/specs.py file is stored in the file text/spec-hash and is used in the Makefile to determine if this step can be skipped because the generated files out be identical to a previous run.

Step 2: Build Simulation Results

This step uses the OpenModelica compiler to build the following files for each case defined in step 1.

  • An executable for each case in text/results/<CaseId>.
  • An "info" file generated by OpenModelica about each case in text/results/<CaseId>_info.json
  • An initialization file in text/results/<CaseId>_init.xml
  • A simulation result in text/results/<CaseId>_res.mat

The executables and init files are stored in exes.tar.gz (which is also used by the simulation server API).

NB: The hash of the ModelicaByExample directory combined with the hash of the text/specs.py file are stored in the file text/results-hash and is used in the text/Makefile to determine if this step can be skipped because the generated files out be identical to a previous run.

Step 3: Build JSON (used by site generator)

Step 4: Generating Site

Step 5: Generate PDFs

Step 6: Generate eBooks

Step 7: Generate HTML (deprecated, don't need this)

Step 8: Deploying Site

I'm using now to do the site deployment. Much simpler than all that mucking about with AWS S3, IAM, permissions, keys, etc.