nepher-cli 0.2.0__tar.gz → 0.2.2__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 (26) hide show
  1. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/PKG-INFO +1 -1
  2. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/pyproject.toml +1 -1
  3. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/commands/envhub.py +18 -3
  4. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/.gitignore +0 -0
  5. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/README.md +0 -0
  6. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/__init__.py +0 -0
  7. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/__main__.py +0 -0
  8. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/cli.py +0 -0
  9. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/commands/__init__.py +0 -0
  10. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/commands/account.py +0 -0
  11. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/commands/hackathon.py +0 -0
  12. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/commands/simstore.py +0 -0
  13. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/commands/tournament.py +0 -0
  14. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/config.py +0 -0
  15. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/core/__init__.py +0 -0
  16. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/core/credentials.py +0 -0
  17. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/core/http.py +0 -0
  18. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/envhub/__init__.py +0 -0
  19. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/envhub/cache.py +0 -0
  20. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/envhub/config.py +0 -0
  21. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/py.typed +0 -0
  22. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/tournament/__init__.py +0 -0
  23. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/tournament/agent_check.py +0 -0
  24. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/tournament/api.py +0 -0
  25. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/tournament/packer.py +0 -0
  26. {nepher_cli-0.2.0 → nepher_cli-0.2.2}/src/nepher_cli/tournament/wallet.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nepher-cli
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: npcli — unified Nepher command-line interface for accounts, hackathons, EnvHub, tournaments, and SimStore
5
5
  Project-URL: Homepage, https://github.com/nepher-ai/nepher-cli
6
6
  Author: Nepher
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "nepher-cli"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "npcli — unified Nepher command-line interface for accounts, hackathons, EnvHub, tournaments, and SimStore"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -147,11 +147,22 @@ def envhub_list(
147
147
  @click.argument("env_id")
148
148
  @click.option("--cache-dir", type=click.Path(), default=None, help="Override local cache directory.")
149
149
  @click.option("--force", is_flag=True, help="Re-download even if already cached.")
150
- @click.option("--api-key", "api_key", default=None, envvar="NEPHER_API_KEY")
150
+ @click.option(
151
+ "--api-key",
152
+ "api_key",
153
+ default=None,
154
+ envvar="NEPHER_API_KEY",
155
+ help="API key for authentication. Sent directly as X-API-Key so the "
156
+ "download succeeds regardless of any cached access-token expiry.",
157
+ )
151
158
  def envhub_download(env_id: str, cache_dir: str | None, force: bool, api_key: str | None) -> None:
152
159
  """Download an environment bundle and cache it locally.
153
160
 
154
161
  The bundle is extracted to ~/.nepher/cache/<env_id>/ by default.
162
+
163
+ When ``--api-key`` (or the ``NEPHER_API_KEY`` env var) is provided, the key
164
+ is sent directly to EnvHub, which verifies it against account-backend — the
165
+ download therefore works even if a previously cached JWT has expired.
155
166
  """
156
167
  cache_root = resolve_cache_dir(cache_dir)
157
168
  env_cache = cache_root / env_id
@@ -247,10 +258,14 @@ def envhub_upload(path: str, category: str, benchmark: bool, force: bool, thumbn
247
258
  data_fields["force"] = "true"
248
259
 
249
260
  with open(upload_path, "rb") as f:
250
- files: dict[str, Any] = {"file": (upload_path.name, f, "application/zip")}
261
+ files: dict[str, Any] = {"bundle": (upload_path.name, f, "application/zip")}
251
262
  if thumbnail:
252
263
  thumb_path = Path(thumbnail)
253
- files["thumbnail"] = (thumb_path.name, open(thumbnail, "rb"), "image/jpeg")
264
+ suffix = thumb_path.suffix.lower()
265
+ content_type = "image/png" if suffix == ".png" else ("image/webp" if suffix == ".webp" else "image/jpeg")
266
+ files["thumbnail"] = (thumb_path.name, open(thumbnail, "rb"), content_type)
267
+
268
+ data_fields["duplicate_policy"] = "reject"
254
269
 
255
270
  try:
256
271
  r = httpx.post(
File without changes
File without changes