pyobs-brot 2.0.0.dev14__tar.gz → 2.0.0.dev16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. pyobs_brot-2.0.0.dev16/.github/workflows/dependabot-automerge.yml +24 -0
  2. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/PKG-INFO +2 -2
  3. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/pyobs_brot/brottelescope.py +6 -8
  4. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/pyproject.toml +2 -2
  5. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/tests/test_brottelescope.py +20 -0
  6. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/uv.lock +5 -5
  7. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.github/dependabot.yml +0 -0
  8. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.github/workflows/pypi.yml +0 -0
  9. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.github/workflows/pyrefly.yml +0 -0
  10. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.github/workflows/pytest.yml +0 -0
  11. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.github/workflows/ruff.yml +0 -0
  12. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.gitignore +0 -0
  13. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.pre-commit-config.yaml +0 -0
  14. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/.readthedocs.yml +0 -0
  15. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/LICENSE +0 -0
  16. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/README.md +0 -0
  17. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/docs/Makefile +0 -0
  18. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/docs/make.bat +0 -0
  19. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/docs/requirements.txt +0 -0
  20. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/docs/source/_static/pyobs.gif +0 -0
  21. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/docs/source/conf.py +0 -0
  22. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/docs/source/index.rst +0 -0
  23. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/pyobs_brot/__init__.py +0 -0
  24. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/pyobs_brot/brotdome.py +0 -0
  25. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/pyobs_brot/brotroof.py +0 -0
  26. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/specs/index.md +0 -0
  27. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/tests/test_brotroof.py +0 -0
  28. {pyobs_brot-2.0.0.dev14 → pyobs_brot-2.0.0.dev16}/tests/test_import.py +0 -0
@@ -0,0 +1,24 @@
1
+ name: Dependabot auto-merge
2
+
3
+ on: pull_request
4
+
5
+ permissions:
6
+ contents: write
7
+ pull-requests: write
8
+
9
+ jobs:
10
+ dependabot:
11
+ runs-on: ubuntu-latest
12
+ if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
13
+ steps:
14
+ - name: Fetch Dependabot metadata
15
+ id: metadata
16
+ uses: dependabot/fetch-metadata@v2
17
+ with:
18
+ compat-lookup: true
19
+ - name: Enable auto-merge for patch and minor updates
20
+ if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
21
+ run: gh pr merge --auto --merge "$PR_URL"
22
+ env:
23
+ PR_URL: ${{ github.event.pull_request.html_url }}
24
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pyobs-brot
3
- Version: 2.0.0.dev14
3
+ Version: 2.0.0.dev16
4
4
  Summary: pyobs module for BROTlib telescopes
5
5
  Author-email: Tim-Oliver Husser <thusser@uni-goettingen.de>, Lukas Melzig <lukas.melzig@stud.uni-goettingen.de>
6
6
  License-Expression: MIT
@@ -9,4 +9,4 @@ Requires-Python: >=3.11
9
9
  Requires-Dist: astropy<8,>=7.0.1
10
10
  Requires-Dist: paho-mqtt>=2.1.0
11
11
  Requires-Dist: pybrotlib>=1.1.5
12
- Requires-Dist: pyobs-core<3,>=2.0.0.dev48
12
+ Requires-Dist: pyobs-core<3,>=2.0.0.dev82
@@ -56,11 +56,10 @@ class BrotBaseTelescope(
56
56
  dome: str = "None",
57
57
  **kwargs: Any,
58
58
  ):
59
- BaseTelescope.__init__(
60
- self,
61
- **kwargs,
59
+ super().__init__(
62
60
  motion_status_interfaces=["ITelescope", "IFocuser"],
63
61
  wait_for_dome=None if dome == "None" else dome,
62
+ **kwargs,
64
63
  )
65
64
 
66
65
  self.mqtt = MQTTTransport(host, port)
@@ -70,7 +69,6 @@ class BrotBaseTelescope(
70
69
  self.focus_offset = 0.0
71
70
  self._roof = roof
72
71
 
73
- FitsNamespaceMixin.__init__(self, **kwargs)
74
72
  self.add_background_task(self._update_task)
75
73
 
76
74
  @property
@@ -339,14 +337,14 @@ class BrotRaDecTelescope(BrotBaseTelescope, IOffsetsRaDec):
339
337
  await self.comm.set_state(IOffsetsRaDec, RaDecOffsetState(ra=dra, dec=ddec))
340
338
 
341
339
  async def get_fits_header_before(
342
- self, namespaces: list[str] | None = None, **kwargs: Any
340
+ self, namespaces: list[str] | None = None, sender: str = "", **kwargs: Any
343
341
  ) -> dict[str, FitsHeaderEntry]:
344
342
  hdr = await BrotBaseTelescope.get_fits_header_before(self)
345
343
  tel = self.brot.telescope._telemetry
346
344
  hdr["TEL-FOCU"] = FitsHeaderEntry(self.brot.focus.position, "Focus position [mm]")
347
345
  hdr["HAOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.HA.OFFSET, "Hour Angle offset")
348
346
  hdr["DECOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.DEC.OFFSET, "Declination offset")
349
- return self._filter_fits_namespace(hdr, namespaces=namespaces, **kwargs)
347
+ return self._filter_fits_namespace(hdr, sender=sender, namespaces=namespaces, **kwargs)
350
348
 
351
349
  async def add_pointing_measurement(self, **kwargs: Any) -> None:
352
350
  telemetry = self.brot.telescope._telemetry
@@ -387,14 +385,14 @@ class BrotAltAzTelescope(BrotBaseTelescope, IOffsetsAltAz, IPointingSeries):
387
385
  await self.comm.set_state(IOffsetsAltAz, AltAzOffsetState(alt=dalt, az=daz))
388
386
 
389
387
  async def get_fits_header_before(
390
- self, namespaces: list[str] | None = None, **kwargs: Any
388
+ self, namespaces: list[str] | None = None, sender: str = "", **kwargs: Any
391
389
  ) -> dict[str, FitsHeaderEntry]:
392
390
  tel = self.brot.telescope._telemetry
393
391
  hdr = await BrotBaseTelescope.get_fits_header_before(self)
394
392
  hdr["TEL-FOCU"] = FitsHeaderEntry(self.brot.focus.position, "Focus position [mm]")
395
393
  hdr["HAOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.HA.OFFSET, "Hour Angle offset")
396
394
  hdr["DECOFF"] = FitsHeaderEntry(tel.POSITION.INSTRUMENTAL.DEC.OFFSET, "Declination offset")
397
- return self._filter_fits_namespace(hdr, namespaces=namespaces, **kwargs)
395
+ return self._filter_fits_namespace(hdr, sender=sender, namespaces=namespaces, **kwargs)
398
396
 
399
397
  async def add_pointing_measurement(self, **kwargs: Any) -> None:
400
398
  telemetry = self.brot.telescope._telemetry
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "pyobs-brot"
3
- version = "2.0.0.dev14"
3
+ version = "2.0.0.dev16"
4
4
  description = "pyobs module for BROTlib telescopes"
5
5
  authors = [{ name = "Tim-Oliver Husser", email = "thusser@uni-goettingen.de" }, { name = "Lukas Melzig", email = "lukas.melzig@stud.uni-goettingen.de" }]
6
6
  requires-python = ">=3.11"
7
7
  license = "MIT"
8
8
  dependencies = [
9
9
  "astropy>=7.0.1,<8",
10
- "pyobs-core>=2.0.0.dev48,<3",
10
+ "pyobs-core>=2.0.0.dev82,<3",
11
11
  "paho-mqtt>=2.1.0",
12
12
  "pybrotlib>=1.1.5",
13
13
  ]
@@ -21,6 +21,26 @@ def test_constructor_defaults() -> None:
21
21
  assert telescope._roof == "None"
22
22
 
23
23
 
24
+ def test_constructor_threads_kwargs_cooperatively() -> None:
25
+ """Regression test for the cooperative-super()-chain fix: BrotBaseTelescope used to call
26
+ BaseTelescope.__init__() then a separate, redundant FitsNamespaceMixin.__init__(self,
27
+ **kwargs) -- BaseTelescope's own cooperative chain already reaches FitsNamespaceMixin (it's
28
+ the last base), so the second call re-threads the same kwargs (location, comm, ...) through
29
+ a chain that's now cooperative all the way to object.__init__(), which raises on any
30
+ leftover. This is exactly the shape deployed in pyobs-monet's telescope configs (host, name,
31
+ fits_headers, temperatures, comm, location, timezone all set)."""
32
+ telescope = BrotRaDecTelescope(
33
+ host="localhost",
34
+ name="telescope",
35
+ fits_headers={"TEL-FOCL": (8400.0, "Focal length")},
36
+ temperatures={"M1": "TEMP_M1"},
37
+ location={"longitude": 20.81, "latitude": -32.37, "elevation": 1798.0},
38
+ timezone="Africa/Johannesburg",
39
+ )
40
+ assert telescope.motion_status().name == "UNKNOWN"
41
+ assert telescope.temperatures == {"M1": "TEMP_M1"}
42
+
43
+
24
44
  def test_constructor_temperatures_and_roof() -> None:
25
45
  telescope = BrotRaDecTelescope(
26
46
  host="localhost",
@@ -1935,7 +1935,7 @@ wheels = [
1935
1935
 
1936
1936
  [[package]]
1937
1937
  name = "pyobs-brot"
1938
- version = "2.0.0.dev14"
1938
+ version = "2.0.0.dev16"
1939
1939
  source = { editable = "." }
1940
1940
  dependencies = [
1941
1941
  { name = "astropy" },
@@ -1959,7 +1959,7 @@ requires-dist = [
1959
1959
  { name = "astropy", specifier = ">=7.0.1,<8" },
1960
1960
  { name = "paho-mqtt", specifier = ">=2.1.0" },
1961
1961
  { name = "pybrotlib", specifier = ">=1.1.5" },
1962
- { name = "pyobs-core", specifier = ">=2.0.0.dev48,<3" },
1962
+ { name = "pyobs-core", specifier = ">=2.0.0.dev82,<3" },
1963
1963
  ]
1964
1964
 
1965
1965
  [package.metadata.requires-dev]
@@ -1974,7 +1974,7 @@ dev = [
1974
1974
 
1975
1975
  [[package]]
1976
1976
  name = "pyobs-core"
1977
- version = "2.0.0.dev72"
1977
+ version = "2.0.0.dev82"
1978
1978
  source = { registry = "https://pypi.org/simple" }
1979
1979
  dependencies = [
1980
1980
  { name = "aiohttp" },
@@ -2006,9 +2006,9 @@ dependencies = [
2006
2006
  { name = "tenacity" },
2007
2007
  { name = "typing-extensions" },
2008
2008
  ]
2009
- sdist = { url = "https://files.pythonhosted.org/packages/d7/25/ac1a0571461eb87655374a38a4a21983db407f7239d60adce009e4ba8438/pyobs_core-2.0.0.dev72.tar.gz", hash = "sha256:b9ac8679bb9a72d1180ba60a97ad08b1878b1bc6b21158754d1f7fc7033231ee", size = 354347, upload-time = "2026-08-10T11:31:59.746Z" }
2009
+ sdist = { url = "https://files.pythonhosted.org/packages/13/b8/e0d2a5fa390e15eebd01c86a75360e47e72823036b9e8793f73961c4e24a/pyobs_core-2.0.0.dev82.tar.gz", hash = "sha256:eb5e6510e0ba113700876db409cdce4b5d57e6df399421fc8cf174ec9e5076a8", size = 362959, upload-time = "2026-08-19T04:27:17.94Z" }
2010
2010
  wheels = [
2011
- { url = "https://files.pythonhosted.org/packages/8e/6a/570856f6149a611d7e4858e980faa1e23c5ddedda22327808f8e3eb5b413/pyobs_core-2.0.0.dev72-py3-none-any.whl", hash = "sha256:321f6b80f2fb8703e3cbf2f62cea2333cb475b1a50f58d8900176644fe6ca6b2", size = 576647, upload-time = "2026-08-10T11:31:57.813Z" },
2011
+ { url = "https://files.pythonhosted.org/packages/81/17/83f22b85cfd9dea2c18396738d12fcd631232b2e8a111700133b037a7673/pyobs_core-2.0.0.dev82-py3-none-any.whl", hash = "sha256:b0cfe7d7a9dff89a8650ff4c01cdd3423f8ca9188aeef1d799d3e61085484bb2", size = 585768, upload-time = "2026-08-19T04:27:16.531Z" },
2012
2012
  ]
2013
2013
 
2014
2014
  [[package]]