Jörg Thalheim
917407c475
D210: fix
2025-08-25 14:56:48 +02:00
Jörg Thalheim
ef5ab0c2f4
D404: fix
2025-08-25 14:56:48 +02:00
Mic92
05665b1c7e
Merge pull request 'ruff-3-arg-fixes' ( #4934 ) from ruff-3-arg-fixes into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4934
2025-08-25 12:54:04 +00:00
Jörg Thalheim
04457b1272
ARG001: fix
2025-08-25 14:46:12 +02:00
Jörg Thalheim
ab50b433ee
type_to_jsonschema: throw correct Error
2025-08-25 14:11:25 +02:00
Jörg Thalheim
6a2dfb8176
S101: fix
2025-08-25 14:11:25 +02:00
Jörg Thalheim
dc5485d9f1
ruff: replace asserts outside of tests with Exceptions
2025-08-25 13:06:04 +02:00
Jörg Thalheim
ea2d6aab65
ruff: apply automatic fixes
2025-08-25 11:34:41 +02:00
Johannes Kirschbauer
f82d18d649
API: rename util file to 'type_to_jsonschema'
2025-08-18 19:30:43 +02:00
Johannes Kirschbauer
287a303484
API/schema: make type conversion more strict in terms of undefined fields
2025-08-18 19:29:54 +02:00
Johannes Kirschbauer
1213608f30
API: init support for narrowing union types
...
This allows to relax constraints on functions using overloaded interfaces
I.e. for unifying logic this allows passing 'callable | dict'
Conretely useful for prompt values that are asked on demand in the cli, vs upfront in the ui
2025-08-18 19:28:47 +02:00
Johannes Kirschbauer
bb6fab1168
api: init notification queue
2025-08-11 15:24:41 +02:00
a-kenji
e5bea3d49a
pkgs/clan/lib(directory): Add API function to query the configured directory
...
Similar to the implementation in #4526
Co-authored-by: Mayeu <m@mayeu.me >
2025-08-09 15:39:43 +02:00
a-kenji
a1874c940e
pkgs/cli/lib: Fix api test
2025-08-09 12:48:13 +02:00
a-kenji
62c4f735ed
pkgs/clan/lib: Move get_clan_directories to dirs
2025-07-30 15:07:05 +02:00
Kenji Berthold
1791743444
Merge pull request 'pkgs/clan/lib: Add clan api to get the relative clan directory' ( #4534 ) from kenji/ke-add-computed-directory-function into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4534
Reviewed-by: hsjobeki <hsjobeki@gmail.com >
2025-07-30 12:30:30 +00:00
a-kenji
c7ad875e7e
pkgs/clan/lib: Add clan api to get the relative clan directory
...
This is a Continuation of: #4519
2025-07-30 14:22:23 +02:00
a-kenji
e167137672
pkgs/cli/lib: Remove obsolete clan creation function
2025-07-30 12:41:42 +02:00
a-kenji
31438d6781
pkgs/clan/lib: Fix directory functionality
...
Fix the directory functionality of clan (clan.directory).
The python API interface was not able to distinguish if the directory
was set to anything other than `self.src`.
Breaking every command that relied on the clan directory, for example:
- `clan machines update`
- `clan machines update-hardware-config`
See more in #2906
This is the first step in fixing all those commands.
Individual command support and implementation will be implemented in
follow ups.
2025-07-29 17:51:12 +02:00
Qubasa
94662b722d
clan-lib: Remove injected "op_key" argument from all functions and do it over the threadcontext instead. Remove double threading in http server
2025-07-24 14:25:20 +07:00
Johannes Kirschbauer
ceb0221daf
lib/disks: move from api to templates
2025-07-13 13:57:02 +02:00
Johannes Kirschbauer
943dde4bbf
lib/modules: move from api to services module
2025-07-13 13:57:02 +02:00
Johannes Kirschbauer
5f19e76cd0
api/modules: remove redundant localModules
2025-07-13 11:52:19 +02:00
Johannes Kirschbauer
9ece8c6d10
Templates/cli: improve ux and docs
2025-07-12 17:21:23 +02:00
Johannes Kirschbauer
78b1931271
lib/disks: add parameter to disable hardware checking
2025-07-11 18:53:54 +02:00
Johannes Kirschbauer
480fdfaf8a
API: rename {open_file, open_clan_folder} into {get_system_file, get_clan_folder}
2025-07-10 18:42:03 +02:00
Johannes Kirschbauer
7f3292ceb0
Docs: improve api docs of {open_file, open_clan_folder}
2025-07-10 18:40:48 +02:00
Qubasa
695141b2ae
clan-app: Make http server non blocking, add tests for the http server and for cancelling tasks
2025-07-10 17:21:18 +07:00
Qubasa
dbb3e889e1
clan-lib: Fix @API.register_abstract not throwing correct error when called directly without implementation
...
clan-app: Fix mypy lint
clan-lib: Mark test as with_core
2025-07-10 15:09:51 +07:00
Qubasa
b1c3acb008
clan-app: Implement open_clan_folder api request
2025-07-10 14:19:19 +07:00
Johannes Kirschbauer
474a0a3f9d
api: rename {list_system_services_mdns, list_system_storage_devices}
2025-07-09 16:51:42 +02:00
Johannes Kirschbauer
186ce03e6d
api: rename run_blocking_task into run_task_blocking
2025-07-09 09:43:56 +02:00
Johannes Kirschbauer
3e295869cc
api/disk_schema: make getter consistent
2025-07-08 16:31:51 +02:00
Qubasa
0c54a0f6de
clan-app: Fix delete tasks
...
clan-app: Fix delete tasks
2025-07-08 18:11:59 +07:00
Qubasa
60263bac8a
clan-cli: Add verb 'cancel' to openapi
2025-07-08 17:43:14 +07:00
Qubasa
d8251dce2b
clan-app: Generalize architecture for API requests
2025-07-08 17:32:59 +07:00
Qubasa
389e726521
clan-app: Add plug and play middleware interface
2025-07-08 17:32:59 +07:00
Qubasa
152ac2c07e
clan-cli: Fix Ruff linting errors
...
clan-cli: Ruff fixes
ignore noqa lint
fix more ruff issues
2025-07-08 17:25:02 +07:00
Qubasa
f854c39292
clan-cli: Fix regression in ruff linter, where linter rules got overriden by local pyproject.toml
...
clan-app: Fix ruff regression where linter rules got overriden by local pyproject.toml
2025-07-08 17:23:32 +07:00
Johannes Kirschbauer
79321485c7
docs/api: add docstrings to {list_mdns_services, set_clan_details}
2025-07-07 15:47:14 +02:00
Johannes Kirschbauer
d0c6cfaed0
api: remove unused get_directory
2025-07-07 15:45:51 +02:00
Johannes Kirschbauer
67973d1382
api: expose docstring as function description
2025-07-07 14:51:15 +02:00
Johannes Kirschbauer
cc0382fb57
api/tasks: rename 'cancel_task' into 'delete_task'
2025-07-07 14:07:53 +02:00
Johannes Kirschbauer
874faad285
api: rename 'show_mdns' -> 'list_mdns_services'
2025-07-07 10:49:46 +02:00
Johannes Kirschbauer
c503f41b7c
docs: improve docstring for 'list_block_devices'
2025-07-07 10:46:26 +02:00
Johannes Kirschbauer
1c33f30135
api/clan: rename 'show_clan_meta' -> 'get_clan_details'
2025-07-07 10:41:00 +02:00
Johannes Kirschbauer
0d0554cdf6
api/hardware: consolidate into 'describe_machine_hardware'
2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
adb726c318
Templates/list: display templates via exposed nix value
2025-07-06 14:37:03 +02:00
Jörg Thalheim
e8247533a9
clan-cli: handle None in union types to prevent TypeError
...
Add comprehensive test coverage for union types with None to prevent
regression of the issubclass() TypeError that was occurring when
checking if None is in a union type.
2025-07-04 18:39:01 +02:00
Qubasa
0d1e1d9796
treefmt/ruff: Set python lint version to 3.13. Fix all new lints coming up.
2025-07-04 17:11:31 +02:00