Skip to content

Commit

Permalink
Import the UWS support layer from vo-cutouts
Browse files Browse the repository at this point in the history
Import the UWS implementation from vo-cutouts. Provide the support
code for the backend worker as safir.arq.uws, since it needs to be
installable separately and dependeded on safir.arq anyway. Provide
the rest as safir.uws, hiding as many of the implementation details
as possible (which requires importing internal modules in the test
suite, since the tests need to poke at the internals).

The UWS code depends on vo-models, which currently still uses
Pydantic v1 features, so the deprecation warning for the legacy
class configuration syntax has to be suppressed for now until
vo-models is fixed.

Add a new uws dependency group that should be used when using the
uws code. This duplicates some dependencies from arq and db, since
that code is used internally.
  • Loading branch information
rra committed Jul 24, 2024
1 parent c2239b7 commit 4c23a86
Show file tree
Hide file tree
Showing 42 changed files with 7,044 additions and 660 deletions.
3 changes: 3 additions & 0 deletions changelog.d/20240723_170141_rra_DM_45281_queue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### New features

- Add new `safir.uws` and `safir.arq.uws` modules that provide the framework of an IVOA Universal Worker Service implementation.
6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ API reference
.. automodapi:: safir.arq
:include-all-objects:

.. automodapi:: safir.arq.uws
:include-all-objects:

.. automodapi:: safir.asyncio
:include-all-objects:
:inherited-members:
Expand Down Expand Up @@ -93,3 +96,6 @@ API reference

.. automodapi:: safir.testing.uvicorn
:include-all-objects:

.. automodapi:: safir.uws
:include-all-objects:
6 changes: 6 additions & 0 deletions docs/documenteer.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ nitpick_ignore = [
["py:obj", "JobMetadata.id"],
["py:class", "pydantic.BaseModel"],
["py:class", "BaseModel"],
# arq doesn't provide documentation for all of its types.
["py:class", "arq.cron.CronJob"],
["py:class", "arq.typing.StartupShutdown"],
["py:class", "arq.typing.WorkerCoroutine"],
["py:class", "arq.worker.Function"],
# sphinx-automodapi apparently doesn't recognize TypeAlias as an object
# that should have generated documentation, even with include-all-objects.
["py:obj", "safir.pydantic.EnvAsyncPostgresDsn"],
Expand All @@ -43,6 +48,7 @@ python = "https://docs.python.org/3/"
redis = "https://redis-py.readthedocs.io/en/stable/"
structlog = "https://www.structlog.org/en/stable/"
sqlalchemy = "https://docs.sqlalchemy.org/en/latest/"
vomodels = "https://vo-models.readthedocs.io/latest/"

[sphinx.linkcheck]
ignore = [
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _install(session: nox.Session) -> None:
"""Install the application and all dependencies into the session."""
session.install("--upgrade", "uv")
session.install(
"-e", "./safir-arq", "./safir[arq,db,dev,gcs,kubernetes,redis]"
"-e", "./safir-arq", "./safir[arq,db,dev,gcs,kubernetes,redis,uws]"
)


Expand Down
Loading

0 comments on commit 4c23a86

Please sign in to comment.