Skip to content

Commit

Permalink
Merge commit '07b72a402d2e74f2a5a99ba2621f08364fd517ba' into ammr4-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
melund committed Feb 29, 2024
2 parents 466abb7 + 07b72a4 commit 871ee44
Show file tree
Hide file tree
Showing 30 changed files with 748 additions and 562 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/ammr-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

- name: Link check
shell: pixi run -e docs bash {0}
run: |
cd Docs
pixi run -e docs \
sphinx-build -M linkcheck . _build -W --keep-going -a -q
sphinx-build -M linkcheck . _build -W --keep-going -a -q
- name: Build Documentation
shell: pixi run -e docs bash {0}
run: |
cd Docs
pixi run -e docs clean
pixi run -e docs \
sphinx-build -M html . _build -W --keep-going -a -t draft
rm -rf _build
sphinx-build -M html . _build -W --keep-going -a -t draft
- uses: actions/upload-artifact@v4
with:
Expand All @@ -61,31 +61,16 @@ jobs:
git checkout $(git describe --tags `git rev-list --tags=ammr* --max-count=1`);
- uses: prefix-dev/setup-pixi@v0.5.1
continue-on-error: true
id: pixisetup
with:
environments: docs
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

- name: Build Documentation
if: steps.pixisetup.outcome == 'success'
shell: pixi run -e docs bash {0}
run: |
cd Docs
pixi run -e docs \
sphinx-build -M html . _build -a
# Fall back to mamba when buildig old versions
- name: Install mamba
if: steps.pixisetup.outcome == 'failure'
uses: mamba-org/setup-micromamba@v1
with:
environment-file: Docs/environment.yaml

- name: build with mamba
if: steps.pixisetup.outcome == 'failure'
shell: bash -leo pipefail {0} {0}
run: sphinx-build -M html Docs Docs/_build -a

sphinx-build -M html . _build -a
- uses: actions/upload-artifact@v4
with:
name: tagged-version
Expand Down
50 changes: 29 additions & 21 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: Nightly Full AMMR tests
on:
schedule:
- cron: 0 3 * * *
workflow_dispatch: {}
workflow_dispatch:
inputs:
force-update-durations:
type: boolean
description: 'Force creation of new .test-duration files and create a PR with them. Default is false.'
default: false


concurrency:
Expand All @@ -19,7 +24,6 @@ jobs:
strategy:
fail-fast: false
matrix:
ams_version: ["8.0_Beta"]
test_group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

env:
Expand All @@ -36,17 +40,18 @@ jobs:
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

- name: Run full AMMR tests
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pixi run -e test `
pytest -n auto --dist worksteal `
pytest -n auto --dist worksteal `
--splits 10 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=20 `
--store-durations --clean-durations `
--runslow
shell: pwsh -command "pixi run -e test pwsh '{0}'"

env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}

- name: Upload partial durations
uses: actions/upload-artifact@v4
Expand All @@ -60,35 +65,38 @@ jobs:
test-linux:
if: github.repository == 'anybody/ammr'
runs-on: ubuntu-latest
container: ghcr.io/anybody/anybodycon-github-actions:${{ matrix.ams_version }}
container: ghcr.io/anybody/anybodycon-github-actions:8.0
env:
ANYBODY_SUPPRESS_DEPRECATION_MESSAGES: ${{ fromJSON('{"7.4":"Off","7.5_Beta":"On"}')[matrix.ams_version] }}
ANYBODY_SUPPRESS_DEPRECATION_MESSAGES: "Off"

strategy:
fail-fast: false
matrix:
ams_version: ["7.4", "8.0_Beta"]
test_group: [1, 2, 3, 4, 5]
test_group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

steps:
- uses: actions/checkout@v4
with:
ref: ${{ fromJSON('{"7.4":"master-ammr-2.4.x","8.0_Beta":"master"}')[matrix.ams_version] }}

- name: Set debug env vars
run: echo ${{ github.event.inputs.debug_config }} >> $GITHUB_ENV

- uses: prefix-dev/setup-pixi@v0.5.1
with:
environments: test
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

- name: Run tests
run: |
cd Tests
pytest -n auto \
--splits 10 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration \
--only-load \
--runslow
shell: pixi run -e test bash {0}
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pytest -n auto \
--splits 5 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration \
--only-load \
--runslow


combine-and-upload-timings:
runs-on: ubuntu-latest
Expand All @@ -108,7 +116,7 @@ jobs:
data.update(json.loads(file.read_text()))
data = {k: v for k, v in sorted(data.items(), key=lambda x: x[1], reverse=True)}
test_durations = pathlib.Path('Tests/.test_durations')
if set(data) != set(json.loads(test_durations.read_text())):
if set(data) != set(json.loads(test_durations.read_text())) or "${{ github.event.inputs.force-update-durations }}" == "true":
test_durations.write_text(json.dumps(data, indent=2))
shell: python

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-forks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ jobs:
& $HOME/.pixi/bin/pixi.exe install
- name: Run AMMR tests
shell: pixi run -e test pwsh -Command {0}

run: |
cd Tests
pixi run -e test `
pytest -n 5 --dist worksteal `
--splits 10 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=10 `
--runslow
pytest -n 5 --dist worksteal `
--splits 10 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=10 `
--runslow
env:
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
5 changes: 3 additions & 2 deletions .github/workflows/test-self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ jobs:
connection-string: ${{ secrets.AZURE_CONN_STR }}

- name: Run AMMR tests
shell: pixi run -e test pwsh -Command {0}

run: |
cd Tests
pixi run -e test `
pytest -n 5 --dist worksteal `
pytest -n 5 --dist worksteal `
--splits 5 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=10 `
--anybodycon="$Env:ANYBODYCON" `
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ jobs:
- name: Run AMMR tests
run: |
cd Tests
pixi run -e test `
pytest -n auto --dist worksteal `
--splits 20 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=10 `
--runslow
${{ github.event.inputs.custom-pytest-arg || '' }}
pytest -n auto --dist worksteal `
--splits 20 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=10 `
--runslow
${{ github.event.inputs.custom-pytest-arg || '' }}
shell: pixi run -e test pwsh -Command {0}

env:
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
12 changes: 8 additions & 4 deletions Docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
# AnyBody Managed Model Repository 4 ✨ Beta
> The beta version of the AMMR 4 with a full thoracic model and new abdominal pressure model
> [!TIP]
> For the the latest AMMR 4 release, with full thoracic model please see [AMMR4-beta](https://github.com/anybody/ammr4-beta)
The AnyBody Model Repository (AMMR), is an open library of musculoskeletal
models and examples for the [AnyBody Modeling
System](https://www.anybodytech.com/software/ams/).

> [!IMPORTANT]
An AnyBody license with active maintenance is required to use the models from GitHub.
Please see the [beta program](https://forum.anyscript.org/t/become-a-beta-tester/5056/6), or request a [trial license ](https://www.anybodytech.com/contact/)

<p align="center">
<img src = "https://github.com/AnyBody/ammr/blob/master/Docs/_static/ammr_bodyparts.png" width=350>
</p>
Expand All @@ -30,6 +29,11 @@ institutions. The models are maintained by [AnyBody
Technology](https://www.anybodytech.com) who ensure that various body part models
can be used together as a full body, scalable musculoskeletal model.

> [!IMPORTANT]
An AnyBody license with active maintenance is required to use the models from GitHub.
Please see the [beta program](https://forum.anyscript.org/t/become-a-beta-tester/5056/6), or request a [trial license ](https://www.anybodytech.com/contact/)



## Getting Started

Expand Down
Loading

0 comments on commit 871ee44

Please sign in to comment.