Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Processes, enable the outputTransmission=reference #1956

Open
francescoingv opened this issue Mar 7, 2025 · 1 comment
Open

In Processes, enable the outputTransmission=reference #1956

francescoingv opened this issue Mar 7, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@francescoingv
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In a project I need to return the output by reference.
I looked at the demo class EchoProcessor,
where in PROCESS_METADATA is defined the option:

  'outputTransmission': [
    'value',
    'reference'
  ],

However it is not present in the process description:
http://.../processes/hello-world?f=json

Describe the solution you'd like
I imagine it is the Processor responsibility to provide the reference (link) back to the Manager, to be included in the returned header,
similarly to providing back mimetype and output that in this case I guess should be None and '' (i.e. empty).
However there is no way to return the reference.
Also, in this case the returned code to a job request should be 204, but I think this is not considered from the Manager.

Describe alternatives you've considered
As far as I understand there is no alternative to make the feature enabled.

Additional context
I am available to help to have the option outputTransmission=reference working.
However, while I could help to enhance the demo class EchoProcessor and the base processor class BaseManager,
I am not able to follow the upstream structure, and work on those parts of Pygeoapi.

@francescoingv francescoingv added the enhancement New feature or request label Mar 7, 2025
@francescoingv
Copy link
Contributor Author

If the requested response is raw, then Pygeoapi should respond as per table 11 of the standard,
i.e. http code = 204, media type none, body empty with Link headers.

Instead Pygeoapi BaseManager get the outputs returned by the Processor and pass it back to the API execute_process(),
which copy the output to the body (which will contain href instead of value) and without adding any link header.

If the Processor outputs contained the result as defined in results.yaml -> inlineOrRefData.yaml -> link.yaml
then Pygeoapi returns what I understand table 11 reports it should return when requested response is document.

However if requested response were document, Pygeoapi returns an object, with one property (outputs), containing the result.

Conclusion
I can leave with that,
but I propose at least to document this aspect which was misleading for me.

I would also like to ask if the returned body when requested response is document should rather be what is now returned when requested response is raw. But I am not sure on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant