pyobs-core 2.0.0.dev63__py3-none-any.whl → 2.0.0.dev65__py3-none-any.whl

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.
pyobs/application.py CHANGED
@@ -36,7 +36,7 @@ def _disable_iers_auto_download() -> None:
36
36
  iers_conf.auto_max_age = None
37
37
  iers_conf.iers_degraded_accuracy = "warn"
38
38
 
39
- log.warning(
39
+ log.info(
40
40
  "IERS auto-download disabled — relying on the bundled astropy-iers-data snapshot. "
41
41
  "Earth orientation/UT1-UTC accuracy may degrade for predictions far from the "
42
42
  "snapshot date."
@@ -21,7 +21,7 @@ class ObservationArchiveEvolution:
21
21
  self._obs_for_night: dict[datetime.date, ObservationList] = {}
22
22
  self._observer = observer
23
23
 
24
- async def evolve(self, scheduled_task: Observation) -> None:
24
+ async def evolve(self, scheduled_task: Observation, night: datetime.date) -> None:
25
25
  from pyobs.robotic.observation import Observation, ObservationState
26
26
 
27
27
  obs = Observation(
@@ -35,7 +35,14 @@ class ObservationArchiveEvolution:
35
35
  await self.observations_for_task(scheduled_task.task)
36
36
  self._obs_for_task[scheduled_task.task.id].append(obs)
37
37
 
38
- night = Time.now().night_obs(self._observer)
38
+ # `night` is the caller's responsibility (DataProvider.night(scheduled_task.start), see
39
+ # OnDemandScheduler.schedule()) rather than computed here from Time.now(): a schedule() run
40
+ # covers up to `schedule_range` (~24h) ahead, so "the night this task happens" can differ
41
+ # from "the night it is right now" when evolve() runs -- using Time.now() filed every task
42
+ # under whichever night was current at evolve()-time, not the night it was actually
43
+ # scheduled into, which a later FollowMerit/PerNightMerit lookup (keyed by the task's own
44
+ # time) would then miss. Also avoids redoing an uncached astropy sunset computation here
45
+ # when DataProvider.night() already has a cached one for this exact time.
39
46
  await self.observations_for_night(night)
40
47
  self._obs_for_night[night].append(obs)
41
48
 
@@ -70,8 +70,10 @@ class OnDemandScheduler(TaskScheduler):
70
70
 
71
71
  # schedule from start to end
72
72
  async for task in self.schedule_in_interval(tasks, projects_dict, start, end, data):
73
- # evolve archive
74
- await data.archive.evolve(task)
73
+ # evolve archive -- night is keyed by the task's own scheduled time, not "now", since
74
+ # a run can schedule up to schedule_range ahead into a different night (see
75
+ # ObservationArchiveEvolution.evolve()'s docstring/comment for why)
76
+ await data.archive.evolve(task, data.night(task.start))
75
77
 
76
78
  # yield to caller
77
79
  yield task
pyobs/vfs/archivefile.py CHANGED
@@ -53,9 +53,7 @@ class ArchiveFile(HttpFile):
53
53
 
54
54
  # send data and return image ID
55
55
  timeout = aiohttp.ClientTimeout(total=30)
56
- async with session.post(
57
- url, auth=self._auth, data=data, timeout=timeout, headers=self._headers
58
- ) as response:
56
+ async with session.post(url, data=data, timeout=timeout, headers=self._headers) as response:
59
57
  # success, if status code is 200
60
58
  if response.status != 200:
61
59
  raise ValueError(f"Cannot write file, received status_code {response.status}.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobs-core
3
- Version: 2.0.0.dev63
3
+ Version: 2.0.0.dev65
4
4
  Summary: robotic telescope software
5
5
  Author-email: Tim-Oliver Husser <thusser@uni-goettingen.de>
6
6
  License-Expression: MIT
@@ -1,5 +1,5 @@
1
1
  pyobs/__init__.py,sha256=O4I43dWATvTIBYkvlJRAZZFoyozZHCWJM5O3RDk99sg,80
2
- pyobs/application.py,sha256=JBG0lFgltCRBTB_cZRrBIVde1fxuoYLt1O5KHt7vtcE,19751
2
+ pyobs/application.py,sha256=3bqFeWhZA6djMfYL1zTWiQImdq7qRkBsVauMBR0qA2k,19748
3
3
  pyobs/background_task.py,sha256=bwGEDwQFfPMEH2DIrMEU1pA10uscicTPZwGuogCfLr8,2437
4
4
  pyobs/object.py,sha256=hdUm1ZpykC_nwzLUk_mn037LdOquzjgjIKjVxWmcDtM,20600
5
5
  pyobs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -274,8 +274,8 @@ pyobs/robotic/scheduler/__init__.py,sha256=1doPZQUxGd-E9y8Wwo3YSw3LqjrBYzd5W29UA
274
274
  pyobs/robotic/scheduler/_executor.py,sha256=M-0Km9vy_Hnr37e7JSFISapQnsXH7r2ZKO08QU0iM28,1164
275
275
  pyobs/robotic/scheduler/astroplanscheduler.py,sha256=mDM3wsG105GkcUYKufhm8Y9RP5H4ItqveouxoRw2iAY,6792
276
276
  pyobs/robotic/scheduler/dataprovider.py,sha256=h59QaGXC7FwwgB7ArylFLTTYv3Y-BKctTeZZ2Ner7E0,2543
277
- pyobs/robotic/scheduler/observationarchiveevolution.py,sha256=DVhSoed-YOdLKauq0hIH--rwK9Zn1bQzEe_P5KYksQo,2900
278
- pyobs/robotic/scheduler/ondemandscheduler.py,sha256=55tl7jejmWD_3CDyS5A9ox49snSVNywKCLRA2WKnqHU,10948
277
+ pyobs/robotic/scheduler/observationarchiveevolution.py,sha256=UQ-P8sdYr4Y-9Wa-3LBO1wcPIzkkCIRYYjIaFpL2Jlk,3631
278
+ pyobs/robotic/scheduler/ondemandscheduler.py,sha256=FbLAgFt4PtzUfCDXuIZ4wL8ZwSKXi2ue8W3aM2gDydw,11209
279
279
  pyobs/robotic/scheduler/taskscheduler.py,sha256=D9Gj8ol1BlI-wblyho0WRN4_bR4-ZMl2VO-t38SJN0A,918
280
280
  pyobs/robotic/scheduler/constraints/__init__.py,sha256=RED_jn3FNLeswZk_ivGUQEXfCy1MO4epO-0mj2u8mGs,498
281
281
  pyobs/robotic/scheduler/constraints/airmassconstraint.py,sha256=p2uJ-zQi5RsmqFBLxdjEZWs6fu5DJxvYuxz3z-uu0EE,1318
@@ -426,7 +426,7 @@ pyobs/utils/publisher/publisher.py,sha256=29lXmJ5zATzEIwHwVHBhyYhrVp-mh_JvRzdnoT
426
426
  pyobs/utils/threads/__init__.py,sha256=06FEhD6NJy8Ktm4HeXOSq68F-zChQMcV1qFrnQWntQc,70
427
427
  pyobs/utils/threads/lockwithabort.py,sha256=tw6yP6gB7_dLVSAFcq2Y1L-NG-lPQtTijbwGcuSpw64,1444
428
428
  pyobs/vfs/__init__.py,sha256=8tf4iRPdHe2QUWEahOT-UuhbjfNGsw88UQSRisJizMY,3985
429
- pyobs/vfs/archivefile.py,sha256=lJ0VuJsgTg0wjtvVXAwlmBGpl20bvNNIdOFnXg6z9KY,2509
429
+ pyobs/vfs/archivefile.py,sha256=qn1RHN61zKVFe1-f26-QCXOS_M4h3b8kuaPvzPzDk44,2462
430
430
  pyobs/vfs/bufferedfile.py,sha256=87X5fwmiqgmbASje1ogo2Z2uwYie3vIoAIq_s21D_nQ,1388
431
431
  pyobs/vfs/file.py,sha256=OQLuP8I5KtNUixPTlntXx-qHZSMtBm_dbZisAyws2tI,2014
432
432
  pyobs/vfs/httpfile.py,sha256=lO7BtWSgm9BQsBxxq7ZSQRVU2bxvEizaFZwWwvAjo64,5598
@@ -440,8 +440,8 @@ pyobs/vfs/vfs.py,sha256=3cXpRGbWh6m_lm0R7uZUNJcjppBaXSpQVMTRgHnv6Tk,11025
440
440
  pyobs/vfs/filelists/__init__.py,sha256=NaTGFjLGh043j_F7kWEx_cXaII7t3CbYguRk2g5hEqw,111
441
441
  pyobs/vfs/filelists/filelist.py,sha256=kCco_5G2gLH-nxWik-wcs6lGuc_-3LeeyR9L4_srf30,201
442
442
  pyobs/vfs/filelists/testing.py,sha256=M8f2BULdjRCc7JFOKhAH7Kwre_uVQC0xLcv9xGTfNFw,425
443
- pyobs_core-2.0.0.dev63.dist-info/METADATA,sha256=bKIl6Y09z2UvZBMpyOQNeGO_Ritl9k7UjQ8iw5EG4FE,1990
444
- pyobs_core-2.0.0.dev63.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
445
- pyobs_core-2.0.0.dev63.dist-info/entry_points.txt,sha256=0ceIn3dTDwWdGdJ5VdTvYim7vKkdTe6aqqpoaG065UY,109
446
- pyobs_core-2.0.0.dev63.dist-info/licenses/LICENSE,sha256=gC8djBliCENDmuRvzCoejpWbsn8eqKx61Hc8bmDZ2LI,1099
447
- pyobs_core-2.0.0.dev63.dist-info/RECORD,,
443
+ pyobs_core-2.0.0.dev65.dist-info/METADATA,sha256=9pqbKYoCSNFkDSeCeHicOcd3wURQZek7p73AhFYOpEo,1990
444
+ pyobs_core-2.0.0.dev65.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
445
+ pyobs_core-2.0.0.dev65.dist-info/entry_points.txt,sha256=0ceIn3dTDwWdGdJ5VdTvYim7vKkdTe6aqqpoaG065UY,109
446
+ pyobs_core-2.0.0.dev65.dist-info/licenses/LICENSE,sha256=gC8djBliCENDmuRvzCoejpWbsn8eqKx61Hc8bmDZ2LI,1099
447
+ pyobs_core-2.0.0.dev65.dist-info/RECORD,,