Skip to content

Commit

Permalink
Add entry point for loading translator code automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Jan 3, 2025
1 parent e51df1d commit 37c5741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name = "lsst-obs-lsst"
[project.entry-points.'butler.cli']
obs_lsst = "lsst.obs.lsst.cli:get_cli_subcommands"

[project.entry-points.astro_metadata_translators]
obs_lsst = "lsst.obs.lsst.translators:_force_load"

[tool.ruff]
line-length = 110
target-version = "py311"
Expand Down
7 changes: 7 additions & 0 deletions python/lsst/obs/lsst/translators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@
from .comCam import *
from .comCamSim import *
from .lsstCamSim import *


def _force_load():
# This function exists solely to be loaded by the
# astro_metadata_translators entry point. The function
# will not be called.
pass

0 comments on commit 37c5741

Please sign in to comment.