forked from ITISFoundation/osparc-simcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into surface-job-status
- Loading branch information
Showing
325 changed files
with
9,071 additions
and
4,169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,12 @@ AGENT_VOLUMES_CLEANUP_S3_PROVIDER=MINIO | |
|
||
API_SERVER_DEV_FEATURES_ENABLED=0 | ||
|
||
AUTOSCALING_DASK=null | ||
AUTOSCALING_EC2_ACCESS=null | ||
AUTOSCALING_EC2_INSTANCES=null | ||
AUTOSCALING_NODES_MONITORING=null | ||
AUTOSCALING_POLL_INTERVAL=10 | ||
|
||
BF_API_KEY=none | ||
BF_API_SECRET=none | ||
|
||
|
@@ -47,6 +53,7 @@ DIRECTOR_V2_DEV_FEATURES_ENABLED=0 | |
DYNAMIC_SIDECAR_IMAGE=${DOCKER_REGISTRY:-itisfoundation}/dynamic-sidecar:${DOCKER_IMAGE_TAG:-latest} | ||
DYNAMIC_SIDECAR_LOG_LEVEL=DEBUG | ||
DYNAMIC_SIDECAR_PROMETHEUS_SERVICE_LABELS={} | ||
DYNAMIC_SIDECAR_PROMETHEUS_MONITORING_NETWORKS=[] | ||
|
||
FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]", "affiliation": "unknown"}}' | ||
|
||
|
@@ -69,6 +76,7 @@ PAYMENTS_ACCESS_TOKEN_SECRET_KEY=2c0411810565e063309be1457009fb39ce023946f6a354e | |
PAYMENTS_AUTORECHARGE_DEFAULT_MONTHLY_LIMIT=10000 | ||
PAYMENTS_AUTORECHARGE_DEFAULT_TOP_UP_AMOUNT=100.0 | ||
PAYMENTS_AUTORECHARGE_MIN_BALANCE_IN_CREDITS=100 | ||
PAYMENTS_AUTORECHARGE_ENABLED=1 | ||
PAYMENTS_FAKE_COMPLETION_DELAY_SEC=10 | ||
PAYMENTS_FAKE_COMPLETION=0 | ||
PAYMENTS_GATEWAY_API_SECRET=replace-with-api-secret | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
# Set job outputs to values from filter step | ||
outputs: | ||
aws-library: ${{ steps.filter.outputs.aws-library }} | ||
dask-task-models-library: ${{ steps.filter.outputs.dask-task-models-library }} | ||
models-library: ${{ steps.filter.outputs.models-library }} | ||
postgres-database: ${{ steps.filter.outputs.postgres-database }} | ||
|
@@ -87,6 +88,12 @@ jobs: | |
id: filter | ||
with: | ||
filters: | | ||
aws-library: | ||
- 'packages/aws-library/**' | ||
- 'packages/pytest-simcore/**' | ||
- 'services/docker-compose*' | ||
- 'scripts/mypy/*' | ||
- 'mypy.ini' | ||
dask-task-models-library: | ||
- 'packages/dask-task-models-library/**' | ||
- 'packages/pytest-simcore/**' | ||
|
@@ -804,6 +811,45 @@ jobs: | |
with: | ||
flags: unittests #optional | ||
|
||
unit-test-aws-library: | ||
needs: changes | ||
if: ${{ needs.changes.outputs.aws-library == 'true' || github.event_name == 'push' }} | ||
timeout-minutes: 18 # if this timeout gets too small, then split the tests | ||
name: "[unit] aws-library" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python: ["3.10"] | ||
os: [ubuntu-22.04] | ||
docker_buildx: [v0.10.4] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
version: ${{ matrix.docker_buildx }} | ||
driver: docker-container | ||
- name: setup python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
cache: "pip" | ||
cache-dependency-path: "packages/aws-library/requirements/ci.txt" | ||
- name: show system version | ||
run: ./ci/helpers/show_system_versions.bash | ||
- name: install | ||
run: ./ci/github/unit-testing/aws-library.bash install | ||
- name: typecheck | ||
run: ./ci/github/unit-testing/aws-library.bash typecheck | ||
- name: test | ||
if: always() | ||
run: ./ci/github/unit-testing/aws-library.bash test | ||
- uses: codecov/[email protected] | ||
with: | ||
flags: unittests #optional | ||
|
||
unit-test-dask-task-models-library: | ||
needs: changes | ||
if: ${{ needs.changes.outputs.dask-task-models-library == 'true' || github.event_name == 'push' }} | ||
|
@@ -1447,6 +1493,7 @@ jobs: | |
unit-test-catalog, | ||
unit-test-clusters-keeper, | ||
unit-test-dask-sidecar, | ||
unit-test-aws-library, | ||
unit-test-dask-task-models-library, | ||
unit-test-datcore-adapter, | ||
unit-test-director-v2, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
{ | ||
"recommendations": [ | ||
"42Crunch.vscode-openapi", | ||
"charliermarsh.ruff", | ||
"eamodio.gitlens", | ||
"exiasr.hadolint", | ||
"ms-azuretools.vscode-docker", | ||
"ms-python.black-formatter", | ||
"ms-python.pylint", | ||
"ms-python.python", | ||
"ms-vscode.makefile-tools", | ||
"njpwerner.autodocstring", | ||
"samuelcolvin.jinjahtml", | ||
"timonwong.shellcheck", | ||
"vscode-icons-team.vscode-icons", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
set -o errexit # abort on nonzero exitstatus | ||
set -o nounset # abort on unbound variable | ||
set -o pipefail # don't hide errors within pipes | ||
IFS=$'\n\t' | ||
|
||
install() { | ||
bash ci/helpers/ensure_python_pip.bash | ||
make devenv | ||
# shellcheck source=/dev/null | ||
source .venv/bin/activate | ||
pushd packages/aws-library | ||
make install-ci | ||
popd | ||
.venv/bin/pip list --verbose | ||
} | ||
|
||
test() { | ||
# shellcheck source=/dev/null | ||
source .venv/bin/activate | ||
pushd packages/aws-library | ||
make tests-ci | ||
popd | ||
} | ||
|
||
typecheck() { | ||
pushd packages/aws-library | ||
make mypy | ||
popd | ||
} | ||
|
||
# Check if the function exists (bash specific) | ||
if declare -f "$1" >/dev/null; then | ||
# call arguments verbatim | ||
"$@" | ||
else | ||
# Show a helpful error | ||
echo "'$1' is not a known function name" >&2 | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Environment variables management | ||
|
||
As a developer you will need to extend the current env vars for a service. | ||
|
||
The following rules must be followed: | ||
|
||
1. for each service that requires it, add it to the `services/docker-compose.yml` file (such as `MY_VAR=${MY_VAR}`) | ||
2. add a meaningful default value for development inside `.env-devel` so that developers can work, and that `osparc-simcore` is **self contained**. | ||
- **NOTE** if the variable has a default inside the code, put the same value here | ||
3. inside the repo where devops keep all the secrets follow the instructions to add the new env var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# Targets for DEVELOPMENT of aws Library | ||
# | ||
include ../../scripts/common.Makefile | ||
include ../../scripts/common-package.Makefile | ||
|
||
.PHONY: requirements | ||
requirements: ## compiles pip requirements (.in -> .txt) | ||
@$(MAKE_C) requirements reqs | ||
|
||
|
||
.PHONY: install-dev install-prod install-ci | ||
install-dev install-prod install-ci: _check_venv_active ## install app in development/production or CI mode | ||
# installing in $(subst install-,,$@) mode | ||
pip-sync requirements/$(subst install-,,$@).txt | ||
|
||
|
||
.PHONY: tests tests-ci | ||
tests: ## runs unit tests | ||
# running unit tests | ||
@pytest \ | ||
--asyncio-mode=auto \ | ||
--color=yes \ | ||
--cov-config=../../.coveragerc \ | ||
--cov-report=term-missing \ | ||
--cov=aws_library \ | ||
--durations=10 \ | ||
--exitfirst \ | ||
--failed-first \ | ||
--pdb \ | ||
-vv \ | ||
$(CURDIR)/tests | ||
|
||
tests-ci: ## runs unit tests | ||
# running unit tests | ||
@pytest \ | ||
--asyncio-mode=auto \ | ||
--color=yes \ | ||
--cov-append \ | ||
--cov-config=../../.coveragerc \ | ||
--cov-report=term-missing \ | ||
--cov-report=xml \ | ||
--cov=aws_library \ | ||
--durations=10 \ | ||
--log-date-format="%Y-%m-%d %H:%M:%S" \ | ||
--log-format="%(asctime)s %(levelname)s %(message)s" \ | ||
--verbose \ | ||
-m "not heavy_load" \ | ||
$(CURDIR)/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# simcore AWS library | ||
|
||
Provides a wrapper around AWS python libraries. | ||
|
||
Requirements to be compatible with the library: | ||
|
||
- only AWS-related code | ||
|
||
|
||
## Installation | ||
|
||
```console | ||
make help | ||
make install-dev | ||
``` | ||
|
||
## Test | ||
|
||
```console | ||
make help | ||
make test-dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |
Oops, something went wrong.