insightfactory-cli 1.0.0.dev4__tar.gz → 1.0.1__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 (49) hide show
  1. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/.github/workflows/release.yml +3 -1
  2. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/CLAUDE.md +8 -4
  3. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/PKG-INFO +33 -15
  4. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/README.md +32 -14
  5. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/pyproject.toml +1 -1
  6. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_cli.py +6 -1
  7. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/uv.lock +1 -1
  8. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/.github/workflows/ci.yml +0 -0
  9. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/.github/workflows/claude.yml +0 -0
  10. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/.gitignore +0 -0
  11. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/.python-version +0 -0
  12. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/AGENTS.md +0 -0
  13. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/__init__.py +0 -0
  14. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/__main__.py +0 -0
  15. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/cache.py +0 -0
  16. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/cli.py +0 -0
  17. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/colour.py +0 -0
  18. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/__init__.py +0 -0
  19. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/api.py +0 -0
  20. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/config.py +0 -0
  21. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/login.py +0 -0
  22. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/logout.py +0 -0
  23. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/profiles.py +0 -0
  24. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/set_token.py +0 -0
  25. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/commands/token.py +0 -0
  26. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/config.py +0 -0
  27. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/constants.py +0 -0
  28. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/http.py +0 -0
  29. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/main.py +0 -0
  30. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/oauth.py +0 -0
  31. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/src/if_cli/runtime.py +0 -0
  32. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/__init__.py +0 -0
  33. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/cache_writer.py +0 -0
  34. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/conftest.py +0 -0
  35. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/helpers.py +0 -0
  36. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/servers.py +0 -0
  37. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_api.py +0 -0
  38. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_api_command.py +0 -0
  39. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_cache.py +0 -0
  40. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_config.py +0 -0
  41. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_config_command.py +0 -0
  42. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_login.py +0 -0
  43. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_oauth.py +0 -0
  44. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_oauth_flow.py +0 -0
  45. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_profiles.py +0 -0
  46. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_programmatic_api.py +0 -0
  47. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_runtime.py +0 -0
  48. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_set_token.py +0 -0
  49. {insightfactory_cli-1.0.0.dev4 → insightfactory_cli-1.0.1}/tests/test_token.py +0 -0
@@ -1,6 +1,8 @@
1
1
  name: release
2
2
 
3
- # CD: merge to develop/main (or a v* tag) publishes to public PyPI.
3
+ # CD: a push to develop publishes a `.dev<run_number>` pre-release; a `v*` tag
4
+ # publishes the release. A merge to main runs CI and publishes nothing -- see
5
+ # if_s_insightfactory_cli.yml for why releasing is a deliberate tag push.
4
6
  # Verify + build live in insightfactory-ai/if_sre_github_actions
5
7
  # (if_s_insightfactory_cli.yml). The publish job stays here because PyPI
6
8
  # Trusted Publishing is registered for this repository, workflow `release.yml`,
@@ -22,7 +22,11 @@ uv run ty check
22
22
  Node CLI (`~/.insightfactory`, `INSIGHTFACTORY_CONFIG_DIR` override).
23
23
  - Do not commit credentials, access tokens, refresh tokens, or client secrets.
24
24
  - Test fixtures use only neutral hostnames (`factory.example`).
25
- - Do not publish to PyPI or create release tags from a developer machine;
26
- merges to `develop` / `main` (and optional `v*` tags) publish via the
27
- reusable workflow in `if_sre_github_actions` plus the OIDC job in
28
- `.github/workflows/release.yml`.
25
+ - Do not publish to PyPI from a developer machine. Publishing happens in CI: the
26
+ reusable workflow in `if_sre_github_actions` builds and stages, and the OIDC job
27
+ in `.github/workflows/release.yml` uploads.
28
+ - **A release is a pushed `v*` tag, not a merge.** Merging to `main` runs CI and
29
+ publishes nothing; pushing `v<version>` publishes that version, and the tag must
30
+ match `pyproject.toml`. Pushing `develop` publishes a `.dev{run_number}`
31
+ pre-release. Creating the release tag is a deliberate human act — do not create
32
+ or push one unless asked to cut a release.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: insightfactory-cli
3
- Version: 1.0.0.dev4
3
+ Version: 1.0.1
4
4
  Summary: Profile-based authentication CLI for the InsightFactory Interfaces API
5
5
  Project-URL: Homepage, https://github.com/insightfactory-ai/insightfactory-cli
6
6
  Project-URL: Repository, https://github.com/insightfactory-ai/insightfactory-cli
@@ -212,12 +212,16 @@ Python 3.10 or newer is required. Runtime code is stdlib-only.
212
212
 
213
213
  ## Release
214
214
 
215
- Publishing is automatic from GitHub Actions on merge. Verify and build live in
216
- the reusable workflow
215
+ **A release is cut by pushing a tag, not by merging.** Merging to `main` runs CI and
216
+ publishes nothing.
217
+
218
+ ```bash
219
+ git tag v1.0.1 && git push origin v1.0.1
220
+ ```
221
+
222
+ Verify and build live in the reusable workflow
217
223
  [`if_s_insightfactory_cli.yml`](https://github.com/insightfactory-ai/if_sre_github_actions/blob/main/.github/workflows/if_s_insightfactory_cli.yml)
218
- in `insightfactory-ai/if_sre_github_actions`
219
- ([PR #300](https://github.com/insightfactory-ai/if_sre_github_actions/pull/300)
220
- must merge before these stubs go green). This repository's
224
+ in `insightfactory-ai/if_sre_github_actions`. This repository's
221
225
  `.github/workflows/release.yml` keeps only the OIDC publish job, because PyPI
222
226
  Trusted Publishing is registered for **this** repo, workflow `release.yml`, and
223
227
  environment `pypi` — a reusable workflow cannot be registered.
@@ -228,24 +232,38 @@ the reusable workflow and uploads it with `pypa/gh-action-pypi-publish`.
228
232
 
229
233
  | Trigger | Published version | PyPI role |
230
234
  |---|---|---|
231
- | Push / merge to `develop` | `1.0.0.dev{N}` | pre-release (`pip install --pre`) |
232
- | Push / merge to `main` | `1.0.0` (the version in `pyproject.toml`) | latest |
233
- | Push of a `v*` tag | same as `main` | retry / explicit cut of that version |
235
+ | Push / merge to `develop` | `1.0.1.dev{N}` | pre-release (`pip install --pre`) |
236
+ | Push of a `v*` tag | the version in `pyproject.toml`, which the tag must match | latest |
237
+ | Merge to `main` | nothing CI only | |
234
238
 
235
239
  `N` is `github.run_number` of the reusable workflow: a per-workflow integer
236
240
  that goes up on every run and stays the same across re-runs of that run (so a
237
241
  failed publish can be retried under the same version). It does not depend on
238
- git history or clone depth. After a successful `main` publish, bump `version`
239
- in `pyproject.toml` on `develop` so later `.devN` builds sort *after* what just
240
- landed; PEP 440 puts `1.0.0.devN` before `1.0.0`. Because of that ordering, a
242
+ git history or clone depth. After a successful release, bump `version` in
243
+ `pyproject.toml` on `develop` so later `.devN` builds sort *after* what just
244
+ landed; PEP 440 puts `1.0.1.devN` before `1.0.1`. Because of that ordering, a
241
245
  dependency spec of `insightfactory-cli>=1.0.0` does not match develop-channel
242
246
  `.devN` builds; an in-process consumer that wants them must specify a
243
247
  pre-release-bearing spec such as `insightfactory-cli>=1.0.0.dev0` (which also
244
248
  matches the final `1.0.0` release).
245
249
 
246
- A version that is already on PyPI is skipped rather than failing, so a second
247
- push to `main` (or a `v*` tag for the same version) is a no-op. A `v*` tag
248
- whose name does not match `pyproject.toml` fails before publishing.
250
+ A `v*` tag whose name does not match `pyproject.toml` fails before publishing.
251
+
252
+ The two channels treat an already-published version differently, on purpose:
253
+
254
+ - **Release channel (a tag):** publishing fails, naming the fix. A tag is a request to
255
+ release that version; if it cannot be honoured, the run must say so rather than report
256
+ success having published nothing. (git also refuses to push a tag that already exists,
257
+ so this is hard to reach.)
258
+ - **Dev channel (`develop`):** publishing is skipped quietly. `.dev{N}` uses
259
+ `github.run_number`, which is stable across re-runs of one run, so an already-present
260
+ version there can only mean a re-run of a run that already published — real idempotency,
261
+ not a swallowed mistake.
262
+
263
+ This split is why releasing moved off `main`. While a merge was the trigger, an
264
+ already-published version *had* to be tolerated as a no-op for merges to stay green — so a
265
+ merge that released nothing looked exactly like one that released, and a forgotten version
266
+ bump shipped nothing silently.
249
267
 
250
268
  ## Differences from the Node CLI
251
269
 
@@ -196,12 +196,16 @@ Python 3.10 or newer is required. Runtime code is stdlib-only.
196
196
 
197
197
  ## Release
198
198
 
199
- Publishing is automatic from GitHub Actions on merge. Verify and build live in
200
- the reusable workflow
199
+ **A release is cut by pushing a tag, not by merging.** Merging to `main` runs CI and
200
+ publishes nothing.
201
+
202
+ ```bash
203
+ git tag v1.0.1 && git push origin v1.0.1
204
+ ```
205
+
206
+ Verify and build live in the reusable workflow
201
207
  [`if_s_insightfactory_cli.yml`](https://github.com/insightfactory-ai/if_sre_github_actions/blob/main/.github/workflows/if_s_insightfactory_cli.yml)
202
- in `insightfactory-ai/if_sre_github_actions`
203
- ([PR #300](https://github.com/insightfactory-ai/if_sre_github_actions/pull/300)
204
- must merge before these stubs go green). This repository's
208
+ in `insightfactory-ai/if_sre_github_actions`. This repository's
205
209
  `.github/workflows/release.yml` keeps only the OIDC publish job, because PyPI
206
210
  Trusted Publishing is registered for **this** repo, workflow `release.yml`, and
207
211
  environment `pypi` — a reusable workflow cannot be registered.
@@ -212,24 +216,38 @@ the reusable workflow and uploads it with `pypa/gh-action-pypi-publish`.
212
216
 
213
217
  | Trigger | Published version | PyPI role |
214
218
  |---|---|---|
215
- | Push / merge to `develop` | `1.0.0.dev{N}` | pre-release (`pip install --pre`) |
216
- | Push / merge to `main` | `1.0.0` (the version in `pyproject.toml`) | latest |
217
- | Push of a `v*` tag | same as `main` | retry / explicit cut of that version |
219
+ | Push / merge to `develop` | `1.0.1.dev{N}` | pre-release (`pip install --pre`) |
220
+ | Push of a `v*` tag | the version in `pyproject.toml`, which the tag must match | latest |
221
+ | Merge to `main` | nothing CI only | |
218
222
 
219
223
  `N` is `github.run_number` of the reusable workflow: a per-workflow integer
220
224
  that goes up on every run and stays the same across re-runs of that run (so a
221
225
  failed publish can be retried under the same version). It does not depend on
222
- git history or clone depth. After a successful `main` publish, bump `version`
223
- in `pyproject.toml` on `develop` so later `.devN` builds sort *after* what just
224
- landed; PEP 440 puts `1.0.0.devN` before `1.0.0`. Because of that ordering, a
226
+ git history or clone depth. After a successful release, bump `version` in
227
+ `pyproject.toml` on `develop` so later `.devN` builds sort *after* what just
228
+ landed; PEP 440 puts `1.0.1.devN` before `1.0.1`. Because of that ordering, a
225
229
  dependency spec of `insightfactory-cli>=1.0.0` does not match develop-channel
226
230
  `.devN` builds; an in-process consumer that wants them must specify a
227
231
  pre-release-bearing spec such as `insightfactory-cli>=1.0.0.dev0` (which also
228
232
  matches the final `1.0.0` release).
229
233
 
230
- A version that is already on PyPI is skipped rather than failing, so a second
231
- push to `main` (or a `v*` tag for the same version) is a no-op. A `v*` tag
232
- whose name does not match `pyproject.toml` fails before publishing.
234
+ A `v*` tag whose name does not match `pyproject.toml` fails before publishing.
235
+
236
+ The two channels treat an already-published version differently, on purpose:
237
+
238
+ - **Release channel (a tag):** publishing fails, naming the fix. A tag is a request to
239
+ release that version; if it cannot be honoured, the run must say so rather than report
240
+ success having published nothing. (git also refuses to push a tag that already exists,
241
+ so this is hard to reach.)
242
+ - **Dev channel (`develop`):** publishing is skipped quietly. `.dev{N}` uses
243
+ `github.run_number`, which is stable across re-runs of one run, so an already-present
244
+ version there can only mean a re-run of a run that already published — real idempotency,
245
+ not a swallowed mistake.
246
+
247
+ This split is why releasing moved off `main`. While a merge was the trigger, an
248
+ already-published version *had* to be tolerated as a no-op for merges to stay green — so a
249
+ merge that released nothing looked exactly like one that released, and a forgotten version
250
+ bump shipped nothing silently.
233
251
 
234
252
  ## Differences from the Node CLI
235
253
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "insightfactory-cli"
3
- version = "1.0.0.dev4"
3
+ version = "1.0.1"
4
4
  description = "Profile-based authentication CLI for the InsightFactory Interfaces API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import json
4
4
  import shutil
5
+ from importlib.metadata import version
5
6
  from pathlib import Path
6
7
 
7
8
  import pytest
@@ -112,7 +113,11 @@ def test_an_unknown_command_fails_with_the_command_reference():
112
113
  def test_version_prints_the_package_version():
113
114
  result = run_cli(["--version"])
114
115
  assert result.returncode == 0
115
- assert result.stdout.strip() == "1.0.0"
116
+ # Compare against the installed metadata, which is the same source main.py
117
+ # reads, rather than a literal. The property under test is that --version
118
+ # reports the package's own version -- not what that version happens to be --
119
+ # so a release bump should not have to edit this test.
120
+ assert result.stdout.strip() == version("insightfactory-cli")
116
121
 
117
122
 
118
123
  def test_login_parses_profile_host_and_no_browser_flags():
@@ -34,7 +34,7 @@ wheels = [
34
34
 
35
35
  [[package]]
36
36
  name = "insightfactory-cli"
37
- version = "1.0.0"
37
+ version = "1.0.1"
38
38
  source = { editable = "." }
39
39
 
40
40
  [package.dev-dependencies]