Skip to content

Commit ff6d7cc

Browse files
authored
Merge pull request #85 from cropsinsilico/topic/forms
Topic/forms
2 parents b02b1b1 + a330fba commit ff6d7cc

File tree

78 files changed

+2538
-1665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2538
-1665
lines changed

.github/workflows/test-install.yml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- macos-latest
4545
- windows-latest
4646
python-version:
47-
- 3.6
47+
- 3.7
4848
install-method:
4949
- pip
5050
test-flags1:
@@ -61,7 +61,7 @@ jobs:
6161
- true
6262
include:
6363
- os: windows-latest
64-
python-version: 3.6
64+
python-version: 3.7
6565
install-method: pip
6666
test-flags1: --long-running --languages cpp
6767
test-flags2: --long-running --skip-languages c++
@@ -351,7 +351,7 @@ jobs:
351351
- macos-latest
352352
- windows-latest
353353
python-version:
354-
- 3.6
354+
- 3.7
355355
install-method:
356356
- conda
357357
test-flags1:
@@ -364,7 +364,7 @@ jobs:
364364
- true
365365
include:
366366
- os: ubuntu-latest
367-
python-version: 3.7
367+
python-version: 3.6
368368
install-method: conda
369369
test-flags1: --long-running
370370
test-flags2: ''
@@ -679,7 +679,7 @@ jobs:
679679
os:
680680
- ubuntu-latest
681681
python-version:
682-
- 3.6
682+
- 3.7
683683
install-method:
684684
- pip
685685
test-flags1:
@@ -981,7 +981,7 @@ jobs:
981981
os:
982982
- ubuntu-latest
983983
python-version:
984-
- 3.6
984+
- 3.7
985985
install-method:
986986
- conda
987987
test-flags1:
@@ -1295,7 +1295,7 @@ jobs:
12951295
- macos-latest
12961296
- windows-latest
12971297
python-version:
1298-
- 3.6
1298+
- 3.7
12991299
install-method:
13001300
- pip
13011301
test-flags1:
@@ -1672,3 +1672,32 @@ jobs:
16721672
run: python utils/build_docker.py --push
16731673
- name: Build and push executable docker images for the new release
16741674
run: python utils/build_docker.py --push executable
1675+
schema:
1676+
name: Update the schema used by the model submission form
1677+
needs:
1678+
- test_pip
1679+
- test_conda
1680+
- test_rmq_pip
1681+
- test_rmq_conda
1682+
- test_stripped
1683+
- docs
1684+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
1685+
runs-on: ubuntu-latest
1686+
steps:
1687+
- uses: actions/checkout@v2
1688+
with:
1689+
submodules: true
1690+
- name: Set up Python
1691+
uses: actions/setup-python@v2
1692+
with:
1693+
python-version: 3.8
1694+
- name: Install dependencies
1695+
run: 'python -m pip install PyGithub
1696+
1697+
python utils/setup_test_env.py install pip
1698+
1699+
'
1700+
- name: Verify installation
1701+
run: python utils/setup_test_env.py verify
1702+
- name: Update the form
1703+
run: python utils/update_form_schema.py

HISTORY.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
History
33
=======
44

5+
1.8.1 (2021-10-15) Minor updates to support model submission form development
6+
------------------
7+
8+
* Added --model_repository option to the integration-service-manager CLI
9+
* Preload models from the model repository into the service manager registry
10+
* Added validation_command option to model schema that can be used to validate a run on completion via the 'validate' runner option
11+
* Added dependencies and additional_dependencies options to model schema that can be used to specify packages that should be installed for a model
12+
* Refactor registration to use constants to prevent failure on circular import and speed up import time
13+
* Migrate constants into the constants module
14+
* Fix various bugs introduced by updates to GHA images and dependencies by pinning or updating use (e.g. jsonschema, libroadrunner, mac version, R version)
15+
516
1.8.0 (2021-09-15) Support for REST API based communicators, running integrations as services, and connecting to remote integration services
617
------------------
718

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ recursive-include yggdrasil *.json
2020
recursive-include yggdrasil *.f90
2121
recursive-include yggdrasil *.xml
2222
recursive-include yggdrasil/examples *.py
23+
recursive-include yggdrasil/examples *.rst
2324
recursive-include yggdrasil/demos *.py
2425
recursive-include yggdrasil/tests/scripts *.py
2526
recursive-include yggdrasil/examples Makefile_linux

docs/source/docker.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Then the Dockerfile that will be able to run those services is
8383

8484
.. code-block:: docker
8585
86-
FROM cropsinsilico/yggdrasil-service:1.7.0
86+
FROM cropsinsilico/yggdrasil-service:v1.8.0
8787
COPY services.yml .
8888
COPY foo ./foo
8989
COPY bar ./bar

recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ requirements:
6060
- git
6161
- GitPython <=3.1.20 # [py==36]
6262
- GitPython # [py>36]
63-
- jsonschema
63+
- jsonschema==3.2.0
6464
- matplotlib-base
6565
- numpy >=1.13.0
6666
- pandas

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
chevron
22
flask
3-
jsonschema>=3
3+
jsonschema==3.2.0
44
matplotlib
55
numpy>=1.13.0
66
pandas

requirements_development.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
black
22
git # [conda]
3+
PyGithub

utils/build_docker.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
def build(dockerfile, tag, flags=[], repo='cropsinsilico/yggdrasil',
10-
context=_utils_dir):
10+
context=_utils_dir, disable_latest=False):
1111
r"""Build a docker image.
1212
1313
Args:
@@ -20,11 +20,17 @@ def build(dockerfile, tag, flags=[], repo='cropsinsilico/yggdrasil',
2020
context (str, optional): Directory that should be provided as the
2121
context for the image. Defaults to the directory containing this
2222
script.
23+
disable_latest (bool, optional): If True, the new image will not
24+
be tagged 'latest' in addition to the provided tag value. Defaults
25+
to False.
2326
2427
"""
2528
args = ['docker', 'build', '-t', f'{repo}:{tag}', '-f', dockerfile] + flags
2629
args.append(context)
2730
subprocess.call(args)
31+
if not disable_latest:
32+
args = ['docker', 'tag', f'{repo}:{tag}', f"{repo}:latest"]
33+
subprocess.call(args)
2834

2935

3036
def push_image(tag, repo='cropsinsilico/yggdrasil'):
@@ -140,6 +146,10 @@ def params_service(params):
140146
parser.add_argument(
141147
"--push", action="store_true",
142148
help="After successfully building the image, push it to DockerHub.")
149+
parser.add_argument(
150+
"--disable-latest", action="store_true",
151+
help=("Don't tag the new image as 'latest' in addition to the "
152+
"version/commit specific tag."))
143153
subparsers = parser.add_subparsers(
144154
dest="type",
145155
help=("Type of docker image that should be built "
@@ -163,8 +173,11 @@ def params_service(params):
163173
params = params_executable(params)
164174
elif args.type == 'service':
165175
params = params_service(params)
176+
params.setdefault('disable_latest', args.disable_latest)
166177
dockerfile = params.pop('dockerfile')
167178
tag = params.pop('tag')
168179
build(dockerfile, tag, **params)
169180
if args.push:
170181
push_image(tag, repo=params['repo'])
182+
if not params['disable_latest']:
183+
push_image('latest', repo=params['repo'])

utils/setup_test_env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def create_env(method, python, name=None, packages=None, init=_on_ci):
329329
330330
"""
331331
cmds = ["echo Creating test environment using %s..." % method]
332-
major, minor = [int(x) for x in python.split('.')]
332+
major, minor = [int(x) for x in python.split('.')][:2]
333333
if name is None:
334334
name = '%s%s' % (method, python.replace('.', ''))
335335
if packages is None:
@@ -782,7 +782,7 @@ def install_deps(method, return_commands=False, verbose=False,
782782
]
783783
if fallback_to_conda:
784784
cmds.append("%s update --all" % CONDA_CMD)
785-
if install_opts['R'] and (not fallback_to_conda):
785+
if install_opts['R'] and (not fallback_to_conda) and (not only_python):
786786
# TODO: Test split installation where r-base is installed from
787787
# conda and the R dependencies are installed from CRAN?
788788
if _is_linux:

utils/test-install-base.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
max-parallel: 20
3939
matrix:
4040
os: [ubuntu-latest, macos-latest, windows-latest]
41-
python-version: [3.6]
41+
python-version: [3.7]
4242
install-method: [pip]
4343
test-flags1: [--long-running --test-suite=timing --test-suite=demos --test-suite=top, --test-suite=examples --separate-test='--test-suite=mpi --write-script=run_mpi.sh --with-mpi=3', --test-suite=types --skip-languages c c++, --test-suite=types --languages c cpp]
4444
test-flags2: [""]
4545
install-c: [true]
4646
install-mpi: [true]
4747
include:
4848
- os: windows-latest
49-
python-version: 3.6
49+
python-version: 3.7
5050
install-method: pip
5151
test-flags1: --long-running --languages cpp
5252
test-flags2: --long-running --skip-languages c++
@@ -348,15 +348,15 @@ jobs:
348348
max-parallel: 20
349349
matrix:
350350
os: [ubuntu-latest, macos-latest, windows-latest]
351-
python-version: [3.6]
351+
python-version: [3.7]
352352
install-method: [conda]
353353
test-flags1: [--long-running --separate-test='--test-suite=mpi --write-script=run_mpi.sh']
354354
test-flags2: [--with-examples examples/tests/test_backwards.py]
355355
install-c: [true]
356356
install-mpi: [true]
357357
include:
358358
- os: ubuntu-latest
359-
python-version: 3.7
359+
python-version: 3.6
360360
install-method: conda
361361
test-flags1: --long-running
362362
test-flags2: ""
@@ -400,7 +400,7 @@ jobs:
400400
strategy:
401401
matrix:
402402
os: [ubuntu-latest]
403-
python-version: [3.6]
403+
python-version: [3.7]
404404
install-method: [pip]
405405
test-flags1: [--long-running --languages python R matlab]
406406
test-flags2: [""]
@@ -425,7 +425,7 @@ jobs:
425425
strategy:
426426
matrix:
427427
os: [ubuntu-latest]
428-
python-version: [3.6]
428+
python-version: [3.7]
429429
install-method: [conda]
430430
test-flags1: [--long-running --languages python R matlab]
431431
test-flags2: [tests/test_services.py --nocapture]
@@ -455,7 +455,7 @@ jobs:
455455
strategy:
456456
matrix:
457457
os: [ubuntu-latest, macos-latest, windows-latest]
458-
python-version: [3.6]
458+
python-version: [3.7]
459459
install-method: [pip]
460460
test-flags1: [--long-running]
461461
test-flags2: [""]
@@ -543,3 +543,25 @@ jobs:
543543
run: python utils/build_docker.py --push
544544
- name: Build and push executable docker images for the new release
545545
run: python utils/build_docker.py --push executable
546+
547+
schema:
548+
name: Update the schema used by the model submission form
549+
needs: [test_pip, test_conda, test_rmq_pip, test_rmq_conda, test_stripped, docs]
550+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
551+
runs-on: ubuntu-latest
552+
steps:
553+
- uses: actions/checkout@v2
554+
with:
555+
submodules: true
556+
- name: Set up Python
557+
uses: actions/setup-python@v2
558+
with:
559+
python-version: 3.8
560+
- name: Install dependencies
561+
run: |
562+
python -m pip install PyGithub
563+
python utils/setup_test_env.py install pip
564+
- name: Verify installation
565+
run: python utils/setup_test_env.py verify
566+
- name: Update the form
567+
run: python utils/update_form_schema.py

0 commit comments

Comments
 (0)