Skip to content

Commit defb93d

Browse files
committed
first documentation pipeline
1 parent e68f4c6 commit defb93d

File tree

19 files changed

+903
-641
lines changed

19 files changed

+903
-641
lines changed

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 📖 Build & Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
- 'yep/**'
9+
tags:
10+
- 'v*.*.*'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: "${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') ? 0 : 1 }}"
19+
20+
- name: Set up Python Environment
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.10'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install ".[docs]"
29+
30+
- name: Build HTML docs
31+
working-directory: docs
32+
run: make html
33+
34+
- name: Deploy to GitHub Pages
35+
uses: peaceiris/actions-gh-pages@v4
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: docs/build/html
39+
publish_branch: gh-pages
40+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
demos/outputs/simulation/**/*
44
demos/outputs/figures
55
.DS_Store
6-
.vscode
6+
.vscode
7+
build/
8+
*.egg-info

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
>**TODO:** The previous description from Urbansim it outdated. Add description of DEMOS, aligning with the code (paper).
44
5-
# Usage
6-
## Docker Container
5+
## Usage
6+
### Docker Container
77
The docker image for demos is stored in `registry/demos:latest`. The input data and configuration file are fed to the container through volumes. Alternatively, we provide a `docker-compose` workflow that can be used.
88

99
For running the `docker-compose` workflow:
@@ -18,15 +18,15 @@ Alternatively,
1818
docker run --volume <path-to-config>:/demos/config.toml:ro --volume <path-to-data-dir>:/demos/data --platform=linux/amd64 demos
1919
```
2020

21-
### IMPORTANT for MacOS and Windows users
21+
#### IMPORTANT for MacOS and Windows users
2222
Docker imposes a global limit on how much RAM containers can allocate. DEMOS easily surpases those limits, so in order to run DEMOS in Docker, users need to access the Docker Desktop GUI and `Preferences → Resources → Memory → Increase it (at least 16-20gb)`
2323

24-
### Building the docker image (development only)
24+
#### Building the docker image (development only)
2525
```bash
2626
docker build -t demos:0.0.1 --platform=linux/amd64 -f Dockerfile .
2727
```
2828

29-
## From Source
29+
### From Source
3030

3131
This repository contains only code and configuration/setup files necessary
3232

@@ -90,7 +90,7 @@ the demos simulation will produce the following sets of data and results:
9090
- a synthetic population file showing the evolution of the synthetic population throughout the simulation years. the file should be named `model_data_<scenario_name_output_year>.h5` in directory `DEMOS_NREL/demos/data`.
9191
- series of aggregated statistics for the population size, number of households, household size distribution, gender distribution, number of births, number of mortalities, number of student enrollments, number of total marriages, number of total divorces, the age distribution of the synthetic population, and income distribution for each simulation year. The files are located at `DEMOS_NREL/demos/outputs/simulation`
9292

93-
## ii. project structure
93+
### ii. project structure
9494
>**TODO:** this part still need to be complemented
9595
9696
the main folder of this repository contains several python scripts that contain the different steps necessary to import, process, and run the demos framework. the following is a description of the different folder and scripts used to run the demos simulation

data/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
*
32
!.gitignore
43
!outputs/

demos/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
DEMOS - Demographic Micro-Simulator
3+
4+
A microsimulation framework for demographic and economic modeling.
5+
"""

0 commit comments

Comments
 (0)