dirsql 0.3.4__tar.gz → 0.3.5__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.
- {dirsql-0.3.4 → dirsql-0.3.5}/Cargo.lock +1 -1
- {dirsql-0.3.4 → dirsql-0.3.5}/PKG-INFO +2 -2
- {dirsql-0.3.4/packages/python → dirsql-0.3.5}/README.md +1 -1
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/Cargo.toml +1 -1
- {dirsql-0.3.4 → dirsql-0.3.5/packages/python}/README.md +1 -1
- dirsql-0.3.5/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/Cargo.toml +5 -1
- dirsql-0.3.5/pyproject.toml +71 -0
- dirsql-0.3.4/pyproject.toml +0 -59
- dirsql-0.3.4/python/dirsql/_cli/binary_path_test.py +0 -70
- dirsql-0.3.4/python/dirsql/_cli/is_windows_test.py +0 -15
- dirsql-0.3.4/python/dirsql/_cli/main_test.py +0 -77
- {dirsql-0.3.4 → dirsql-0.3.5}/Cargo.toml +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/__init__.py +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/_async.py +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/_cli/__init__.py +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/_cli/binary_path.py +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/_cli/is_windows.py +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/_cli/main.py +0 -0
- {dirsql-0.3.4/python → dirsql-0.3.5}/dirsql/test_async.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/AGENTS.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/api/index.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/getting-started.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/async.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/cli.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/config.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/crdt.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/init.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/persistence.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/querying.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/tables.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/guide/watching.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/index.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/migrations.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/package.json +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/playwright.config.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/docs/vitest.config.ts +0 -0
- {dirsql-0.3.4/packages/python → dirsql-0.3.5/packages}/python/conftest.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/api/index.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/async.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/cli.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/config.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/crdt.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/init.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/persistence.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/querying.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/tables.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/guide/watching.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/index.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/migrations.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/package.json +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/playwright.config.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/docs/vitest.config.ts +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/src/lib.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_async_dirsql.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_binding.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_dirsql.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_docs_examples.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_docs_gaps.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_from_config.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/python/tests/integration/test_persist.py +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/README.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/api/index.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/async.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/cli.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/config.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/crdt.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/init.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/persistence.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/querying.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/tables.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/guide/watching.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/index.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/docs/migrations.md +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/bin/dirsql.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/cli/init.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/config.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/db.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/lib.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/async_sdk.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/cli_e2e.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/cli_integration.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/docs_examples.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/docs_gaps.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/from_config.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/init_e2e.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/init_integration.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/persist.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/readonly_query.rs +0 -0
- {dirsql-0.3.4 → dirsql-0.3.5}/packages/rust/tests/sdk.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirsql
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Requires-Dist: pytest>=8 ; extra == 'dev'
|
|
5
5
|
Requires-Dist: pytest-describe>=2 ; extra == 'dev'
|
|
6
6
|
Requires-Dist: pytest-asyncio>=0.23 ; extra == 'dev'
|
|
@@ -33,7 +33,7 @@ Each wheel also bundles the `dirsql` HTTP-server CLI as a console script, so `pi
|
|
|
33
33
|
|
|
34
34
|
## Publishing (maintainers)
|
|
35
35
|
|
|
36
|
-
Handled by `.github/workflows/publish.yml` (invoked from `minor-release.yml` / `patch-release.yml`). For each target triple the `build` job `cargo build`s the Rust CLI with `--features cli`, stages the binary into `
|
|
36
|
+
Handled by `.github/workflows/publish.yml` (invoked from `minor-release.yml` / `patch-release.yml`). For each target triple the `build` job `cargo build`s the Rust CLI with `--features cli`, stages the binary into `dirsql/_binary/`, runs `maturin build` (which picks the binary up via the `[tool.maturin] include` rule in `pyproject.toml`), and the wheels + sdist are then trusted-published to PyPI.
|
|
37
37
|
|
|
38
38
|
## Quick Start
|
|
39
39
|
|
|
@@ -16,7 +16,7 @@ Each wheel also bundles the `dirsql` HTTP-server CLI as a console script, so `pi
|
|
|
16
16
|
|
|
17
17
|
## Publishing (maintainers)
|
|
18
18
|
|
|
19
|
-
Handled by `.github/workflows/publish.yml` (invoked from `minor-release.yml` / `patch-release.yml`). For each target triple the `build` job `cargo build`s the Rust CLI with `--features cli`, stages the binary into `
|
|
19
|
+
Handled by `.github/workflows/publish.yml` (invoked from `minor-release.yml` / `patch-release.yml`). For each target triple the `build` job `cargo build`s the Rust CLI with `--features cli`, stages the binary into `dirsql/_binary/`, runs `maturin build` (which picks the binary up via the `[tool.maturin] include` rule in `pyproject.toml`), and the wheels + sdist are then trusted-published to PyPI.
|
|
20
20
|
|
|
21
21
|
## Quick Start
|
|
22
22
|
|
|
@@ -4,7 +4,7 @@ name = "dirsql-py-ext"
|
|
|
4
4
|
# pypi/maturin handler can rewrite it via `write-version` before
|
|
5
5
|
# `maturin build`. `pyproject.toml` declares `dynamic = ["version"]`
|
|
6
6
|
# and maturin reads this field. Mirrors `packages/rust/Cargo.toml`.
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.5"
|
|
8
8
|
edition.workspace = true
|
|
9
9
|
publish = false
|
|
10
10
|
readme = "README.md"
|
|
@@ -16,7 +16,7 @@ Each wheel also bundles the `dirsql` HTTP-server CLI as a console script, so `pi
|
|
|
16
16
|
|
|
17
17
|
## Publishing (maintainers)
|
|
18
18
|
|
|
19
|
-
Handled by `.github/workflows/publish.yml` (invoked from `minor-release.yml` / `patch-release.yml`). For each target triple the `build` job `cargo build`s the Rust CLI with `--features cli`, stages the binary into `
|
|
19
|
+
Handled by `.github/workflows/publish.yml` (invoked from `minor-release.yml` / `patch-release.yml`). For each target triple the `build` job `cargo build`s the Rust CLI with `--features cli`, stages the binary into `dirsql/_binary/`, runs `maturin build` (which picks the binary up via the `[tool.maturin] include` rule in `pyproject.toml`), and the wheels + sdist are then trusted-published to PyPI.
|
|
20
20
|
|
|
21
21
|
## Quick Start
|
|
22
22
|
|
|
File without changes
|
|
@@ -6,7 +6,11 @@ description = "Ephemeral SQL index over a local directory"
|
|
|
6
6
|
# version stays for the binding crates (publish = false).
|
|
7
7
|
version = "0.2.7"
|
|
8
8
|
edition.workspace = true
|
|
9
|
-
license.workspace = true
|
|
9
|
+
# Literal `license` (not `license.workspace = true`) because
|
|
10
|
+
# putitoutthere's preflight check reads `[package].license` directly
|
|
11
|
+
# from the crate's Cargo.toml and does not resolve workspace
|
|
12
|
+
# inheritance, surfacing PIOT_CRATES_MISSING_METADATA otherwise.
|
|
13
|
+
license = "MIT"
|
|
10
14
|
repository.workspace = true
|
|
11
15
|
# `docs/` is a symlink to the workspace `docs/` so the markdown ships with the
|
|
12
16
|
# crate; everything below is the VitePress build tooling we don't want to ship.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.0,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dirsql"
|
|
7
|
+
# Maturin reads the version from `packages/python/Cargo.toml`'s
|
|
8
|
+
# `[package].version` (see `dynamic = ["version"]`). Putitoutthere's
|
|
9
|
+
# `write-version` step rewrites that literal before `maturin build` so
|
|
10
|
+
# wheels ship at the planned version, not the literal on disk.
|
|
11
|
+
dynamic = ["version"]
|
|
12
|
+
description = "Ephemeral SQL index over a local directory"
|
|
13
|
+
license = "MIT"
|
|
14
|
+
requires-python = ">=3.10"
|
|
15
|
+
authors = [
|
|
16
|
+
{ name = "Kevin Scott" },
|
|
17
|
+
]
|
|
18
|
+
repository = "https://github.com/thekevinscott/dirsql"
|
|
19
|
+
keywords = ["sql", "filesystem", "directory", "sqlite", "index"]
|
|
20
|
+
readme = "README.md"
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
dev = [
|
|
24
|
+
"pytest>=8",
|
|
25
|
+
"pytest-describe>=2",
|
|
26
|
+
"pytest-asyncio>=0.23",
|
|
27
|
+
"pytest-cov>=5",
|
|
28
|
+
"ruff>=0.4",
|
|
29
|
+
"maturin>=1.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
dirsql = "dirsql._cli.main:main"
|
|
34
|
+
|
|
35
|
+
[tool.maturin]
|
|
36
|
+
features = ["extension-module"]
|
|
37
|
+
exclude = [
|
|
38
|
+
"tests/",
|
|
39
|
+
]
|
|
40
|
+
# `python-source` intentionally unset: the maturin-recommended mixed
|
|
41
|
+
# layout (`python-source = "python"`) is unsupported by upstream
|
|
42
|
+
# putitoutthere's wheel-content verifier, which compares `stage_to`
|
|
43
|
+
# against the literal in-wheel path without subtracting the
|
|
44
|
+
# source-root prefix that maturin strips. Filed at
|
|
45
|
+
# thekevinscott/putitoutthere; revert this flatten (and re-add
|
|
46
|
+
# `python-source = "python"`) once upstream's verifier handles
|
|
47
|
+
# python-source stripping.
|
|
48
|
+
module-name = "dirsql._dirsql"
|
|
49
|
+
# putitoutthere's `[package.bundle_cli]` recipe (see putitoutthere.toml)
|
|
50
|
+
# cross-compiles the `dirsql` bin per target and stages it under
|
|
51
|
+
# `dirsql/_binary/` before `maturin build`, so it ships inside each
|
|
52
|
+
# wheel as package data. The directory is `.gitignore`d; not in
|
|
53
|
+
# source control.
|
|
54
|
+
include = [
|
|
55
|
+
{ path = "dirsql/_binary/*", format = "wheel" },
|
|
56
|
+
{ path = "docs/**/*", format = "sdist" },
|
|
57
|
+
]
|
|
58
|
+
manifest-path = "packages/python/Cargo.toml"
|
|
59
|
+
|
|
60
|
+
# CLI launcher modules (`_cli/main.py`, `_cli/binary_path.py`,
|
|
61
|
+
# `_cli/is_windows.py`) are thin shims that exec the bundled Rust
|
|
62
|
+
# binary. The AGENTS.md test-boundary rules forbid monkeypatch unit
|
|
63
|
+
# tests on production module attributes (`os.execv`, `binary_path`,
|
|
64
|
+
# etc.) -- the only meaningful coverage is end-to-end (real wheel
|
|
65
|
+
# install + `dirsql --version`), which putitoutthere's wheel-content
|
|
66
|
+
# guard verifies post-build. Omitting these files keeps the 90%
|
|
67
|
+
# coverage floor honest about library code.
|
|
68
|
+
[tool.coverage.run]
|
|
69
|
+
omit = [
|
|
70
|
+
"dirsql/_cli/*",
|
|
71
|
+
]
|
dirsql-0.3.4/pyproject.toml
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["maturin>=1.0,<2.0"]
|
|
3
|
-
build-backend = "maturin"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "dirsql"
|
|
7
|
-
# Maturin reads the version from `packages/python/Cargo.toml`'s
|
|
8
|
-
# `[package].version` (see `dynamic = ["version"]`). Putitoutthere's
|
|
9
|
-
# `write-version` step rewrites that literal before `maturin build` so
|
|
10
|
-
# wheels ship at the planned version, not the literal on disk.
|
|
11
|
-
dynamic = ["version"]
|
|
12
|
-
description = "Ephemeral SQL index over a local directory"
|
|
13
|
-
license = "MIT"
|
|
14
|
-
requires-python = ">=3.10"
|
|
15
|
-
authors = [
|
|
16
|
-
{ name = "Kevin Scott" },
|
|
17
|
-
]
|
|
18
|
-
repository = "https://github.com/thekevinscott/dirsql"
|
|
19
|
-
keywords = ["sql", "filesystem", "directory", "sqlite", "index"]
|
|
20
|
-
readme = "README.md"
|
|
21
|
-
|
|
22
|
-
[project.optional-dependencies]
|
|
23
|
-
dev = [
|
|
24
|
-
"pytest>=8",
|
|
25
|
-
"pytest-describe>=2",
|
|
26
|
-
"pytest-asyncio>=0.23",
|
|
27
|
-
"pytest-cov>=5",
|
|
28
|
-
"ruff>=0.4",
|
|
29
|
-
"maturin>=1.0",
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
# [project.scripts] removed: the Rust CLI binary is no longer bundled
|
|
33
|
-
# inside the PyPI wheel. Putitoutthere v0.2.3's `bundle_cli` recipe is
|
|
34
|
-
# parsed but not yet wired into its reusable workflow's build job (no
|
|
35
|
-
# cross-compile step reads `matrix.bundle_cli`). Restore the entry —
|
|
36
|
-
#
|
|
37
|
-
# [project.scripts]
|
|
38
|
-
# dirsql = "dirsql._cli.main:main"
|
|
39
|
-
#
|
|
40
|
-
# — once the upstream gap is fixed and `[package.bundle_cli]` is
|
|
41
|
-
# re-enabled in `putitoutthere.toml`. Until then, CLI install paths are
|
|
42
|
-
# `cargo install dirsql --features cli` and `npx dirsql`.
|
|
43
|
-
|
|
44
|
-
[tool.maturin]
|
|
45
|
-
features = ["extension-module"]
|
|
46
|
-
exclude = [
|
|
47
|
-
"tests/",
|
|
48
|
-
]
|
|
49
|
-
module-name = "dirsql._dirsql"
|
|
50
|
-
# CI copies the release-built `dirsql` binary into
|
|
51
|
-
# `python/dirsql/_binary/<name>` before `maturin build` so it ships
|
|
52
|
-
# inside the wheel as package data. `.gitignore`d; not in source
|
|
53
|
-
# control.
|
|
54
|
-
include = [
|
|
55
|
-
{ path = "python/dirsql/_binary/*", format = "wheel" },
|
|
56
|
-
{ path = "docs/**/*", format = "sdist" },
|
|
57
|
-
]
|
|
58
|
-
manifest-path = "packages/python/Cargo.toml"
|
|
59
|
-
python-source = "python"
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"""Unit tests for ``binary_path``."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import pytest
|
|
6
|
-
|
|
7
|
-
from dirsql._cli import binary_path as mod
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class _FakeResource:
|
|
11
|
-
def __init__(self, path: str, exists: bool) -> None:
|
|
12
|
-
self._path = path
|
|
13
|
-
self._exists = exists
|
|
14
|
-
|
|
15
|
-
def is_file(self) -> bool:
|
|
16
|
-
return self._exists
|
|
17
|
-
|
|
18
|
-
def __str__(self) -> str:
|
|
19
|
-
return self._path
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class _FakeRoot:
|
|
23
|
-
def __init__(self, resource_path: str, exists: bool) -> None:
|
|
24
|
-
self.resource_path = resource_path
|
|
25
|
-
self.exists = exists
|
|
26
|
-
self.joinpath_calls: list[tuple[str, ...]] = []
|
|
27
|
-
|
|
28
|
-
def joinpath(self, *parts: str) -> _FakeResource:
|
|
29
|
-
self.joinpath_calls.append(parts)
|
|
30
|
-
return _FakeResource(self.resource_path, self.exists)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def describe_binary_path():
|
|
34
|
-
def describe_on_unix():
|
|
35
|
-
def it_returns_the_resolved_dirsql_path(tmp_path, monkeypatch):
|
|
36
|
-
monkeypatch.setattr(mod, "is_windows", lambda: False)
|
|
37
|
-
binary = tmp_path / "dirsql"
|
|
38
|
-
binary.write_text("#!/bin/sh\nexit 0\n")
|
|
39
|
-
|
|
40
|
-
root = _FakeRoot(str(binary), exists=True)
|
|
41
|
-
monkeypatch.setattr(mod, "files", lambda _mod: root)
|
|
42
|
-
|
|
43
|
-
assert mod.binary_path() == str(binary)
|
|
44
|
-
assert root.joinpath_calls == [("_binary", "dirsql")]
|
|
45
|
-
|
|
46
|
-
def describe_on_windows():
|
|
47
|
-
def it_looks_for_dirsql_exe(tmp_path, monkeypatch):
|
|
48
|
-
monkeypatch.setattr(mod, "is_windows", lambda: True)
|
|
49
|
-
binary = tmp_path / "dirsql.exe"
|
|
50
|
-
binary.write_text("stub")
|
|
51
|
-
|
|
52
|
-
root = _FakeRoot(str(binary), exists=True)
|
|
53
|
-
monkeypatch.setattr(mod, "files", lambda _mod: root)
|
|
54
|
-
|
|
55
|
-
assert mod.binary_path() == str(binary)
|
|
56
|
-
assert root.joinpath_calls == [("_binary", "dirsql.exe")]
|
|
57
|
-
|
|
58
|
-
def describe_when_the_binary_is_missing():
|
|
59
|
-
def it_raises_FileNotFoundError_pointing_at_alternate_install_paths(
|
|
60
|
-
monkeypatch,
|
|
61
|
-
):
|
|
62
|
-
monkeypatch.setattr(mod, "is_windows", lambda: False)
|
|
63
|
-
root = _FakeRoot("/does/not/exist", exists=False)
|
|
64
|
-
monkeypatch.setattr(mod, "files", lambda _mod: root)
|
|
65
|
-
|
|
66
|
-
with pytest.raises(FileNotFoundError) as exc:
|
|
67
|
-
mod.binary_path()
|
|
68
|
-
msg = str(exc.value)
|
|
69
|
-
assert "cargo install dirsql --features cli" in msg
|
|
70
|
-
assert "npx dirsql" in msg
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"""Unit tests for ``is_windows``."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from dirsql._cli import is_windows as mod
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def describe_is_windows():
|
|
9
|
-
def it_returns_false_on_posix(monkeypatch):
|
|
10
|
-
monkeypatch.setattr(mod, "os", type("_", (), {"name": "posix"})())
|
|
11
|
-
assert mod.is_windows() is False
|
|
12
|
-
|
|
13
|
-
def it_returns_true_on_nt(monkeypatch):
|
|
14
|
-
monkeypatch.setattr(mod, "os", type("_", (), {"name": "nt"})())
|
|
15
|
-
assert mod.is_windows() is True
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"""Unit tests for the ``main`` entry point."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import os
|
|
6
|
-
import subprocess
|
|
7
|
-
import sys
|
|
8
|
-
import types
|
|
9
|
-
|
|
10
|
-
import pytest
|
|
11
|
-
|
|
12
|
-
import dirsql._cli.main as mod
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def describe_main():
|
|
16
|
-
def describe_on_unix():
|
|
17
|
-
def it_execvs_and_forwards_argv(monkeypatch):
|
|
18
|
-
monkeypatch.setattr(mod, "is_windows", lambda: False)
|
|
19
|
-
monkeypatch.setattr(mod, "binary_path", lambda: "/fake/dirsql")
|
|
20
|
-
|
|
21
|
-
seen: dict[str, object] = {}
|
|
22
|
-
|
|
23
|
-
def fake_execv(path, args):
|
|
24
|
-
seen["path"] = path
|
|
25
|
-
seen["args"] = args
|
|
26
|
-
raise SystemExit(0)
|
|
27
|
-
|
|
28
|
-
monkeypatch.setattr(os, "execv", fake_execv)
|
|
29
|
-
with pytest.raises(SystemExit):
|
|
30
|
-
mod.main(["--port", "7117"])
|
|
31
|
-
|
|
32
|
-
assert seen["path"] == "/fake/dirsql"
|
|
33
|
-
assert seen["args"] == ["/fake/dirsql", "--port", "7117"]
|
|
34
|
-
|
|
35
|
-
def describe_on_windows():
|
|
36
|
-
def it_uses_subprocess_and_returns_the_child_exit_code(monkeypatch):
|
|
37
|
-
monkeypatch.setattr(mod, "is_windows", lambda: True)
|
|
38
|
-
monkeypatch.setattr(mod, "binary_path", lambda: "C:\\fake\\dirsql.exe")
|
|
39
|
-
|
|
40
|
-
seen: dict[str, object] = {}
|
|
41
|
-
|
|
42
|
-
def fake_run(cmd):
|
|
43
|
-
seen["cmd"] = cmd
|
|
44
|
-
return types.SimpleNamespace(returncode=42)
|
|
45
|
-
|
|
46
|
-
monkeypatch.setattr(subprocess, "run", fake_run)
|
|
47
|
-
code = mod.main(["serve"])
|
|
48
|
-
assert code == 42
|
|
49
|
-
assert seen["cmd"] == ["C:\\fake\\dirsql.exe", "serve"]
|
|
50
|
-
|
|
51
|
-
def describe_default_argv():
|
|
52
|
-
def it_falls_back_to_sys_argv_slice(monkeypatch):
|
|
53
|
-
monkeypatch.setattr(mod, "is_windows", lambda: False)
|
|
54
|
-
monkeypatch.setattr(mod, "binary_path", lambda: "/fake/dirsql")
|
|
55
|
-
monkeypatch.setattr(sys, "argv", ["dirsql", "hello"])
|
|
56
|
-
|
|
57
|
-
seen: dict[str, object] = {}
|
|
58
|
-
|
|
59
|
-
def fake_execv(path, args):
|
|
60
|
-
seen["args"] = args
|
|
61
|
-
raise SystemExit(0)
|
|
62
|
-
|
|
63
|
-
monkeypatch.setattr(os, "execv", fake_execv)
|
|
64
|
-
with pytest.raises(SystemExit):
|
|
65
|
-
mod.main(None)
|
|
66
|
-
|
|
67
|
-
assert seen["args"] == ["/fake/dirsql", "hello"]
|
|
68
|
-
|
|
69
|
-
def describe_when_the_binary_cannot_be_resolved():
|
|
70
|
-
def it_returns_1_and_writes_a_dirsql_prefixed_stderr(capsys, monkeypatch):
|
|
71
|
-
def raise_missing():
|
|
72
|
-
raise FileNotFoundError("bundled `dirsql` not found at /x")
|
|
73
|
-
|
|
74
|
-
monkeypatch.setattr(mod, "binary_path", raise_missing)
|
|
75
|
-
code = mod.main([])
|
|
76
|
-
assert code == 1
|
|
77
|
-
assert "dirsql: bundled `dirsql` not found" in capsys.readouterr().err
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|