focale 0.2.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.
- focale-0.2.0/.claude/launch.json +11 -0
- focale-0.2.0/.github/workflows/ci.yml +30 -0
- focale-0.2.0/.github/workflows/publish.yml +32 -0
- focale-0.2.0/.github/workflows/windows-installer.yml +87 -0
- focale-0.2.0/.gitignore +207 -0
- focale-0.2.0/LICENSE +21 -0
- focale-0.2.0/PKG-INFO +169 -0
- focale-0.2.0/README.md +115 -0
- focale-0.2.0/packaging/windows/focale.iss +68 -0
- focale-0.2.0/pyproject.toml +56 -0
- focale-0.2.0/scripts/build_windows.ps1 +21 -0
- focale-0.2.0/src/focale/__init__.py +3 -0
- focale-0.2.0/src/focale/__main__.py +5 -0
- focale-0.2.0/src/focale/agent_auth.py +93 -0
- focale-0.2.0/src/focale/alpaca.py +137 -0
- focale-0.2.0/src/focale/arcsecond_client.py +343 -0
- focale-0.2.0/src/focale/cli.py +847 -0
- focale-0.2.0/src/focale/exceptions.py +18 -0
- focale-0.2.0/src/focale/hub.py +160 -0
- focale-0.2.0/src/focale/platesolver.py +160 -0
- focale-0.2.0/src/focale/state.py +173 -0
- focale-0.2.0/tests/test_agent_auth.py +26 -0
- focale-0.2.0/tests/test_alpaca.py +19 -0
- focale-0.2.0/tests/test_state.py +83 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install package
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
python -m pip install -e .[dev]
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: pytest -q
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: pypi
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Build distributions
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip build
|
|
27
|
+
python -m build
|
|
28
|
+
|
|
29
|
+
- name: Publish to PyPI (OIDC)
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
31
|
+
with:
|
|
32
|
+
packages-dir: dist
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Windows Installer
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
ref:
|
|
10
|
+
description: "Git ref to build (for example refs/tags/v0.2.0)"
|
|
11
|
+
required: false
|
|
12
|
+
default: ""
|
|
13
|
+
version:
|
|
14
|
+
description: "Version string to publish in the installer and release asset"
|
|
15
|
+
required: false
|
|
16
|
+
default: ""
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build-installer:
|
|
20
|
+
runs-on: windows-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
ref: ${{ inputs.ref || github.ref }}
|
|
28
|
+
|
|
29
|
+
- uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
|
|
33
|
+
- name: Derive version
|
|
34
|
+
id: version
|
|
35
|
+
shell: pwsh
|
|
36
|
+
run: |
|
|
37
|
+
$version = "${{ inputs.version }}"
|
|
38
|
+
if ([string]::IsNullOrWhiteSpace($version)) {
|
|
39
|
+
$version = "${{ github.ref_name }}"
|
|
40
|
+
}
|
|
41
|
+
if ($version.StartsWith("refs/tags/")) { $version = $version.Substring(10) }
|
|
42
|
+
if ($version.StartsWith("v")) { $version = $version.Substring(1) }
|
|
43
|
+
if ([string]::IsNullOrWhiteSpace($version)) { $version = "0.2.0-dev" }
|
|
44
|
+
"value=$version" >> $env:GITHUB_OUTPUT
|
|
45
|
+
|
|
46
|
+
- name: Install build dependencies
|
|
47
|
+
shell: pwsh
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
python -m pip install .[dev]
|
|
51
|
+
|
|
52
|
+
- name: Build executable
|
|
53
|
+
shell: pwsh
|
|
54
|
+
run: |
|
|
55
|
+
pyinstaller `
|
|
56
|
+
--noconfirm `
|
|
57
|
+
--clean `
|
|
58
|
+
--onedir `
|
|
59
|
+
--console `
|
|
60
|
+
--name focale `
|
|
61
|
+
--paths src `
|
|
62
|
+
--collect-submodules arcsecond `
|
|
63
|
+
--collect-submodules focale `
|
|
64
|
+
src/focale/__main__.py
|
|
65
|
+
|
|
66
|
+
- name: Install Inno Setup
|
|
67
|
+
shell: pwsh
|
|
68
|
+
run: choco install innosetup --no-progress -y
|
|
69
|
+
|
|
70
|
+
- name: Build installer
|
|
71
|
+
shell: pwsh
|
|
72
|
+
run: |
|
|
73
|
+
iscc /DMyAppVersion=${{ steps.version.outputs.value }} packaging/windows/focale.iss
|
|
74
|
+
|
|
75
|
+
- name: Upload installer
|
|
76
|
+
uses: actions/upload-artifact@v4
|
|
77
|
+
with:
|
|
78
|
+
name: focale-windows-installer-${{ steps.version.outputs.value }}
|
|
79
|
+
path: dist/windows/*.exe
|
|
80
|
+
|
|
81
|
+
- name: Publish installer to GitHub Release
|
|
82
|
+
if: startsWith(github.ref, 'refs/tags/') || inputs.version != ''
|
|
83
|
+
uses: softprops/action-gh-release@v2
|
|
84
|
+
with:
|
|
85
|
+
tag_name: v${{ steps.version.outputs.value }}
|
|
86
|
+
files: dist/windows/*.exe
|
|
87
|
+
generate_release_notes: true
|
focale-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
focale-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arcsecond
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
focale-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: focale
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Arcsecond desktop and Hub bootstrap client
|
|
5
|
+
Project-URL: Homepage, https://github.com/arcsecond-io/focale
|
|
6
|
+
Project-URL: Issues, https://github.com/arcsecond-io/focale/issues
|
|
7
|
+
Author-email: Cedric Foellmi <cedric@arcsecond.io>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Arcsecond
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Classifier: Development Status :: 3 - Alpha
|
|
31
|
+
Classifier: Environment :: Console
|
|
32
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
35
|
+
Classifier: Operating System :: POSIX
|
|
36
|
+
Classifier: Programming Language :: Python :: 3
|
|
37
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
41
|
+
Classifier: Topic :: Internet
|
|
42
|
+
Requires-Python: >=3.12
|
|
43
|
+
Requires-Dist: arcsecond-service-platesolver-astrometry>=0.1.0
|
|
44
|
+
Requires-Dist: arcsecond>=3.7.3
|
|
45
|
+
Requires-Dist: click>=8.1
|
|
46
|
+
Requires-Dist: cryptography>=42
|
|
47
|
+
Requires-Dist: httpx>=0.27
|
|
48
|
+
Requires-Dist: websockets<16,>=12
|
|
49
|
+
Provides-Extra: dev
|
|
50
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
51
|
+
Requires-Dist: pyinstaller>=6.0; extra == 'dev'
|
|
52
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# Focale
|
|
56
|
+
|
|
57
|
+
Focale is a thin desktop/CLI bootstrap for Arcsecond users that:
|
|
58
|
+
|
|
59
|
+
- logs in with the user's Arcsecond account
|
|
60
|
+
- creates and stores a local Hub agent identity
|
|
61
|
+
- enrolls that identity with Arcsecond when needed
|
|
62
|
+
- mints a short-lived Hub JWT
|
|
63
|
+
- connects to the Arcsecond Hub using the signed Ed25519 challenge flow
|
|
64
|
+
|
|
65
|
+
The package depends on the published [`arcsecond`](https://pypi.org/project/arcsecond/) CLI/library and reuses its account configuration instead of creating a second login system.
|
|
66
|
+
|
|
67
|
+
By default, Focale uses Arcsecond password login to obtain a short-lived bearer JWT plus a refresh token. That avoids storing a long-lived Access Key in the normal path. Access Key login is still available as a fallback.
|
|
68
|
+
|
|
69
|
+
## User install
|
|
70
|
+
|
|
71
|
+
### Python / terminal
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install focale
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
focale login
|
|
81
|
+
focale context list
|
|
82
|
+
focale context use personal
|
|
83
|
+
focale connect --hub-url wss://hub.arcsecond.io/ws/agent
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Windows installer
|
|
87
|
+
|
|
88
|
+
This repository includes a bootstrap for building a Windows installer from CI. The installer packages the `focale` executable and can optionally add it to `PATH`.
|
|
89
|
+
|
|
90
|
+
See:
|
|
91
|
+
|
|
92
|
+
- [`.github/workflows/windows-installer.yml`](.github/workflows/windows-installer.yml)
|
|
93
|
+
- [`packaging/windows/focale.iss`](packaging/windows/focale.iss)
|
|
94
|
+
- [`scripts/build_windows.ps1`](scripts/build_windows.ps1)
|
|
95
|
+
|
|
96
|
+
## Commands
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
focale login
|
|
100
|
+
focale login --auth-mode access-key
|
|
101
|
+
focale status
|
|
102
|
+
focale context show
|
|
103
|
+
focale context list
|
|
104
|
+
focale context use personal
|
|
105
|
+
focale context use my-observatory
|
|
106
|
+
focale doctor --hub-url wss://hub.arcsecond.io/ws/agent
|
|
107
|
+
focale doctor --hub-url wss://hub.arcsecond.io/ws/agent --json
|
|
108
|
+
focale connect --hub-url wss://hub.arcsecond.io/ws/agent
|
|
109
|
+
focale --api-server https://api.arcsecond.dev connect --hub-url wss://hub.arcsecond.dev/ws/agent --once
|
|
110
|
+
focale connect --organisation my-observatory --hub-url wss://hub.arcsecond.io/ws/agent
|
|
111
|
+
focale platesolver status
|
|
112
|
+
focale platesolver solve --peaks-file ./peaks.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`focale connect` will automatically:
|
|
116
|
+
|
|
117
|
+
1. refresh the Arcsecond access JWT when needed
|
|
118
|
+
2. create a local Ed25519 keypair if needed
|
|
119
|
+
3. enroll a personal or organisation-scoped agent installation if needed
|
|
120
|
+
4. mint a Hub JWT
|
|
121
|
+
5. discover local ASCOM Remote (Alpaca) servers and register new ones in the selected context
|
|
122
|
+
6. complete the Hub challenge-response handshake
|
|
123
|
+
|
|
124
|
+
You can set the default context once and keep connect/doctor simple:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
focale context use personal
|
|
128
|
+
# or
|
|
129
|
+
focale context use my-observatory
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Plate solving
|
|
133
|
+
|
|
134
|
+
Plate solving is included with `pip install focale` — `arcsecond-service-platesolver-astrometry`
|
|
135
|
+
is a mandatory dependency and ships native binaries for Windows, macOS, and Linux with no Docker
|
|
136
|
+
or external tooling required.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
focale platesolver status
|
|
140
|
+
focale platesolver solve --peaks-file ./peaks.json --scales 6
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
You can also target a remote service:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
focale platesolver status --service-url http://127.0.0.1:8900
|
|
147
|
+
focale platesolver solve --service-url http://127.0.0.1:8900 --peaks-file ./peaks.json
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
If you are developing Focale next to the local Arcsecond CLI checkout:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
python -m venv .venv
|
|
156
|
+
source .venv/bin/activate
|
|
157
|
+
pip install -e ../arcsecond-cli
|
|
158
|
+
pip install -e .[dev]
|
|
159
|
+
pytest -q
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Publishing
|
|
163
|
+
|
|
164
|
+
This repo includes:
|
|
165
|
+
|
|
166
|
+
- a PEP 621 `pyproject.toml`
|
|
167
|
+
- a CI workflow for tests
|
|
168
|
+
- a PyPI publish workflow on tags such as `v0.2.0`
|
|
169
|
+
- a Windows installer workflow that builds a PyInstaller bundle and wraps it with Inno Setup
|
focale-0.2.0/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Focale
|
|
2
|
+
|
|
3
|
+
Focale is a thin desktop/CLI bootstrap for Arcsecond users that:
|
|
4
|
+
|
|
5
|
+
- logs in with the user's Arcsecond account
|
|
6
|
+
- creates and stores a local Hub agent identity
|
|
7
|
+
- enrolls that identity with Arcsecond when needed
|
|
8
|
+
- mints a short-lived Hub JWT
|
|
9
|
+
- connects to the Arcsecond Hub using the signed Ed25519 challenge flow
|
|
10
|
+
|
|
11
|
+
The package depends on the published [`arcsecond`](https://pypi.org/project/arcsecond/) CLI/library and reuses its account configuration instead of creating a second login system.
|
|
12
|
+
|
|
13
|
+
By default, Focale uses Arcsecond password login to obtain a short-lived bearer JWT plus a refresh token. That avoids storing a long-lived Access Key in the normal path. Access Key login is still available as a fallback.
|
|
14
|
+
|
|
15
|
+
## User install
|
|
16
|
+
|
|
17
|
+
### Python / terminal
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install focale
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
focale login
|
|
27
|
+
focale context list
|
|
28
|
+
focale context use personal
|
|
29
|
+
focale connect --hub-url wss://hub.arcsecond.io/ws/agent
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Windows installer
|
|
33
|
+
|
|
34
|
+
This repository includes a bootstrap for building a Windows installer from CI. The installer packages the `focale` executable and can optionally add it to `PATH`.
|
|
35
|
+
|
|
36
|
+
See:
|
|
37
|
+
|
|
38
|
+
- [`.github/workflows/windows-installer.yml`](.github/workflows/windows-installer.yml)
|
|
39
|
+
- [`packaging/windows/focale.iss`](packaging/windows/focale.iss)
|
|
40
|
+
- [`scripts/build_windows.ps1`](scripts/build_windows.ps1)
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
focale login
|
|
46
|
+
focale login --auth-mode access-key
|
|
47
|
+
focale status
|
|
48
|
+
focale context show
|
|
49
|
+
focale context list
|
|
50
|
+
focale context use personal
|
|
51
|
+
focale context use my-observatory
|
|
52
|
+
focale doctor --hub-url wss://hub.arcsecond.io/ws/agent
|
|
53
|
+
focale doctor --hub-url wss://hub.arcsecond.io/ws/agent --json
|
|
54
|
+
focale connect --hub-url wss://hub.arcsecond.io/ws/agent
|
|
55
|
+
focale --api-server https://api.arcsecond.dev connect --hub-url wss://hub.arcsecond.dev/ws/agent --once
|
|
56
|
+
focale connect --organisation my-observatory --hub-url wss://hub.arcsecond.io/ws/agent
|
|
57
|
+
focale platesolver status
|
|
58
|
+
focale platesolver solve --peaks-file ./peaks.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`focale connect` will automatically:
|
|
62
|
+
|
|
63
|
+
1. refresh the Arcsecond access JWT when needed
|
|
64
|
+
2. create a local Ed25519 keypair if needed
|
|
65
|
+
3. enroll a personal or organisation-scoped agent installation if needed
|
|
66
|
+
4. mint a Hub JWT
|
|
67
|
+
5. discover local ASCOM Remote (Alpaca) servers and register new ones in the selected context
|
|
68
|
+
6. complete the Hub challenge-response handshake
|
|
69
|
+
|
|
70
|
+
You can set the default context once and keep connect/doctor simple:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
focale context use personal
|
|
74
|
+
# or
|
|
75
|
+
focale context use my-observatory
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Plate solving
|
|
79
|
+
|
|
80
|
+
Plate solving is included with `pip install focale` — `arcsecond-service-platesolver-astrometry`
|
|
81
|
+
is a mandatory dependency and ships native binaries for Windows, macOS, and Linux with no Docker
|
|
82
|
+
or external tooling required.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
focale platesolver status
|
|
86
|
+
focale platesolver solve --peaks-file ./peaks.json --scales 6
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
You can also target a remote service:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
focale platesolver status --service-url http://127.0.0.1:8900
|
|
93
|
+
focale platesolver solve --service-url http://127.0.0.1:8900 --peaks-file ./peaks.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Development
|
|
97
|
+
|
|
98
|
+
If you are developing Focale next to the local Arcsecond CLI checkout:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
python -m venv .venv
|
|
102
|
+
source .venv/bin/activate
|
|
103
|
+
pip install -e ../arcsecond-cli
|
|
104
|
+
pip install -e .[dev]
|
|
105
|
+
pytest -q
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Publishing
|
|
109
|
+
|
|
110
|
+
This repo includes:
|
|
111
|
+
|
|
112
|
+
- a PEP 621 `pyproject.toml`
|
|
113
|
+
- a CI workflow for tests
|
|
114
|
+
- a PyPI publish workflow on tags such as `v0.2.0`
|
|
115
|
+
- a Windows installer workflow that builds a PyInstaller bundle and wraps it with Inno Setup
|