Commit dab6ad768e40fba14c9dd574f400b7b4ddaa0e3c
1 parent
7bc1d734
Exists in
master
and in
86 other branches
Add amdapy in info.html + script to generate amdapy doc
Showing
4 changed files
with
88 additions
and
6 deletions
Show diff stats
.gitignore
... | ... | @@ -12,6 +12,7 @@ generic_data/HAPI/metadata/amda-catalog.json |
12 | 12 | js/lib/ext |
13 | 13 | help/simu |
14 | 14 | help/auto |
15 | +help/amdapy | |
15 | 16 | php/bin |
16 | 17 | php/my_config.php |
17 | 18 | *~ |
... | ... | @@ -22,3 +23,4 @@ _test* |
22 | 23 | /nbproject/ |
23 | 24 | nohup.out |
24 | 25 | php/rest/apidoc.json |
26 | +scripts/amdapy_doc_build | |
... | ... |
help/info.html
... | ... | @@ -31,6 +31,15 @@ |
31 | 31 | </ul> |
32 | 32 | </ul> |
33 | 33 | </div> |
34 | + <h3>AMDA Tools</h3> | |
35 | + <div class="title"> | |
36 | + <ul> | |
37 | + <li><h4>Python package</h4> | |
38 | + <ul> | |
39 | + <li><a href="amdapy" target="_blank">amdapy</a> | |
40 | + </ul> | |
41 | + </ul> | |
42 | + </div> | |
34 | 43 | <h3>AMDA Services</h3> |
35 | 44 | <div class="title"> |
36 | 45 | <ul> |
... | ... | @@ -38,7 +47,7 @@ |
38 | 47 | <ul> |
39 | 48 | <li><a href="apidoc" target="_blank">REST</a> |
40 | 49 | <li><a href="Methods_AMDA.xml" target="_blank">SOAP</a> |
41 | - <li><a title="TBD" target="_blank">Special WebServices</a> | |
50 | + <!-- <li><a title="TBD" target="_blank">Special WebServices</a> --> | |
42 | 51 | </ul> |
43 | 52 | <li><h4>Access to Shared Time Tables and Catalogs</h4> |
44 | 53 | <ul> |
... | ... |
js/resources/css/styles.css
... | ... | @@ -93,14 +93,14 @@ text-align: center; |
93 | 93 | |
94 | 94 | #right ul { |
95 | 95 | list-style: none; |
96 | - margin-bottom: 10px; | |
97 | - padding-top: 10px; | |
96 | + margin-bottom: 4px; | |
97 | + padding-top: 4px; | |
98 | 98 | } |
99 | 99 | |
100 | 100 | #right li { |
101 | - padding: 4px; | |
102 | - padding-left: 20px; | |
103 | - padding-right: 20px; | |
101 | + padding: 2px; | |
102 | + padding-left: 8px; | |
103 | + padding-right: 8px; | |
104 | 104 | |
105 | 105 | } |
106 | 106 | |
... | ... |
... | ... | @@ -0,0 +1,71 @@ |
1 | +#!/bin/bash | |
2 | + | |
3 | +SCRIPT=$(readlink -f "$0") | |
4 | +export SCRIPTDIR=$(dirname "$SCRIPT") | |
5 | +export AMDA_IHM="$SCRIPTDIR/.." | |
6 | + | |
7 | +GIT_REPOSITORY="git@github.com:cdppirap/amdapy.git" | |
8 | + | |
9 | +BUILD_DIR="$AMDA_IHM/scripts/amdapy_doc_build" | |
10 | +PYTHON_VENV="$BUILD_DIR/amdapy_venv" | |
11 | +AMDAPY_PATH="$BUILD_DIR/amdapy" | |
12 | + | |
13 | +GIT_BRANCH="master" | |
14 | +DST_DIR="$AMDA_IHM/help" | |
15 | + | |
16 | +mkdir -p "$BUILD_DIR" | |
17 | + | |
18 | +if [ -d "$PYTHON_VENV" ] | |
19 | +then | |
20 | + # Activate virtual env. | |
21 | + source "$PYTHON_VENV/bin/activate" | |
22 | +else | |
23 | + # Build & activate virtual env. | |
24 | + python3 -m venv "$PYTHON_VENV" | |
25 | + source "$PYTHON_VENV/bin/activate" | |
26 | + pip install --upgrade pip | |
27 | + pip install pandas numpy lxml matplotlib build sphinx | |
28 | +fi | |
29 | + | |
30 | +if [ -d "$AMDAPY_PATH" ] | |
31 | +then | |
32 | + # Pull repository | |
33 | + cd $AMDAPY_PATH | |
34 | + git checkout $GIT_BRANCH | |
35 | + git pull | |
36 | +else | |
37 | + # Clone repository | |
38 | + cd $BUILD_DIR | |
39 | + git clone $GIT_REPOSITORY | |
40 | + cd $AMDAPY_PATH | |
41 | + git checkout $GIT_BRANCH | |
42 | +fi | |
43 | + | |
44 | +# Package generation | |
45 | +cd $AMDAPY_PATH | |
46 | +python -m build | |
47 | + | |
48 | +# Docs generation | |
49 | +cd $AMDAPY_PATH/amdapy/docs | |
50 | +make clean | |
51 | +make html | |
52 | + | |
53 | +if [ ! -z "$DST_DIR" ] | |
54 | +then | |
55 | + # Export docs only if DST_DIR is not empty | |
56 | + if [ -d "$DST_DIR" ] | |
57 | + then | |
58 | + # Does not automatically create DST_DIR to prevent any improper handling | |
59 | + if [ -d "$DST_DIR/amdapy" ] | |
60 | + then | |
61 | + # Cleanup existing HTML dir | |
62 | + rm -Rf "$DST_DIR/amdapy" | |
63 | + fi | |
64 | + cp -R "$AMDAPY_PATH/amdapy/docs/_build/html" "$DST_DIR/amdapy" | |
65 | + else | |
66 | + echo "[WARNING] Destination directory not exists ($DST_DIR). Cannot export documentation\n" | |
67 | + fi | |
68 | +fi | |
69 | + | |
70 | +# Deactivate virtual env. | |
71 | +deactivate | |
... | ... |