Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build integrated AequilibraE docs #576

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0f4eba2
first changes
r-akemii Oct 8, 2024
1d0434c
adds sponsors
r-akemii Oct 8, 2024
cbee5a3
.
r-akemii Oct 8, 2024
c710444
update headers
r-akemii Oct 29, 2024
fcf511f
.
r-akemii Oct 29, 2024
9ef103b
Update documentation.yml
r-akemii Oct 29, 2024
1dd52e3
update landing pages
r-akemii Oct 30, 2024
f61a97c
Merge branch 'develop' into renata/build-integrated-docs
r-akemii Nov 11, 2024
12235aa
fixes latexpdf build
r-akemii Nov 18, 2024
dc1bc82
updates links and fixes indentation
r-akemii Nov 19, 2024
b5aa9f7
Update python.rst
r-akemii Nov 19, 2024
b0e58db
Banner info
r-akemii Nov 19, 2024
c4ea985
remove version switcher
r-akemii Nov 20, 2024
83a127d
Update check_documentation_versions.py
r-akemii Nov 21, 2024
935b2d8
modifies docs structure
r-akemii Nov 21, 2024
c6246d2
adds missing folders
r-akemii Nov 21, 2024
8877d74
.
r-akemii Nov 21, 2024
e5d1728
test docs upload
r-akemii Nov 21, 2024
e93d918
Update documentation.yml
r-akemii Nov 21, 2024
c7cec34
modifies workflow
r-akemii Nov 21, 2024
cc441f0
updates paths
r-akemii Nov 21, 2024
006c544
.
r-akemii Nov 21, 2024
5f87dd9
Update documentation.yml
r-akemii Nov 22, 2024
6f0caeb
update docs
r-akemii Nov 22, 2024
a150b77
Update documentation.yml
r-akemii Nov 22, 2024
aa8ff26
Update documentation.yml
r-akemii Nov 22, 2024
03efa92
Update documentation.yml
r-akemii Nov 22, 2024
13d05a0
Update documentation.yml
r-akemii Nov 22, 2024
36caa0a
Update documentation.yml
r-akemii Nov 22, 2024
145e2db
Update documentation.yml
r-akemii Nov 22, 2024
2ff72cb
Update documentation.yml
r-akemii Nov 22, 2024
e83e87b
Update documentation.yml
r-akemii Nov 22, 2024
d29a932
updates links
r-akemii Nov 22, 2024
a262f52
Update documentation.yml
r-akemii Nov 22, 2024
2d215e3
new paths
r-akemii Nov 25, 2024
57f354d
images path
r-akemii Nov 25, 2024
cdc9e89
updates image path
r-akemii Nov 25, 2024
fa667dd
undo folder creation
r-akemii Nov 26, 2024
f8189af
fix file path
r-akemii Nov 26, 2024
c35ed10
Update conf.py
r-akemii Nov 26, 2024
d8c2a9a
update paths
r-akemii Nov 26, 2024
fbcf878
adds templates
r-akemii Nov 26, 2024
f35b9e9
update cli command
r-akemii Nov 26, 2024
67c6461
test on dev
r-akemii Nov 26, 2024
df2056a
fix path to latest
r-akemii Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 53 additions & 28 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
release:
types: [published]


jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -30,7 +29,6 @@ jobs:
pip install wheel openmatrix pytest
pip install -r requirements.txt
pip install -r docs/requirements-docs.txt


- name: Compile library
run: |
Expand All @@ -57,78 +55,105 @@ jobs:
- name: Build documentation
run: |
jupyter nbconvert --to rst docs/source/useful_information/validation_benchmarking/IPF_benchmark.ipynb
sphinx-build -b html docs/source docs/build
python3 -m zipfile -c AequilibraE.zip docs/build
sphinx-build -M latexpdf docs/source docs/source/_static -D plot_gallery=False
sphinx-build -D plot_gallery=False -b html docs/source docs/build
python -m zipfile -c AequilibraE.zip docs/build
cp AequilibraE.zip docs/source/_static
cp large_icon.png docs/source/_static/large_icon.png
cd docs
make html

- name: Upload to develop branch to S3
if: ${{ (github.ref == 'refs/heads/develop') && (github.event_name == 'push') && (env.HAS_SECRETS == 'true') }}
- name: Upload python to DEV on S3
if: ${{ (github.event_name == 'pull_request') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
args: --acl public-read --follow-symlinks --delete --exclude 'home.html'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/build/html/' # optional: defaults to entire repository
DEST_DIR: 'python/develop/' # optional: defaults to entire repository
DEST_DIR: 'dev/${{ github.event.number }}/python/' # optional: defaults to entire repository

- name: Upload to RELEASE on S3
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }}
- name: Upload home page to DEV on S3
if: ${{ (github.event_name == 'pull_request') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
args: --acl public-read --follow-symlinks --exclude '*' --include 'home.html' --include '_images/sponsor*' --include '_images/banner*' --include '_static/*' --include 'search*' --include 'genindex.html' --include '_sphinx_design_static/*'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/build/html/'
DEST_DIR: 'dev/${{ github.event.number }}/' # optional: defaults to entire repository

- name: Upload python to DEVELOP on S3
if: ${{ (github.ref == 'refs/heads/develop') && (github.event_name == 'push') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --exclude 'home.html'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/build/html/' # optional: defaults to entire repository
DEST_DIR: 'python/latest/' # optional: defaults to entire repository
DEST_DIR: 'develop/python/' # optional: defaults to entire repository

- name: Create Documentation history folder
if: ${{ github.event_name == 'release'}}
run: python docs/website/redir.py
- name: Upload home page to DEVELOP on S3
if: ${{ (github.ref == 'refs/heads/develop') && (github.event_name == 'push') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --exclude '*' --include 'home.html' --include '_images/sponsor*' --include '_images/banner*' --include '_static/*' --include 'search*' --include 'genindex.html' --include '_sphinx_design_static/*'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/build/html/'
DEST_DIR: 'develop/' # optional: defaults to entire repository

- name: Upload documentation to history folder
- name: Upload python to LATEST on S3
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --exclude '*.py'
args: --acl public-read --follow-symlinks --delete --exclude 'home.html'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/website/' # optional: defaults to entire repository
DEST_DIR: 'python/' # optional: defaults to entire repository
SOURCE_DIR: 'docs/build/html/' # optional: defaults to entire repository
DEST_DIR: 'latest/python/' # optional: defaults to entire repository

- name: Upload documentation to LATEST on AWS
- name: Upload home page to LATEST on S3
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
args: --acl public-read --follow-symlinks --exclude '*' --include 'home.html' --include '_images/sponsor*' --include '_images/banner*' --include '_static/*' --include 'search*' --include 'genindex.html' --include '_sphinx_design_static/*'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/build/htmlv/' # optional: defaults to entire repository
DEST_DIR: 'python/' # optional: defaults to entire repository
SOURCE_DIR: 'docs/build/html/'
DEST_DIR: 'latest/' # optional: defaults to entire repository

- name: Create Documentation history folder
if: ${{ github.event_name == 'release'}}
run: python docs/website/redir.py

- name: Upload to DEV on S3
if: ${{ (github.event_name == 'pull_request') && (env.HAS_SECRETS == 'true') }}
- name: Upload documentation to history folder
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
args: --acl public-read --follow-symlinks --exclude '*.py'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need another step to upload the landing page ONLY

AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/build/html/' # optional: defaults to entire repository
DEST_DIR: 'python/dev/${{ github.event.number }}/' # optional: defaults to entire repository
SOURCE_DIR: 'docs/website/' # optional: defaults to entire repository
DEST_DIR: 'docs/python/' # optional: defaults to entire repository
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _static
_templates
docs/source/sg_execution_times.rst
docs/source/_auto_examples
docs/source/api/generated
docs/source/_generated
docs/source/modeling_with_aequilibrae/project_database/data_model
docs/source/modeling_with_aequilibrae/transit_database/data_model

Expand Down Expand Up @@ -66,12 +66,11 @@ aequilibrae/**/*.pyd
aequilibrae/**/*.c
aequilibrae/**/*.html
aequilibrae/**/build/*
docs/build/*
docs/source/_generated/*
docs/source/project_database/*
docs/source/_auto_examples/*
*.cpp

# Build documentation
docs/build/*
docs/source/project_database/*

#Virtual environment
.venv/
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
enum34
Sphinx
pydata-sphinx-theme==0.13.3
pydata-sphinx-theme
sphinx_autodoc_annotation
matplotlib
folium
Expand Down
16 changes: 16 additions & 0 deletions docs/source/_latex/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:orphan:

Examples
========

.. toctree::
:hidden:
:maxdepth: 1

../_auto_examples/creating_models/index
../_auto_examples/editing_networks/index
../_auto_examples/skimming/index
../_auto_examples/assignment_workflows/index
../_auto_examples/aequilibrae_without_a_model/index
../_auto_examples/visualization/index
../_auto_examples/other_applications/index
12 changes: 12 additions & 0 deletions docs/source/_latex/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:orphan:

AequilibraE
===========

.. toctree::
:hidden:
:maxdepth: 1

examples
../modeling_with_aequilibrae/index
../api
12 changes: 8 additions & 4 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.bd-page-width {
max-width: 80%;
}

.bd-main .bd-content .bd-article-container {
max-width: 90%;
max-width: 80%;
}

.bd-page-width {
max-width: 90%;
}
.bd-links__title[role="heading"][aria-level="1"] {
display: none;
}
162 changes: 0 additions & 162 deletions docs/source/_static/switcher.json

This file was deleted.

Loading