diff --git a/pyproject.toml b/pyproject.toml index 20ead2bc..81c09038 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["maturin>=1.4,<2.0"] build-backend = "maturin" [project] -name = "aqora-cli" +name = "aqora" description = "The aqora command line interface" authors = [{ name = "S.A.S Aqora Quantum", email = "hello@aqora.io" }] requires-python = ">=3.8" @@ -14,7 +14,7 @@ dynamic = ["version"] dependencies = ["typing-extensions>=4.13.2", "uv >=0.3.2, <1.0.0"] [project.entry-points."fsspec.specs"] -aqora = "aqora_cli.fsspec.AqoraFileSystem" +aqora = "aqora.fsspec.AqoraFileSystem" [project.optional-dependencies] venv = [ @@ -35,11 +35,11 @@ Repository = "https://github.com/aqora-io/cli" Documentation = "https://github.com/aqora-io/cli" [project.scripts] -aqora = "aqora_cli:main" +aqora = "aqora:main" [tool.maturin] python-source = "python" -module-name = "aqora_cli._aqora_cli" +module-name = "aqora._aqora" strip = true features = ["extension-module"] diff --git a/python/aqora_cli/__init__.py b/python/aqora/__init__.py similarity index 81% rename from python/aqora_cli/__init__.py rename to python/aqora/__init__.py index e4f5eaf2..7147fd41 100644 --- a/python/aqora_cli/__init__.py +++ b/python/aqora/__init__.py @@ -1,8 +1,8 @@ from typing_extensions import Any, TypedDict, override -from . import _aqora_cli +from . import _aqora from .notebook import notebook -from aqora_cli._aqora_cli import * # pyright: ignore[reportAssignmentType, reportWildcardImportFromLibrary] # noqa: F403 +from aqora._aqora import * # pyright: ignore[reportAssignmentType, reportWildcardImportFromLibrary] # noqa: F403 class GraphQLError(TypedDict): @@ -29,4 +29,4 @@ def __str__(self): return self.message -__doc__ = _aqora_cli.__doc__ +__doc__ = _aqora.__doc__ diff --git a/python/aqora_cli/_aqora_cli.pyi b/python/aqora/_aqora.pyi similarity index 100% rename from python/aqora_cli/_aqora_cli.pyi rename to python/aqora/_aqora.pyi diff --git a/python/aqora_cli/fsspec.py b/python/aqora/fsspec.py similarity index 99% rename from python/aqora_cli/fsspec.py rename to python/aqora/fsspec.py index b36b628d..d6ee3500 100644 --- a/python/aqora_cli/fsspec.py +++ b/python/aqora/fsspec.py @@ -7,7 +7,7 @@ from fsspec.callbacks import DEFAULT_CALLBACK as FSSPEC_DEFAULT_CALLBACK from typing_extensions import Any, Unpack, TypedDict, override -from ._aqora_cli import Client +from ._aqora import Client @dataclass(frozen=True) diff --git a/python/aqora_cli/notebook.py b/python/aqora/notebook.py similarity index 93% rename from python/aqora_cli/notebook.py rename to python/aqora/notebook.py index 2c569c2e..a0902a57 100644 --- a/python/aqora_cli/notebook.py +++ b/python/aqora/notebook.py @@ -8,7 +8,7 @@ from types import ModuleType from typing import Any, Coroutine -from ._aqora_cli import Client +from ._aqora import Client def _parse_workspace_slug(workspace: str) -> tuple[str, str]: owner, slash, slug = workspace.strip().partition("/") @@ -24,10 +24,10 @@ def _notebook_cache_dir() -> Path: package_dir = Path(__file__).resolve().parent candidates = [ package_dir / "_workspace_notebooks", - Path(site.getusersitepackages()) / "aqora_cli" / "_workspace_notebooks", + Path(site.getusersitepackages()) / "aqora" / "_workspace_notebooks", ] for site_package in site.getsitepackages(): - candidates.append(Path(site_package) / "aqora_cli" / "_workspace_notebooks") + candidates.append(Path(site_package) / "aqora" / "_workspace_notebooks") seen: set[Path] = set() for candidate in candidates: @@ -51,7 +51,7 @@ def _module_name(owner: str, slug: str, filename: str) -> str: safe_owner = "".join(c if c.isalnum() or c == "_" else "_" for c in owner) safe_slug = "".join(c if c.isalnum() or c == "_" else "_" for c in slug) safe_file = "".join(c if c.isalnum() or c == "_" else "_" for c in Path(filename).stem) - return f"aqora_cli_workspace_{safe_owner}_{safe_slug}_{safe_file}" + return f"aqora_workspace_{safe_owner}_{safe_slug}_{safe_file}" def _path_part(value: str) -> str: diff --git a/python/aqora_cli/py.typed b/python/aqora/py.typed similarity index 100% rename from python/aqora_cli/py.typed rename to python/aqora/py.typed diff --git a/python/aqora_cli/pyarrow.py b/python/aqora/pyarrow.py similarity index 95% rename from python/aqora_cli/pyarrow.py rename to python/aqora/pyarrow.py index 1d913326..392d06f8 100644 --- a/python/aqora_cli/pyarrow.py +++ b/python/aqora/pyarrow.py @@ -6,7 +6,7 @@ from pyarrow.fs import FSSpecHandler -from aqora_cli.fsspec import AqoraFileSystem +from aqora.fsspec import AqoraFileSystem def dataset( diff --git a/runner/src/python.rs b/runner/src/python.rs index ec2c473a..cb51f4a4 100644 --- a/runner/src/python.rs +++ b/runner/src/python.rs @@ -291,7 +291,7 @@ impl PyEnv { cmd.env("VIRTUAL_ENV", path) .arg("pip") .arg("install") - .arg("aqora-cli[venv]"); + .arg("aqora[venv]"); if let Some(cache_path) = options.cache_path.as_ref() { cmd.arg("--cache-dir").arg(cache_path); } diff --git a/src/commands/install.rs b/src/commands/install.rs index 2d476788..94d61e4d 100644 --- a/src/commands/install.rs +++ b/src/commands/install.rs @@ -250,7 +250,7 @@ pub async fn install_submission( let res = pip_install( &env, [ - PipPackage::pypi("aqora-cli[venv]"), + PipPackage::pypi("aqora[venv]"), PipPackage::tar(use_case_package_name, use_case_dir.as_os_str()), PipPackage::editable(&global.project), ], @@ -302,7 +302,7 @@ pub async fn install_use_case(args: Install, global: GlobalArgs, project: PyProj let env = global.init_venv(&pb).await?; let mut deps = vec![ - PipPackage::pypi("aqora-cli[venv]"), + PipPackage::pypi("aqora[venv]"), PipPackage::editable(&global.project), ]; diff --git a/src/python_module.rs b/src/python_module.rs index 5fe4f4de..753d753f 100644 --- a/src/python_module.rs +++ b/src/python_module.rs @@ -28,9 +28,9 @@ pub fn main(py: Python<'_>) -> PyResult<()> { Ok(()) } -import_exception!(aqora_cli, ClientError); +import_exception!(aqora, ClientError); -#[pyclass(frozen, name = "Client", module = "aqora_cli")] +#[pyclass(frozen, name = "Client", module = "aqora")] struct PyClient { inner: Arc>, } @@ -232,8 +232,8 @@ impl PyClient { } #[pymodule] -#[pyo3(name = "_aqora_cli")] -pub fn aqora_cli(_: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { +#[pyo3(name = "_aqora")] +pub fn aqora(_: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_function(wrap_pyfunction!(main, m)?)?; m.add_class::()?; m.add_class::()?; diff --git a/template/assets/dataset_marimo/pyproject.toml.hbs b/template/assets/dataset_marimo/pyproject.toml.hbs index dc9351e5..97719711 100644 --- a/template/assets/dataset_marimo/pyproject.toml.hbs +++ b/template/assets/dataset_marimo/pyproject.toml.hbs @@ -5,7 +5,7 @@ requires-python = ">={{ python_version }}" dependencies = [ "marimo[recommended,lsp]>={{ marimo_version }}", - "aqora-cli[pyarrow]>={{ cli_version }}", + "aqora[pyarrow]>={{ cli_version }}", ] [dependency-groups] diff --git a/template/assets/dataset_marimo/readme.py.hbs b/template/assets/dataset_marimo/readme.py.hbs index 23fcb122..262715fc 100644 --- a/template/assets/dataset_marimo/readme.py.hbs +++ b/template/assets/dataset_marimo/readme.py.hbs @@ -28,7 +28,7 @@ def _(): {{#if raw_init }} {{ indent raw_init ' ' }} {{else}} - from aqora_cli.pyarrow import dataset + from aqora.pyarrow import dataset data = dataset("{{ owner }}/{{ local_slug }}", "v{{ version }}") {{/if}} return (data,) diff --git a/template/assets/use_case/pyproject.toml.hbs b/template/assets/use_case/pyproject.toml.hbs index 1684b945..f977600a 100644 --- a/template/assets/use_case/pyproject.toml.hbs +++ b/template/assets/use_case/pyproject.toml.hbs @@ -3,7 +3,7 @@ name = "use-case" version = "0.1.0" requires-python = ">={{ python_version }}" -dependencies = ["aqora-cli>={{ cli_version }}"] +dependencies = ["aqora>={{ cli_version }}"] [build-system] requires = [ diff --git a/template/assets/use_case/use_case/use_case.py b/template/assets/use_case/use_case/use_case.py index 32a31ffa..b41c7fc2 100644 --- a/template/assets/use_case/use_case/use_case.py +++ b/template/assets/use_case/use_case/use_case.py @@ -1,6 +1,6 @@ from types import NoneType from typing import Dict, AsyncIterator, List, Any -from aqora_cli import PipelineConfig, LayerEvaluation +from aqora import PipelineConfig, LayerEvaluation Input = NoneType Output = Any diff --git a/test/test_aqora_client.py b/test/test_aqora_client.py index 82f1e4e4..c8b5f37e 100644 --- a/test/test_aqora_client.py +++ b/test/test_aqora_client.py @@ -2,7 +2,7 @@ import asyncio import pytest -from aqora_cli import Client, ClientError +from aqora import Client, ClientError @pytest.mark.asyncio diff --git a/test/test_aqorafs.py b/test/test_aqorafs.py index 6ea11eb4..07863679 100644 --- a/test/test_aqorafs.py +++ b/test/test_aqorafs.py @@ -1,6 +1,6 @@ import pytest -from aqora_cli.pyarrow import dataset +from aqora.pyarrow import dataset testdata = [ ("alice/test", "v1.0.0", (100_000, 8)), diff --git a/uv.lock b/uv.lock index 2219a0af..117c55d7 100644 --- a/uv.lock +++ b/uv.lock @@ -60,7 +60,7 @@ wheels = [ ] [[package]] -name = "aqora-cli" +name = "aqora" source = { editable = "." } dependencies = [ { name = "typing-extensions", version = "4.13.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, @@ -129,7 +129,7 @@ requires-dist = [ { name = "ujson", marker = "extra == 'venv'", specifier = ">=5.9.0,<6.0.0" }, { name = "uv", specifier = ">=0.3.2,<1.0.0" }, ] -provides-extras = ["venv", "fsspec", "pyarrow"] +provides-extras = ["fsspec", "pyarrow", "venv"] [package.metadata.requires-dev] dev = [