Skip to content

Commit

Permalink
Merge branch 'master' into properties-field-modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault authored Nov 27, 2024
2 parents 8e4ebed + df041c0 commit 9b2ac47
Show file tree
Hide file tree
Showing 22 changed files with 1,433 additions and 379 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ jobs:
env | sort
- name: Run Tests
run: make stop ${{ matrix.test-case }}

# disable due to confusing and unhelpful messages created by codecov
# (see )https://github.com/codecov/feedback/issues/304#issuecomment-2492675117)
# - name: Upload test results to Codecov
# if: ${{ !cancelled() && success() && matrix.test-case == 'test-coverage-only' }}
# uses: codecov/test-results-action@v1
# with:
# files: reports/coverage-junit.xml,!./cache
# flags: ${{ matrix.python-version }}
# token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage report
uses: codecov/codecov-action@v2
if: ${{ success() && matrix.test-case == 'test-coverage-only' }}
Expand Down
33 changes: 29 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,34 @@ Changes:
submitted ``response`` body parameter (*OGC API - Processes v1.0*),
the ``Prefer: return`` header (*OGC API - Processes v2.0*), the requested ``Accept`` header,
and any relevant ``transmissionMode`` request body overrides per filtered ``outputs``.

Fixes:
------
- Modify the mapping and generation of `WPS`/`OGC API` metadata against `CWL` corresponding fields using
the namespaced ``schema.org`` to *always* employ the full `URI` as ``rel`` or ``role`` according to the
provided metadata link or value to allow explicit identification of the ``schema.org`` concept origin.
- Add mapping of metadata from `CWL` to `WPS`/`OGC API` ``metadata`` field for additional ``schema.org`` concepts.

Fixes:
------
- Fix race condition between workflow step early input staging cleanup on successful step status update.
Due to the ``_update_status`` method of ``pywps`` performing cleanup when propagating a successful completion of
a step within a workflow, the parent workflow was marked as succeeded (`XML` status document), and any step executed
after the successful one that were depending on the workflow inputs could result in not-found file references if it
was staged by the previous step.
- Fix optional ``title`` in metadata causing failing HTML rendering of the `Process` description if omitted.
- Fix HTML ``Content-Type`` header erroneously set for JSON-only (for now) ``GET /jobs/{jobId}`` as similar endpoints.
- Fix `CWL` ``enum`` type mishandling ``symbols`` containing a colon (``:``) character (e.g.: a list of allowed times)
leading to their invalid interpretation as namespaced strings (i.e.: ``<ns>:<value>``), in turn failing validation
and breaking the resulting `CWL`. Such ``enum`` will be patched with updated ``symbols`` prefixed by ``#`` to respect
the expected URI representation of ``enum`` values by the `CWL` parser (relates to
`common-workflow-language/cwltool#2071 <https://github.com/common-workflow-language/cwltool/issues/2071>`_).
- Fix `CWL` conversion from a `OGC API - Processes` definition specifying an `I/O` with ``schema`` explicitly
indicating a ``type: array`` and nested ``enum``, even if ``minOccurs: 1`` is omitted or explicitly set.
- Fix ``url`` parameter to override the `CLI` internal ``url`` when passed explicitly to the invoked operation.
- Fix ``href`` detection when provided directly as mapping within the ``executionUnit`` of the deployment body.
- Fix definition of `CWL` ``schema.org`` namespaced fields (i.e.: ``s:author`` and ``s:dateCreated``) causing
schema deserialization error when validating the submitted request body against typical examples provided in
`CWL Metadata and Authorship <https://www.commonwl.org/user_guide/topics/metadata-and-authorship.html>`_.
- Fix mapping of `CWL` ``schema.org`` metadata to `WPS`/`OGC API` equivalent metadata defining invalid ``role``
not respecting the `URI` schema validation constraint.
- Fix ``GET /jobs/{jobId}/inputs`` contents to correctly return the submitted ``outputs`` definition
for `Process` execution (fixes `#715 <https://github.com/crim-ca/weaver/issues/715>`_).
- Fix missing ``Link`` header with ``rel: monitor`` relationship in the created `Job` responses
Expand Down Expand Up @@ -107,7 +132,7 @@ Changes:
and a sample `crim-ca/ncml2stac <https://github.com/crim-ca/ncml2stac/tree/main#ncml-to-stac>`_ repository
making use of it with the `Weaver` `CLI` to generate a deployed `OGC API - Processes` definition
(fixes `#63 <https://github.com/crim-ca/weaver/issues/63>`_).
- Add parsing of additional metadata from schema.org in CWL document to convert into process fields
- Add parsing of additional metadata from ``schema.org`` in CWL document to convert into process fields
(fixes `#463 <https://github.com/crim-ca/weaver/issues/463>`_).
- Add more metadata mapping details in documentation (fixes `#613 <https://github.com/crim-ca/weaver/issues/613>`_).

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ test-docker: docker-test ## alias to 'docker-test' execution smoke test of bu
.PHONY: test-coverage-only
test-coverage-only: mkdir-reports ## run all tests using coverage analysis
@echo "Running coverage analysis..."
@bash -c '$(CONDA_CMD) coverage run --rcfile="$(APP_ROOT)/setup.cfg" "$$(which pytest)" "$(APP_ROOT)/tests" || true'
@bash -c '$(CONDA_CMD) coverage run --rcfile="$(APP_ROOT)/setup.cfg" \
"$$(which pytest)" "$(APP_ROOT)/tests" --junitxml="$(REPORTS_DIR)/coverage-junit.xml" || true'
@bash -c '$(CONDA_CMD) coverage xml --rcfile="$(APP_ROOT)/setup.cfg" -i -o "$(REPORTS_DIR)/coverage.xml"'
@bash -c '$(CONDA_CMD) coverage report --rcfile="$(APP_ROOT)/setup.cfg" -i -m'
@bash -c '$(CONDA_CMD) coverage html --rcfile="$(APP_ROOT)/setup.cfg" -d "$(REPORTS_DIR)/coverage"'
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def doc_redirect_include(file_path):

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "../_static/crim.png"
html_logo = "../../weaver/wps_restapi/templates/static/crim.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand Down
Loading

0 comments on commit 9b2ac47

Please sign in to comment.