arcsecond 3.16.2__tar.gz → 3.17.0__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 (118) hide show
  1. arcsecond-3.17.0/.flake8 +12 -0
  2. {arcsecond-3.16.2 → arcsecond-3.17.0}/.github/workflows/tests.yml +7 -1
  3. {arcsecond-3.16.2 → arcsecond-3.17.0}/PKG-INFO +22 -1
  4. {arcsecond-3.16.2 → arcsecond-3.17.0}/README.md +21 -0
  5. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/api/config.py +35 -4
  6. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cli.py +16 -2
  7. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/__init__.py +14 -0
  8. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/auth.py +2 -1
  9. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/__init__.py +1 -0
  10. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/datafiles/utils.py +4 -1
  11. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/errors.py +1 -1
  12. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/logger.py +0 -3
  13. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/__init__.py +3 -0
  14. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/backups.py +253 -171
  15. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/constants.py +1 -1
  16. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/database.py +131 -107
  17. arcsecond-3.17.0/arcsecond/hosting/docker/__init__.py +33 -0
  18. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/keygen/__init__.py +2 -0
  19. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/local.py +77 -36
  20. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/main.py +1 -9
  21. arcsecond-3.17.0/arcsecond/imagesources/commands.py +1275 -0
  22. arcsecond-3.17.0/arcsecond/imagesources/detection.py +233 -0
  23. arcsecond-3.17.0/arcsecond/imagesources/proxy.py +376 -0
  24. arcsecond-3.17.0/arcsecond/imagesources/registry.py +194 -0
  25. arcsecond-3.17.0/arcsecond/imagesources/runtime.py +86 -0
  26. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/imagesources/sources/base.py +16 -0
  27. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/imagesources/sources/filewatch.py +13 -14
  28. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/imagesources/sources/network.py +5 -2
  29. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/imagesources/sources/opencv.py +30 -13
  30. arcsecond-3.17.0/arcsecond/imagesources/store.py +409 -0
  31. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/targets.py +108 -59
  32. {arcsecond-3.16.2 → arcsecond-3.17.0}/pyproject.toml +1 -1
  33. arcsecond-3.17.0/tests/api/test_config.py +195 -0
  34. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/datafiles/test_uploader_init.py +0 -2
  35. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/datafiles/test_uploader_prepare.py +1 -1
  36. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/conftest.py +22 -0
  37. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/test_alpaca_probe.py +0 -1
  38. arcsecond-3.17.0/tests/test_hosting_backups_restore.py +161 -0
  39. arcsecond-3.17.0/tests/test_imagesources_commands.py +643 -0
  40. arcsecond-3.17.0/tests/test_imagesources_detection.py +210 -0
  41. arcsecond-3.16.2/tests/test_imagesources_netcam.py → arcsecond-3.17.0/tests/test_imagesources_network.py +59 -93
  42. arcsecond-3.17.0/tests/test_imagesources_proxy.py +327 -0
  43. arcsecond-3.17.0/tests/test_imagesources_store.py +298 -0
  44. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/test_imagesources_webcam.py +20 -4
  45. {arcsecond-3.16.2 → arcsecond-3.17.0}/uv.lock +1 -1
  46. arcsecond-3.16.2/arcsecond/hosting/docker/__init__.py +0 -16
  47. arcsecond-3.16.2/arcsecond/imagesources/commands.py +0 -527
  48. arcsecond-3.16.2/arcsecond/imagesources/proxy.py +0 -260
  49. arcsecond-3.16.2/arcsecond/imagesources/registry.py +0 -250
  50. arcsecond-3.16.2/arcsecond/imagesources/store.py +0 -152
  51. arcsecond-3.16.2/tests/api/test_config.py +0 -99
  52. arcsecond-3.16.2/tests/test_imagesources_store.py +0 -327
  53. {arcsecond-3.16.2 → arcsecond-3.17.0}/.docker/Dockerfile_postgres +0 -0
  54. {arcsecond-3.16.2 → arcsecond-3.17.0}/.docker/Dockerfile_redis +0 -0
  55. {arcsecond-3.16.2 → arcsecond-3.17.0}/.github/dependabot.yml +0 -0
  56. {arcsecond-3.16.2 → arcsecond-3.17.0}/.github/workflows/pythonpublish.yml +0 -0
  57. {arcsecond-3.16.2 → arcsecond-3.17.0}/.gitignore +0 -0
  58. {arcsecond-3.16.2 → arcsecond-3.17.0}/LICENSE +0 -0
  59. {arcsecond-3.16.2 → arcsecond-3.17.0}/Makefile +0 -0
  60. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/__init__.py +0 -0
  61. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/__version__.py +0 -0
  62. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/alpaca/__init__.py +0 -0
  63. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/alpaca/commands.py +0 -0
  64. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/alpaca/dome_probe.py +0 -0
  65. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/api/__init__.py +0 -0
  66. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/api/constants.py +0 -0
  67. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/api/endpoint.py +0 -0
  68. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/api/main.py +0 -0
  69. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/api/resources.py +0 -0
  70. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/resources.py +0 -0
  71. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/constants.py +0 -0
  72. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/context.py +0 -0
  73. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/datafiles/__init__.py +0 -0
  74. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/datafiles/context.py +0 -0
  75. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/datafiles/errors.py +0 -0
  76. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/datafiles/uploader.py +0 -0
  77. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/uploader.py +0 -0
  78. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/utils.py +0 -0
  79. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploader/walker.py +0 -0
  80. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/cloud/uploads.py +0 -0
  81. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/errors.py +0 -0
  82. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/checks.py +0 -0
  83. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/docker/constants.py +0 -0
  84. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/docker/containers.py +0 -0
  85. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/docker/docker-compose.yml +0 -0
  86. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/docker/images.py +0 -0
  87. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/docker/utils.py +0 -0
  88. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/keygen/client.py +0 -0
  89. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/keygen/utils.py +0 -0
  90. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/postgres/init-db.sh +0 -0
  91. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/setup.py +0 -0
  92. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/utils.py +0 -0
  93. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/hosting/validation.py +0 -0
  94. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/imagesources/__init__.py +0 -0
  95. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/imagesources/sources/__init__.py +0 -0
  96. {arcsecond-3.16.2 → arcsecond-3.17.0}/arcsecond/options.py +0 -0
  97. {arcsecond-3.16.2 → arcsecond-3.17.0}/examples/example_upload_files.py +0 -0
  98. {arcsecond-3.16.2 → arcsecond-3.17.0}/requirements.txt +0 -0
  99. {arcsecond-3.16.2 → arcsecond-3.17.0}/setup.cfg +0 -0
  100. {arcsecond-3.16.2 → arcsecond-3.17.0}/setup.py +0 -0
  101. {arcsecond-3.16.2 → arcsecond-3.17.0}/sonar-project.properties +0 -0
  102. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/__init__.py +0 -0
  103. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/api/__init__.py +0 -0
  104. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/api/test_api.py +0 -0
  105. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/api/test_api_endpoint.py +0 -0
  106. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/api/test_targets.py +0 -0
  107. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/__init__.py +0 -0
  108. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/__init__.py +0 -0
  109. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/datafiles/__init__.py +0 -0
  110. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/datafiles/test_uploader_errors.py +0 -0
  111. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/datafiles/test_uploader_full_process.py +0 -0
  112. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/cloud/uploader/datafiles/test_uploader_upload.py +0 -0
  113. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/fixtures/file1.fits +0 -0
  114. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/test_cli.py +0 -0
  115. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/test_hosting_database.py +0 -0
  116. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/test_hosting_local.py +0 -0
  117. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/test_targets_planning.py +0 -0
  118. {arcsecond-3.16.2 → arcsecond-3.17.0}/tests/utils.py +0 -0
@@ -0,0 +1,12 @@
1
+ [flake8]
2
+ # The same limits the lint job and the pre-commit hook pass on the command
3
+ # line, kept here so that a bare `flake8` agrees with them.
4
+ max-line-length = 127
5
+ max-complexity = 10
6
+
7
+ # E203 (whitespace before ':') contradicts black, which the same lint job
8
+ # enforces: black writes `lines[begin : end + 1]` and pycodestyle objects to
9
+ # the space. Black is the formatter of record here, so this one is ignored
10
+ # rather than fought — fixing it in code would only be undone on the next
11
+ # `black` run.
12
+ extend-ignore = E203
@@ -72,9 +72,15 @@ jobs:
72
72
  - name: Install dev dependencies
73
73
  run: uv sync --group dev
74
74
 
75
- - name: Lint with flake8
75
+ - name: Lint with flake8 (errors)
76
76
  run: uv run flake8 arcsecond tests --count --select=E9,F63,F7,F82 --show-source --statistics
77
77
 
78
+ # Style and complexity, on the limits in .flake8. Blocking rather than
79
+ # advisory: the tree is clean, and the point of getting it there was to
80
+ # keep it there.
81
+ - name: Lint with flake8 (style and complexity)
82
+ run: uv run flake8 arcsecond tests --count --statistics
83
+
78
84
  - name: Check formatting with black
79
85
  run: uv run black --check arcsecond tests
80
86
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: arcsecond
3
- Version: 3.16.2
3
+ Version: 3.17.0
4
4
  Summary: CLI for arcsecond.io
5
5
  Project-URL: Homepage, https://github.com/arcsecond-io/cli
6
6
  Project-URL: Issues, https://github.com/arcsecond-io/cli/issues
@@ -62,6 +62,22 @@ public and private ones.
62
62
 
63
63
  [Read the docs](https://docs.arcsecond.io/cli)
64
64
 
65
+ ## Configuration
66
+
67
+ Credentials and settings live in `~/.config/arcsecond/`, alongside the list of
68
+ registered cameras and the live-image proxy's runtime files.
69
+
70
+ Set `ARCSECOND_CONFIG_DIR` to put them somewhere else:
71
+
72
+ ```bash
73
+ $ ARCSECOND_CONFIG_DIR=~/.config/arcsecond-observatory arcsecond login
74
+ ```
75
+
76
+ Useful for keeping a personal account and an observatory's apart, and for
77
+ containers or CI jobs that should not touch a home directory. Child processes
78
+ the CLI starts — such as the background proxy from `arcsecond proxy start` —
79
+ inherit it.
80
+
65
81
  # Development
66
82
 
67
83
  The project uses [uv](https://docs.astral.sh/uv/) for environment and
@@ -78,6 +94,11 @@ $ uv run pytest
78
94
  and the `dev` dependency group (pytest, black, flake8, isort). Prefix
79
95
  commands with `uv run` or activate the venv with `source .venv/bin/activate`.
80
96
 
97
+ The test suite writes nothing to your own configuration: an autouse fixture in
98
+ `tests/conftest.py` points `ARCSECOND_CONFIG_DIR` at a temporary directory for
99
+ the whole run. Several tests save real-looking credentials, so if you add one
100
+ that touches `ArcsecondConfig`, leave that fixture in place.
101
+
81
102
 
82
103
  ## License
83
104
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Farcsecond-io%2Fcli.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Farcsecond-io%2Fcli?ref=badge_large)
@@ -9,6 +9,22 @@ public and private ones.
9
9
 
10
10
  [Read the docs](https://docs.arcsecond.io/cli)
11
11
 
12
+ ## Configuration
13
+
14
+ Credentials and settings live in `~/.config/arcsecond/`, alongside the list of
15
+ registered cameras and the live-image proxy's runtime files.
16
+
17
+ Set `ARCSECOND_CONFIG_DIR` to put them somewhere else:
18
+
19
+ ```bash
20
+ $ ARCSECOND_CONFIG_DIR=~/.config/arcsecond-observatory arcsecond login
21
+ ```
22
+
23
+ Useful for keeping a personal account and an observatory's apart, and for
24
+ containers or CI jobs that should not touch a home directory. Child processes
25
+ the CLI starts — such as the background proxy from `arcsecond proxy start` —
26
+ inherit it.
27
+
12
28
  # Development
13
29
 
14
30
  The project uses [uv](https://docs.astral.sh/uv/) for environment and
@@ -25,6 +41,11 @@ $ uv run pytest
25
41
  and the `dev` dependency group (pytest, black, flake8, isort). Prefix
26
42
  commands with `uv run` or activate the venv with `source .venv/bin/activate`.
27
43
 
44
+ The test suite writes nothing to your own configuration: an autouse fixture in
45
+ `tests/conftest.py` points `ARCSECOND_CONFIG_DIR` at a temporary directory for
46
+ the whole run. Several tests save real-looking credentials, so if you add one
47
+ that touches `ArcsecondConfig`, leave that fixture in place.
48
+
28
49
 
29
50
  ## License
30
51
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Farcsecond-io%2Fcli.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Farcsecond-io%2Fcli?ref=badge_large)
@@ -1,3 +1,4 @@
1
+ import os
1
2
  import shutil
2
3
  from configparser import ConfigParser
3
4
  from pathlib import Path
@@ -8,6 +9,19 @@ from arcsecond.options import State
8
9
 
9
10
  from .constants import ARCSECOND_API_URL_PROD
10
11
 
12
+ # Where the configuration lives, when it is not to live in the usual place.
13
+ #
14
+ # Set this to keep several sets of credentials apart — a personal account and
15
+ # an observatory's, say — or to point a container or a CI job at a directory of
16
+ # its own. It is also what the test suite uses: the tests write real-looking
17
+ # credentials, and without somewhere else to put them they would land in the
18
+ # developer's own config file and stay there.
19
+ #
20
+ # An environment variable rather than something passed in, because the CLI
21
+ # starts child processes of its own (`arcsecond proxy start`), and those have
22
+ # to end up in the same place as the command that started them.
23
+ CONFIG_DIR_ENV_VAR = "ARCSECOND_CONFIG_DIR"
24
+
11
25
 
12
26
  class ArcsecondConfig(object):
13
27
  def __init__(self, **kwargs):
@@ -31,16 +45,33 @@ class ArcsecondConfig(object):
31
45
  return (Path.home() / ".arcsecond.ini").expanduser()
32
46
 
33
47
  @classmethod
34
- def dir_path(cls):
35
- _config_root_path = Path.home() / ".config"
36
- return _config_root_path / "arcsecond"
48
+ def is_dir_path_overridden(cls) -> bool:
49
+ return bool(os.environ.get(CONFIG_DIR_ENV_VAR, "").strip())
50
+
51
+ @classmethod
52
+ def dir_path(cls) -> Path:
53
+ """The directory holding config.ini and everything beside it.
54
+
55
+ ``$ARCSECOND_CONFIG_DIR`` wins when it is set; otherwise the usual
56
+ ``~/.config/arcsecond``.
57
+ """
58
+ override = os.environ.get(CONFIG_DIR_ENV_VAR, "").strip()
59
+ if override:
60
+ return Path(override).expanduser()
61
+ return Path.home() / ".config" / "arcsecond"
37
62
 
38
63
  @classmethod
39
64
  def file_path(cls) -> Path:
40
65
  _config_dir_path = ArcsecondConfig.dir_path()
41
66
  _config_file_path = _config_dir_path / "config.ini"
67
+
68
+ # The one-time move of the pre-0.9 ~/.arcsecond.ini happens only for
69
+ # the real config directory. Doing it for an overridden one would take
70
+ # the file out of the operator's home and drop it somewhere temporary —
71
+ # which, during a test run, would destroy it.
42
72
  if (
43
- ArcsecondConfig.__old_config_file_path().exists()
73
+ not ArcsecondConfig.is_dir_path_overridden()
74
+ and ArcsecondConfig.__old_config_file_path().exists()
44
75
  and not _config_file_path.exists()
45
76
  ):
46
77
  _config_dir_path.mkdir(parents=True, exist_ok=True)
@@ -64,11 +64,25 @@ main.add_command(backups)
64
64
  # Manage the Arcsecond.local database (e.g. `arcsecond db set-password`).
65
65
  main.add_command(db)
66
66
 
67
- # Native live-image proxy — exposes USB webcams, all-sky cameras and network
68
- # cameras to Arcsecond.local Docker containers via host.docker.internal.
67
+ # Cameras, and the native live-image proxy that exposes them to
68
+ # Arcsecond.local Docker containers via host.docker.internal. `webcam` covers
69
+ # every camera the machine can reach, whether over USB or over the network;
70
+ # `allsky` covers all-sky cameras writing JPEGs to disk; `proxy` runs the one
71
+ # server that serves whatever those two registered.
69
72
  main.add_command(imagesources.webcam)
70
73
  main.add_command(imagesources.allsky)
74
+ main.add_command(imagesources.proxy)
75
+
76
+ # Removed: a network camera is a webcam. Kept only to say so — see commands.py.
71
77
  main.add_command(imagesources.netcam)
72
78
 
73
79
  # Local ASCOM Alpaca diagnostics (e.g. `arcsecond alpaca probe dome ...`).
74
80
  main.add_command(alpaca_group)
81
+
82
+
83
+ # `arcsecond proxy start` launches its detached proxy as
84
+ # `python -m arcsecond.cli proxy start --foreground`, which needs this. Going
85
+ # through the interpreter rather than the console script means the background
86
+ # proxy runs on the very same Python as the command that started it.
87
+ if __name__ == "__main__":
88
+ main()
@@ -8,3 +8,17 @@ from .uploader.constants import Status, Substatus
8
8
  from .uploads import (
9
9
  upload_data,
10
10
  )
11
+
12
+ # Re-exported: this is the package's public surface.
13
+ __all__ = [
14
+ "api",
15
+ "login",
16
+ "me",
17
+ "datasets",
18
+ "telescopes",
19
+ "DatasetFileUploader",
20
+ "DatasetUploadContext",
21
+ "Status",
22
+ "Substatus",
23
+ "upload_data",
24
+ ]
@@ -22,7 +22,8 @@ pass_state = click.make_pass_decorator(State, ensure=True)
22
22
  required=True,
23
23
  type=click.Choice(["access", "upload"], case_sensitive=False),
24
24
  prompt=True,
25
- help="Your access key (a.k.a. API key). Visit your settings page to copy and paste it here. One of Access or Upload key must be provided.",
25
+ help="Your access key (a.k.a. API key). Visit your settings page to copy "
26
+ "and paste it here. One of Access or Upload key must be provided.",
26
27
  )
27
28
  @click.option(
28
29
  "--key",
@@ -5,4 +5,5 @@ from .datafiles.utils import display_upload_datafiles_command_summary
5
5
  __all__ = [
6
6
  "DatasetUploadContext",
7
7
  "DatasetFileUploader",
8
+ "display_upload_datafiles_command_summary",
8
9
  ]
@@ -61,7 +61,10 @@ def _display_custom_tags_info(context: DatasetUploadContext):
61
61
  def _display_telescope_info(context: DatasetUploadContext):
62
62
  """Displays telescope-related information."""
63
63
  if context.telescope:
64
- msg = f" • Dataset will be attached to the telescope named '{context.telescope.get('name')}' ({context.telescope.get('uuid')})."
64
+ msg = (
65
+ f" • Dataset will be attached to the telescope named "
66
+ f"'{context.telescope.get('name')}' ({context.telescope.get('uuid')})."
67
+ )
65
68
  click.echo(msg)
66
69
  elif not context.dataset_uuid and context.dataset_name:
67
70
  msg = " • Dataset will not be attached to any telescope. It can be changed later in the web."
@@ -8,7 +8,7 @@ class UploadRemoteFileError(ArcsecondError):
8
8
  class UploadRemoteFileInvalidatedContextError(ArcsecondError):
9
9
  def __init__(self, msg=""):
10
10
  super().__init__(
11
- f"The UploadContext must be validated first. Call `context.validate()`."
11
+ "The UploadContext must be validated first. Call `context.validate()`."
12
12
  )
13
13
 
14
14
 
@@ -1,15 +1,12 @@
1
1
  import os
2
- from datetime import datetime
3
2
  from logging import (
4
3
  DEBUG,
5
4
  INFO,
6
- FileHandler,
7
5
  Formatter,
8
6
  Logger,
9
7
  StreamHandler,
10
8
  getLogger,
11
9
  )
12
- from pathlib import Path
13
10
 
14
11
 
15
12
  def get_logger(debug=False) -> Logger:
@@ -2,3 +2,6 @@
2
2
  from .backups import backups
3
3
  from .database import db
4
4
  from .local import setup
5
+
6
+ # Re-exported: the command groups `arcsecond.cli` mounts.
7
+ __all__ = ["backups", "db", "setup"]