Skip to content

Commit 249ee76

Browse files
authored
Fix ammr-doc links (#116)
* fix ammr-doc links * Update build script * fix false linkcheck errors * Always build job but only deploy on mater * Remove unnecessary "needs" dependency in sphinx-build job * Run link check on officiel version
1 parent 86fa793 commit 249ee76

6 files changed

Lines changed: 40 additions & 49 deletions

File tree

.github/workflows/build.yaml

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,41 @@ on:
1313
required: false
1414
default: ""
1515

16-
16+
defaults:
17+
run:
18+
shell: bash -leo pipefail {0} {0}
19+
1720

1821
jobs:
1922

2023
build-official-version:
24+
2125
runs-on: ubuntu-latest
2226

2327
steps:
24-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2529
with:
2630
fetch-depth: 0
2731

2832
- name: Checkout last tagged
29-
if: "github.event.inputs.run_deploy"
3033
run: |
3134
git checkout $(git describe --tags `git rev-list --tags --max-count=1`);
3235
33-
- name: Setup conda
34-
if: "github.event.inputs.run_deploy"
35-
uses: conda-incubator/setup-miniconda@v2
36+
- name: Install mamba
37+
uses: mamba-org/setup-micromamba@v1
3638
with:
37-
activate-environment: sphinx
3839
environment-file: environment.yaml
39-
channels: conda-forge
40-
40+
4141
- name: Build last tagged version
42-
if: "github.event.inputs.run_deploy"
43-
shell: bash -l {0}
4442
run: |
4543
make clean
4644
make html O="-W"
4745
46+
- name: Check links
47+
run: sphinx-build -M linkcheck . _build -W --keep-going -a -q
48+
4849
- name: Deploy 🚀
49-
if: "github.event.inputs.run_deploy"
50+
if: github.event.inputs.run_deploy
5051
uses: peaceiris/actions-gh-pages@v3
5152
with:
5253
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
@@ -57,35 +58,23 @@ jobs:
5758

5859
sphinx-build:
5960
runs-on: ubuntu-latest
60-
needs: [build-official-version]
6161
steps:
62-
- uses: actions/checkout@v3
63-
with:
64-
fetch-depth: 0
65-
66-
- name: Setup conda
67-
uses: conda-incubator/setup-miniconda@v2
62+
- uses: actions/checkout@v4
63+
64+
- name: Install mamba
65+
uses: mamba-org/setup-micromamba@v1
6866
with:
69-
activate-environment: sphinx
7067
environment-file: environment.yaml
71-
channels: conda-forge
72-
73-
- uses: ammaraskar/sphinx-problem-matcher@master
74-
# if: github.ref != 'refs/heads/master'
75-
68+
7669
- name: Build Documentation
77-
shell: bash -l {0}
78-
run: |
79-
make html O="-W"
70+
run: make html O="-W"
8071

8172
- name: Check links
82-
shell: bash -l {0}
83-
run: |
84-
make linkcheck
73+
run: sphinx-build -M linkcheck . _build -W --keep-going -a -q
8574

8675
- name: Deploy 🚀
87-
if: github.ref == 'refs/heads/master'
8876
uses: peaceiris/actions-gh-pages@v3
77+
if: github.ref == 'refs/heads/master'
8978
with:
9079
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
9180
external_repository: AnyBody/tutorials

A_Getting_started_AMMR/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@
1212
The AnyBody Managed Model Repository (AMMR), is an open library of musculoskeletal
1313
models and examples ready to be used with the AnyBody Modeling System.
1414

15-
The [AMMR documentation](https://anyscript.org/ammr-doc/) is hosted
15+
The [AMMR documentation](https://anyscript.org/ammr/) is hosted
1616
separately, and contains a few tutorials and other usefull information. The
17-
[Creating a Human Model from scratch](https://anyscript.org/ammr-doc/creating_model_from_scratch.html) tutorial is
17+
[Creating a Human Model from scratch](https://anyscript.org/ammr/creating_model_from_scratch.html) tutorial is
1818
recommended for new users.
1919

2020

2121

2222
```{rubric} AMMR documentation
2323
```
2424

25-
- [Main AMMR documentation](https://anyscript.org/ammr-doc/)
26-
- [Getting started with the AMMR](https://anyscript.org/ammr-doc/getting_started.html)
27-
- [Configuring the Body Model](https://anyscript.org/ammr-doc/bm_config/index.html)
25+
- [Main AMMR documentation](https://anyscript.org/ammr/)
26+
- [Getting started with the AMMR](https://anyscript.org/ammr/getting_started.html)
27+
- [Configuring the Body Model](https://anyscript.org/ammr/bm_config/index.html)
2828

2929
```{rubric} AMMR Tutorials
3030
```
3131

3232
```{toctree}
3333
:maxdepth: 1
3434
35-
Creating a Human Model from scratch <https://anyscript.org/ammr-doc/creating_model_from_scratch.html>
36-
Scaling: Joint to joint scaling <https://anyscript.org/ammr-doc/Scaling/lesson1.html>
37-
Scaling: External Body Measurements <https://anyscript.org/ammr-doc/Scaling/lesson2.html>
38-
Scaling: Segmental scaling factors <https://anyscript.org/ammr-doc/Scaling/lesson3.html>
35+
Creating a Human Model from scratch <https://anyscript.org/ammr/creating_model_from_scratch.html>
36+
Scaling: Joint to joint scaling <https://anyscript.org/ammr/Scaling/lesson1.html>
37+
Scaling: External Body Measurements <https://anyscript.org/ammr/Scaling/lesson2.html>
38+
Scaling: Segmental scaling factors <https://anyscript.org/ammr/Scaling/lesson3.html>
3939
```

A_Getting_started_modeling/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
Developing accurate models of the human body from scratch is an enormous task.
55
It is thus practical to use the models in the [The AnyBody Managed Model
6-
Repository](https://anyscript.org/ammr-doc/)
6+
Repository](https://anyscript.org/ammr/)
77
as a starting template for a new application.
88

99
The following elements of the AnyScript language make such templating easier:
1010

1111
- Include files - Which aid templating and sharing model components across different applications
1212
- Body model parameters - For customizing the default AMMR body models
1313

14-
The AMMR installation folder also contains a library of [demo applications](https://anyscript.org/ammr-doc/auto_examples/index.html)
14+
The AMMR installation folder also contains a library of [demo applications](https://anyscript.org/ammr/auto_examples/index.html)
1515
such as MoCap gait, cycling, leg-press exercises etc. If any of these applications are similar to your end goal, you can copy the
1616
application's model files and then modify them as required.
1717

A_Getting_started_modeling/lesson2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ body parts: legs, arms, and trunk.
1818
:::{note}
1919
Body model configuration refers to the selection of limb segments to include, muscle model types,
2020
scaling algorithms etc. These are done by setting switches known as Body model (BM) parameters.
21-
The configuration process is described in greater detail in this [document](https://anyscript.org/ammr-doc/bm_config/index)
21+
The configuration process is described in greater detail in this [document](https://anyscript.org/ammr/bm_config/index)
2222
:::
2323

2424
## Body model configuration

conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def tagged_commit():
240240
pydata_html_theme_options = {
241241
# "external_links": [
242242
# {
243-
# "url": "https://anyscript.org/ammr-doc/",
243+
# "url": "https://anyscript.org/ammr/",
244244
# "name": "AMMR Documentation",
245245
# },
246246
# ],
@@ -419,13 +419,13 @@ def tagged_commit():
419419
# Todo find a way to get intersphinx working for offline builds
420420
intersphinx_mapping["ammr"] = (
421421
"../../AMMR/Documentation/",
422-
("../.inv/ammr.inv", "https://anyscript.org/ammr-doc/objects.inv"),
422+
("../.inv/ammr.inv", "https://anyscript.org/ammr/objects.inv"),
423423
)
424424
else:
425425
if tags.has("draft"):
426-
intersphinx_mapping["ammr"] = ("https://anyscript.org/ammr-doc/beta/", None)
426+
intersphinx_mapping["ammr"] = ("https://anyscript.org/ammr/beta/", None)
427427
else:
428-
intersphinx_mapping["ammr"] = ("https://anyscript.org/ammr-doc/", None)
428+
intersphinx_mapping["ammr"] = ("https://anyscript.org/ammr/", None)
429429

430430

431431
# -- Options for OpenGraph Ext. ----------------------------------------------
@@ -442,6 +442,8 @@ def tagged_commit():
442442
"https://doi.org/10.1115/1.4052115", # asme.org prevents the linkcheck
443443
"https://dx.doi.org/10.1115/1.4001678", # asme.org prevents the linkcheck
444444
"https://dx.doi.org/10.1115/1.4029258", # asme.org prevents the linkcheck
445+
"https://doi.org/10.1080/10255840802459412", # tandfonline sometimes blocks linkcheck
446+
"https://doi.org/10.1080/23335432.2014.993706", # tandfonline sometimes blocks linkcheck
445447
"https://anyscript.org/tutorials/dev/", # The dev sides can sometimes be missing.
446448
]
447449

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Look up the AMMR tutorials if you need help and guides for using the AnyBody Man
9494
: The wiki has a wealth of information, tips&tricks and FAQs for working with the AnyBody Modeling System.
9595

9696

97-
[AMMR documenation](https://anyscript.org/ammr-doc/)
97+
[AMMR documenation](https://anyscript.org/ammr/)
9898
: Browse documentation on AMMR models and learn about possible settings
9999

100100
[The AnyBodyTech channel](https://www.youtube.com/user/anybodytech)

0 commit comments

Comments
 (0)