Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
07a27e7
Transformer Implementation
OlivGruwe Jun 7, 2023
3c1ef15
Transformer Implementation
OlivGruwe Jun 7, 2023
6d23b4c
Transformer Implementation +
OlivGruwe Jun 12, 2023
d85aa30
Transformer Implementation
OlivGruwe Jun 12, 2023
b02bb01
Transformer Implementation
OlivGruwe Jun 12, 2023
d7c727f
Transformer Implementation
OlivGruwe Jun 12, 2023
b3b4f52
Transformer Implementation
OlivGruwe Jun 12, 2023
dcde84e
Correction Txt -> Pdf
OlivGruwe Jul 3, 2023
d6b8c6c
Merge branch 'master' of github.com:crim-ca/weaver into job_output_tr…
Nazim-crim Sep 24, 2024
b3048bb
Fixing naming typos
Nazim-crim Sep 24, 2024
a23519e
Adding libpangocairo to dockerfile
Nazim-crim Sep 24, 2024
ee9c208
Fixing import and linting
Nazim-crim Sep 25, 2024
a8d4473
Fixing docker call and removing unused code
Nazim-crim Sep 26, 2024
574314c
Removing transformer route and test in job, fixing makefile
Nazim-crim Sep 26, 2024
0304b3a
Adding swagger and endpoint definition to support outputId and resultId
Nazim-crim Sep 26, 2024
4cf0e80
Adding in config output and result service
Nazim-crim Oct 1, 2024
81721dd
Fixing test to use transformer resource path
Nazim-crim Oct 11, 2024
e66c582
Fix transform function any to pdf and any to html for transform test …
Nazim-crim Oct 11, 2024
34cd699
Fix import lint
Nazim-crim Oct 11, 2024
fe71427
fixing some linting
Nazim-crim Oct 15, 2024
71f6f96
Adding get job output route
Nazim-crim Oct 15, 2024
34ddd87
Fxing more linting
Nazim-crim Oct 15, 2024
5fe2af0
Merge branch 'master' of github.com:crim-ca/weaver into job_output_tr…
Nazim-crim Oct 15, 2024
9fedeb7
Remove duplicate code from merge
Nazim-crim Oct 15, 2024
13d3d17
Update get job output to use get_job_results_single and refactor tran…
Nazim-crim Oct 15, 2024
bc14eac
fix docstring
Nazim-crim Oct 15, 2024
a837ff0
Fixing wps api test
Nazim-crim Oct 25, 2024
037a8a4
Fix test and transform to use conversion list and content type from f…
Nazim-crim Oct 28, 2024
a658579
Merge branch 'master' of github.com:crim-ca/weaver into job_output_tr…
Nazim-crim Oct 28, 2024
38314b6
Modify offering to add alternate formats to format in process and test
Nazim-crim Nov 5, 2024
472ac6b
Remove call of get_all_possible_formats_links in get outputs endpoint
Nazim-crim Nov 5, 2024
4ee2247
Fix wps package test and offering method for edge case where formats …
Nazim-crim Nov 5, 2024
a71187d
Fixing process test
Nazim-crim Nov 6, 2024
e6143b5
Fixing json indent
Nazim-crim Nov 6, 2024
6bfb158
Fixing typo and adding missing format in test
Nazim-crim Nov 6, 2024
7591617
Fixing pep8
Nazim-crim Nov 6, 2024
41147b0
fix single quote
Nazim-crim Nov 6, 2024
3448038
Fixing providers test and fix empty line eof
Nazim-crim Nov 6, 2024
ce4bbb3
Adding test files for different conversion
Nazim-crim Nov 7, 2024
9d823e8
Adding create content id, fixing test with additional format type
Nazim-crim Nov 7, 2024
969f76b
Adding excluded in transform and fixing link parsing
Nazim-crim Nov 8, 2024
42c772d
Fixing make result link and adding URN schema
Nazim-crim Nov 8, 2024
e4c3194
Fixing kwargs parsing
Nazim-crim Nov 8, 2024
c3b0db7
Fixing make link header and adding test, fix old test
Nazim-crim Nov 14, 2024
7544834
Merge branch 'master' of github.com:crim-ca/weaver into job_output_tr…
Nazim-crim Nov 14, 2024
a7fb477
Fixing write images and adding coverage
Nazim-crim Nov 14, 2024
bf1118d
Adding docstring and typing, fixing test to use parametrize
Nazim-crim Nov 14, 2024
3c24142
Adding change log entry and fixing import
Nazim-crim Nov 15, 2024
7c1ff74
Using smaller tests files
Nazim-crim Nov 18, 2024
e70233e
Using contentType class for test
Nazim-crim Nov 18, 2024
32bdb81
Fixing comment indent, removing unused code
Nazim-crim Nov 26, 2024
a7f8216
Wrap test in try finally
Nazim-crim Nov 29, 2024
c017929
Fixing docstring, removing unused function
Nazim-crim Nov 29, 2024
2ce3667
Fixing doc, requirements ordering and removing print
Nazim-crim Dec 12, 2024
f9aee2f
Fixing cli formating, swagger def and correcting wps_package assert
Nazim-crim Dec 18, 2024
0bc4822
modifying execute and fix import
Nazim-crim Feb 19, 2025
a2e8eee
Merge master
Nazim-crim Feb 19, 2025
216b7ea
fixing requirements
Nazim-crim Feb 19, 2025
11e5546
Merge branch 'master' into job_output_transform
fmigneault Mar 12, 2025
f2a87a8
Fixing linting and provenance test when outputs are empty
Nazim-crim Mar 13, 2025
c8e7564
Fixing test to keep outputs endpoint json only
Nazim-crim Mar 24, 2025
ddbe770
Fix cli download to only unique link
Nazim-crim Mar 24, 2025
2f89e63
Removing unused import, code cleanup, fixing ogc strict check
Nazim-crim Mar 24, 2025
e8093ec
Fix process test to use contentType constants
Nazim-crim Mar 24, 2025
c79a22b
Merge branch 'master' of github.com:crim-ca/weaver into job_output_tr…
Nazim-crim Mar 24, 2025
2852caf
Fixing import
Nazim-crim Mar 24, 2025
704e217
Simplify possible output format lookup and removing unused function
Nazim-crim Mar 24, 2025
7ec5e4f
refactoring to extract logic to extend_alternate_formats
Nazim-crim Mar 26, 2025
f3d0d9e
Adding missing types to tests and adding missing docstring
Nazim-crim Mar 26, 2025
e289017
Fixing import, adding test for coverage and removed unused code
Nazim-crim Apr 1, 2025
64db348
Adding parameter in extend alternate format to avoid circular dep, re…
Nazim-crim Apr 1, 2025
bc859d3
Merge branch 'master' into job_output_transform
fmigneault Apr 2, 2025
555ecc1
Fixing changelog
Nazim-crim Apr 7, 2025
a2306c1
Fixing test formating, removing try catch
Nazim-crim Apr 7, 2025
8b3b3c4
Adding pytest fixture to avoid duplicate
Nazim-crim Apr 7, 2025
e2b282c
fixing docstring
Nazim-crim Apr 9, 2025
47d35cf
Fixing format resolution and type validation
Nazim-crim Apr 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ Changes

Changes:
--------
- No change.
- Add support for various GeoTIFF formats, allowing flexible handling and representation of GeoTIFFs in outputs
(fixes `#100 <https://github.com/crim-ca/weaver/issues/100>`_).
- Add support for ``GET /jobs/{jobId}/results/{id}`` and ``GET /jobs/{jobId}/outputs/{id}`` routes to enable direct access to
individual `Job` result items by ID. This enhancement includes support alternate representations based on the ``Accept`` header.
If an alternate format (e.g., YAML for a JSON source) is requested it will be automatically generated and returned.
- Return ``Link`` headers containing all possible output formats, allowing retrieval via query parameters
(e.g., ``/jobs/{jobId}/outputs/{id}?f=application/x-yaml``) (fixes `#18 <https://github.com/crim-ca/weaver/issues/18>`_).

Fixes:
------
- No change.
- Add a fix entry for the multiple duplicate links not re-downloaded in the CLI.

.. _changes_6.4.1:

Expand Down
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ DOCKER_REPO ?= pavics/weaver
# guess OS (Linux, Darwin,...)
OS_NAME := $(shell uname -s 2>/dev/null || echo "unknown")
CPU_ARCH := $(shell uname -m 2>/dev/null || uname -p 2>/dev/null || echo "unknown")
SUDO ?=

# conda
CONDA_CMD ?= __EMPTY__
Expand Down Expand Up @@ -229,10 +230,10 @@ conda-env-export: ## export the conda environment
install: install-all ## alias for 'install-all' target

.PHONY: install-run
install-run: conda-install install-sys install-pkg install-raw ## install requirements and application to run locally
install-run: conda-install install-sys install-pkg install-raw install-dev install-transform ## install requirements and application to run locally

.PHONY: install-all
install-all: conda-install install-sys install-pkg install-pip install-dev ## install application with all dependencies
install-all: conda-install install-sys install-pkg install-pip install-dev install-transform ## install application with all dependencies

.PHONY: install-doc
install-doc: install-pip ## install documentation dependencies
Expand Down Expand Up @@ -275,7 +276,7 @@ install-raw: ## install without any requirements or dependencies (suppose everyt
install-npm: ## install npm package manager and dependencies if they cannot be found
@[ -f "$(shell which npm)" ] || ( \
echo "Binary package manager npm not found. Attempting to install it."; \
apt-get install npm \
$(SUDO) apt-get install npm \
)

.PHONY: install-npm-stylelint
Expand All @@ -292,6 +293,16 @@ install-npm-remarklint: install-npm ## install remark-lint dependency for 'chec
npm install --save-dev \
)

.PHONY: install-transform
install-transform: install-cairo-dependencies # install-transform dependencies

.PHONY: install-cairo-dependencies
install-cairo-dependencies: ## install required dependencies for Transformer
@[ -f "$(shell which cairo)" ] || ( \
echo "Binary package manager cairo not found. Attempting to install it."; \
$(SUDO) apt-get install libpangocairo-1.0-0 \
Comment on lines +302 to +303
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need other libraries here. https://cairosvg.org/documentation/

)

.PHONY: install-dev-npm
install-dev-npm: install-npm install-npm-remarklint install-npm-remarklint ## install all npm development dependencies

Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
git \
nodejs \
libpangocairo-1.0-0 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to validate against libraries listed in https://cairosvg.org/documentation/ that are different...
Maybe a custom docker smoke-test or something? Not sure yet.

&& pip install --no-cache-dir --upgrade -r requirements-sys.txt \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir -e ${APP_DIR} \
Expand Down
8 changes: 8 additions & 0 deletions requirements.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already have a install-transforms Makefile target, I think we should consider moving the new dependencies to a dedicated requirements-transform.txt file to keep things clear.
The corresponding pip install -r requirements-transform.txt would be added to install-transforms.

Maybe another PR could explore the optional activation of transform capabilities...

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ boto3-stubs[s3]
# https://github.com/celery/billiard/issues/313
billiard>2; sys_platform != "win32" # avoid issue with use_2to3
billiard>3.2,<3.4; sys_platform == "win32"
cairosvg
# pymongo>=4 breaks for some kombu combinations corresponding to pinned Celery
# - https://github.com/crim-ca/weaver/issues/386
# - https://github.com/celery/kombu/pull/1536
Expand Down Expand Up @@ -52,6 +53,7 @@ duration
esgf-compute-api @ git+https://github.com/ESGF/[email protected]
# invalid 'zarr' requirement in 'geotiff' dependencies required by 'pywps' fail to install
# (https://github.com/KipCrossing/geotiff/pull/59)
fpdf
geotiff>=0.2.8
# gunicorn >20 breaks some config.ini loading parameters (paste)
# use pserve to continue supporting config.ini with paste settings
Expand All @@ -60,6 +62,7 @@ gunicorn>=22
# even more reduced dependency constraints (https://github.com/vinitkumar/json2xml/pull/195)
json2xml==4.1.0
jsonschema>=3.0.1

# FIXME: kombu for pymongo>=4 not yet released as 5.3.0 (only pre-releases available)
# - https://github.com/crim-ca/weaver/issues/386
# - https://github.com/celery/kombu/pull/1536
Expand All @@ -70,12 +73,15 @@ mako
# force use of later mistune (https://github.com/common-workflow-language/schema_salad/pull/619#issuecomment-1346025607)
# employed by cwltool -> schema-salad -> mistune
#mistune>=2.0.3,<2.1
multipagetiff
mypy_boto3_s3
numpy>=1.22.2
# esgf-compute-api (cwt) needs oauthlib but doesn't add it in their requirements
oauthlib
owslib==0.32.1
PasteDeploy>=3.1.0; python_version >= "3.12"
pandas
Pillow
pint
psutil
# notes: https://github.com/geopython/pygeofilter
Expand Down Expand Up @@ -103,9 +109,11 @@ pystac
pystac_client
python-box
python-dateutil
python-magic
pytz
pywps==4.6.0
pyyaml>=5.2
rasterio
rdflib>=5 # pyup: ignore
requests>=2.32.2
requests_file
Expand Down
13 changes: 12 additions & 1 deletion tests/functional/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,11 @@ def test_describe(self):
for out_fmt in output_formats:
out_fmt.pop("$schema", None)
out_fmt.pop("$id", None)
assert output_formats == [{"default": True, "mediaType": ContentType.TEXT_PLAIN}]
assert output_formats == [
{"default": True, "mediaType": ContentType.TEXT_PLAIN},
{"mediaType": ContentType.TEXT_HTML},
{"mediaType": ContentType.APP_PDF}
]
assert "undefined" not in result.message, "CLI should not have confused process description as response detail."
assert result.body["description"] == (
"Dummy process that simply echo's back the input message for testing purposes."
Expand Down Expand Up @@ -1493,6 +1497,13 @@ def test_deploy_payload_process_info_merged(self):
out_cwl_fmt = {"default": False, "mediaType": io_fmt}
out_oas_fmt = {"default": True, "mediaType": ContentType.APP_JSON}
out_any_fmt = [out_cwl_fmt, out_oas_fmt]
# Alternative format added in process description
out_alt_fmt = [
{"mediaType": ContentType.TEXT_CSV},
{"mediaType": ContentType.APP_XML},
{"mediaType": ContentType.APP_YAML},
]
out_any_fmt.extend(out_alt_fmt)
# ignore schema specifications for comparison only of contents
for field in ["$id", "$schema"]:
in_schema.pop(field, None)
Expand Down
Loading
Loading