diff --git a/project_templates/fastapi_safir_app/example-uws/src/exampleuws/dependencies.py b/project_templates/fastapi_safir_app/example-uws/src/exampleuws/dependencies.py index 006232ef..009c66ca 100644 --- a/project_templates/fastapi_safir_app/example-uws/src/exampleuws/dependencies.py +++ b/project_templates/fastapi_safir_app/example-uws/src/exampleuws/dependencies.py @@ -3,7 +3,7 @@ from typing import Annotated from fastapi import Depends -from safir.uws import UWSJobParameter, uws_post_params_dependency +from safir.uws import UWSJobParameter __all__ = [ "post_params_dependency", @@ -13,15 +13,9 @@ async def post_params_dependency( *, # Add POST parameters here. All of them should be Form() parameters. - # Use str | None for single-valued attributes and str | list[str] | None - # for parameters that can be given more than one time. - params: Annotated[ - list[UWSJobParameter], Depends(uws_post_params_dependency) - ], + # Use str | None for single-valued attributes and list[str] | None for + # parameters that can be given more than one time. ) -> list[UWSJobParameter]: """Parse POST parameters into job parameters.""" - return [ - p - for p in params - if p.parameter_id in set() # Replace with set of parameter names - ] + params: list[UWSJobParameter] = [] + # Populate params with the values of all form parameters that were set. diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py index 304d406f..422a4896 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.module_name}}/dependencies.py @@ -4,7 +4,7 @@ from typing import Annotated from fastapi import Depends -from safir.uws import UWSJobParameter, uws_post_params_dependency +from safir.uws import UWSJobParameter __all__ = [ "post_params_dependency", @@ -14,16 +14,10 @@ async def post_params_dependency( *, # Add POST parameters here. All of them should be Form() parameters. - # Use str | None for single-valued attributes and str | list[str] | None - # for parameters that can be given more than one time. - params: Annotated[ - list[UWSJobParameter], Depends(uws_post_params_dependency) - ], + # Use str | None for single-valued attributes and list[str] | None for + # parameters that can be given more than one time. ) -> list[UWSJobParameter]: """Parse POST parameters into job parameters.""" - return [ - p - for p in params - if p.parameter_id in set() # Replace with set of parameter names - ] + params: list[UWSJobParameter] = [] + # Populate params with the values of all form parameters that were set. {%- endif %} diff --git a/project_templates/technote_md/testn-000/technote.toml b/project_templates/technote_md/testn-000/technote.toml index 726c3c1e..6a0edefb 100644 --- a/project_templates/technote_md/testn-000/technote.toml +++ b/project_templates/technote_md/testn-000/technote.toml @@ -4,7 +4,7 @@ series_id = "TESTN" canonical_url = "https://testn-000.lsst.io" github_url = "https://github.com/lsst/testn-000" github_default_branch = "main" -date_created = 2024-11-25T22:09:21Z +date_created = 2024-12-03T22:35:26Z organization.name = "Vera C. Rubin Observatory" organization.ror = "https://ror.org/048g3cy84" license.id = "CC-BY-4.0" diff --git a/project_templates/technote_rst/testn-000/technote.toml b/project_templates/technote_rst/testn-000/technote.toml index f6d5ead5..a306c9bc 100644 --- a/project_templates/technote_rst/testn-000/technote.toml +++ b/project_templates/technote_rst/testn-000/technote.toml @@ -4,7 +4,7 @@ series_id = "TESTN" canonical_url = "https://testn-000.lsst.io" github_url = "https://github.com/lsst/testn-000" github_default_branch = "main" -date_created = 2024-11-25T22:09:21Z +date_created = 2024-12-03T22:35:26Z organization.name = "Vera C. Rubin Observatory" organization.ror = "https://ror.org/048g3cy84" license.id = "CC-BY-4.0"