diff --git a/project_templates/fastapi_safir_app/example/src/example/main.py b/project_templates/fastapi_safir_app/example/src/example/main.py index cdda9614..10973c67 100644 --- a/project_templates/fastapi_safir_app/example/src/example/main.py +++ b/project_templates/fastapi_safir_app/example/src/example/main.py @@ -7,7 +7,7 @@ called. """ -from importlib.metadata import metadata +from importlib.metadata import metadata, version from fastapi import FastAPI from safir.dependencies.http_client import http_client_dependency @@ -29,8 +29,8 @@ app = FastAPI( title="example", - description=metadata("example").get("Summary", ""), - version=metadata("example").get("Version", "0.0.0"), + description=metadata("example")["Summary"], + version=version("example"), openapi_url=f"/{config.name}/openapi.json", docs_url=f"/{config.name}/docs", redoc_url=f"/{config.name}/redoc", diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.package_name}}/main.py b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.package_name}}/main.py index f7d5e179..618fe35e 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.package_name}}/main.py +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/src/{{cookiecutter.package_name}}/main.py @@ -7,7 +7,7 @@ called. """ -from importlib.metadata import metadata +from importlib.metadata import metadata, version from fastapi import FastAPI from safir.dependencies.http_client import http_client_dependency @@ -29,8 +29,8 @@ app = FastAPI( title="{{ cookiecutter.name }}", - description=metadata("{{ cookiecutter.name }}").get("Summary", ""), - version=metadata("{{ cookiecutter.name }}").get("Version", "0.0.0"), + description=metadata("{{ cookiecutter.name }}")["Summary"], + version=version("{{ cookiecutter.name }}"), openapi_url=f"/{config.name}/openapi.json", docs_url=f"/{config.name}/docs", redoc_url=f"/{config.name}/redoc", diff --git a/project_templates/latex_lsstdoc/EXAMPLE-0/bibentry.txt b/project_templates/latex_lsstdoc/EXAMPLE-0/bibentry.txt index 6c83063e..3c91082a 100644 --- a/project_templates/latex_lsstdoc/EXAMPLE-0/bibentry.txt +++ b/project_templates/latex_lsstdoc/EXAMPLE-0/bibentry.txt @@ -4,6 +4,6 @@ author = { First Author }, title = {Document Title}, year = 2022, - month = Apr, + month = May, handle = {EXAMPLE-0}, url = {https://example-0-0.lsst.io } } diff --git a/project_templates/latex_lsstdoc/EXAMPLE/bibentry.txt b/project_templates/latex_lsstdoc/EXAMPLE/bibentry.txt index 0e1a1950..aff946ca 100644 --- a/project_templates/latex_lsstdoc/EXAMPLE/bibentry.txt +++ b/project_templates/latex_lsstdoc/EXAMPLE/bibentry.txt @@ -4,6 +4,6 @@ author = { First Author }, title = {Document Title}, year = 2022, - month = Apr, + month = May, handle = {EXAMPLE}, url = {https://example-.lsst.io } } diff --git a/project_templates/technote_latex/testn-000/bibentry.txt b/project_templates/technote_latex/testn-000/bibentry.txt index 56f51110..b62ffc64 100644 --- a/project_templates/technote_latex/testn-000/bibentry.txt +++ b/project_templates/technote_latex/testn-000/bibentry.txt @@ -4,6 +4,6 @@ author = { First Last }, title = {Document Title}, year = 2022, - month = Apr, + month = May, handle = {TESTN-000}, url = {https://testn-000.lsst.io } } diff --git a/project_templates/technote_rst/testn-000/bibentry.txt b/project_templates/technote_rst/testn-000/bibentry.txt index 56f51110..b62ffc64 100644 --- a/project_templates/technote_rst/testn-000/bibentry.txt +++ b/project_templates/technote_rst/testn-000/bibentry.txt @@ -4,6 +4,6 @@ author = { First Last }, title = {Document Title}, year = 2022, - month = Apr, + month = May, handle = {TESTN-000}, url = {https://testn-000.lsst.io } } diff --git a/project_templates/test_report/TESTTR-0/bibentry.txt b/project_templates/test_report/TESTTR-0/bibentry.txt index 301b2225..636c99e9 100644 --- a/project_templates/test_report/TESTTR-0/bibentry.txt +++ b/project_templates/test_report/TESTTR-0/bibentry.txt @@ -4,6 +4,6 @@ author = { First Author }, title = {Document Title}, year = 2022, - month = Apr, + month = May, handle = {TESTTR-0}, url = {https://testtr-0.lsst.io } }