nbdevAuto 0.3.74__tar.gz → 0.3.76__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdevAuto
3
- Version: 0.3.74
3
+ Version: 0.3.76
4
4
  Summary: automating nbdev
5
5
  Author-email: Benedict Thekkel <bthekkel1@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -129,9 +129,9 @@ The parent Knowledge repo’s `justfile` calls [`upload`](https://bthek1.github.
129
129
 
130
130
  ## Releases
131
131
 
132
- This package publishes itself. A `publish.yaml` workflow runs after CI passes on `main` and uploads to PyPI through Trusted Publishing, so no API token is stored in the repository. It reads `__version__` out of `nbdevAuto/__init__.py` and asks PyPI whether that version already exists: a new version is published, an existing one is skipped without failing the build.
132
+ This package publishes itself. A `publish.yaml` workflow runs after CI passes on `main` and uploads to PyPI through Trusted Publishing, so no API token is stored in the repository. It reads `__version__` out of `nbdevAuto/__init__.py` and asks PyPI whether that version already exists: a new version is published, an existing one is skipped without failing the build. Once PyPI accepts it, the same workflow creates the matching GitHub release (tag `<version>`, title `v<version>`, auto-generated notes) with the built wheel and sdist attached, and skips if that release already exists.
133
133
 
134
- Because [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) bumps the patch version on every push, an ordinary commit made with [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) ships a release. A plain `git commit` leaves the version alone and the workflow skips. `gitrelease`, which bumps the minor version and creates the GitHub release and tag, stays a deliberate manual step.
134
+ Because [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) bumps the patch version on every push, an ordinary commit made with [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) ships a release. A plain `git commit` leaves the version alone and the workflow skips. `gitrelease`, which bumps the minor version and creates the GitHub release and tag, stays a deliberate manual step for minor releases.
135
135
 
136
136
  ------------------------------------------------------------------------
137
137
 
@@ -99,9 +99,9 @@ The parent Knowledge repo’s `justfile` calls [`upload`](https://bthek1.github.
99
99
 
100
100
  ## Releases
101
101
 
102
- This package publishes itself. A `publish.yaml` workflow runs after CI passes on `main` and uploads to PyPI through Trusted Publishing, so no API token is stored in the repository. It reads `__version__` out of `nbdevAuto/__init__.py` and asks PyPI whether that version already exists: a new version is published, an existing one is skipped without failing the build.
102
+ This package publishes itself. A `publish.yaml` workflow runs after CI passes on `main` and uploads to PyPI through Trusted Publishing, so no API token is stored in the repository. It reads `__version__` out of `nbdevAuto/__init__.py` and asks PyPI whether that version already exists: a new version is published, an existing one is skipped without failing the build. Once PyPI accepts it, the same workflow creates the matching GitHub release (tag `<version>`, title `v<version>`, auto-generated notes) with the built wheel and sdist attached, and skips if that release already exists.
103
103
 
104
- Because [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) bumps the patch version on every push, an ordinary commit made with [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) ships a release. A plain `git commit` leaves the version alone and the workflow skips. `gitrelease`, which bumps the minor version and creates the GitHub release and tag, stays a deliberate manual step.
104
+ Because [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) bumps the patch version on every push, an ordinary commit made with [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) ships a release. A plain `git commit` leaves the version alone and the workflow skips. `gitrelease`, which bumps the minor version and creates the GitHub release and tag, stays a deliberate manual step for minor releases.
105
105
 
106
106
  ------------------------------------------------------------------------
107
107
 
@@ -0,0 +1 @@
1
+ __version__ = "0.3.76"
@@ -354,13 +354,20 @@ def init_new(root=None, dry_run=False):
354
354
  return new
355
355
 
356
356
  def pull_root(base):
357
- "Fast-forward the superproject itself, with the advice its usual failure needs"
357
+ "Fast-forward the superproject itself, with the advice its failure actually needs"
358
358
  try: return _run("git", "-C", str(base), "pull", "--ff-only").strip().splitlines()[-1:]
359
359
  except StepFailed as e:
360
- raise StepFailed(e.cmd, e.code, f"{e.output}\n"
361
- "If it complains about submodule paths, the recorded gitlinks drifted.\n"
362
- "Discard them (the update step re-advances them anyway):\n"
363
- " git checkout -- $(git diff --name-only)") from None
360
+ # Two failures, two fixes. Discarding gitlinks does nothing for a diverged branch,
361
+ # and a rebase does nothing for drifted gitlinks.
362
+ if "Not possible to fast-forward" in e.output:
363
+ hint = ("Local main and origin/main both have new commits.\n"
364
+ "Replay yours on top of the remote, then re-run:\n"
365
+ " git pull --rebase && just sync")
366
+ else:
367
+ hint = ("If it complains about submodule paths, the recorded gitlinks drifted.\n"
368
+ "Discard them (the update step re-advances them anyway):\n"
369
+ " git checkout -- $(git diff --name-only)")
370
+ raise StepFailed(e.cmd, e.code, f"{e.output}\n{hint}") from None
364
371
 
365
372
  # %% ../nbs/04_Fleet.ipynb #8fb7bc91-d79a-4c1a-bb81-e28b3a77b118
366
373
  def fleet_update(
@@ -608,7 +615,12 @@ def fleet():
608
615
  if not picked:
609
616
  print(usage())
610
617
  sys.exit(0 if sys.argv[1:2] in ([], ["-h"], ["--help"]) else 2)
611
- return run_verb(*picked)
618
+ # `_step` has already printed the failing command's output, so a traceback on top of
619
+ # it only buries the hint. One line and the exit code are all that is left to say.
620
+ try: return run_verb(*picked)
621
+ except StepFailed as e:
622
+ console.print(f"[bold red]FAILED[/bold red] [dim]{escape(str(e))}[/dim]")
623
+ sys.exit(1)
612
624
 
613
625
  # %% ../nbs/04_Fleet.ipynb #7adb89c6-6788-4241-acff-53cb4566b5ce
614
626
  if __name__ == "__main__": fleet()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdevAuto
3
- Version: 0.3.74
3
+ Version: 0.3.76
4
4
  Summary: automating nbdev
5
5
  Author-email: Benedict Thekkel <bthekkel1@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -129,9 +129,9 @@ The parent Knowledge repo’s `justfile` calls [`upload`](https://bthek1.github.
129
129
 
130
130
  ## Releases
131
131
 
132
- This package publishes itself. A `publish.yaml` workflow runs after CI passes on `main` and uploads to PyPI through Trusted Publishing, so no API token is stored in the repository. It reads `__version__` out of `nbdevAuto/__init__.py` and asks PyPI whether that version already exists: a new version is published, an existing one is skipped without failing the build.
132
+ This package publishes itself. A `publish.yaml` workflow runs after CI passes on `main` and uploads to PyPI through Trusted Publishing, so no API token is stored in the repository. It reads `__version__` out of `nbdevAuto/__init__.py` and asks PyPI whether that version already exists: a new version is published, an existing one is skipped without failing the build. Once PyPI accepts it, the same workflow creates the matching GitHub release (tag `<version>`, title `v<version>`, auto-generated notes) with the built wheel and sdist attached, and skips if that release already exists.
133
133
 
134
- Because [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) bumps the patch version on every push, an ordinary commit made with [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) ships a release. A plain `git commit` leaves the version alone and the workflow skips. `gitrelease`, which bumps the minor version and creates the GitHub release and tag, stays a deliberate manual step.
134
+ Because [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) bumps the patch version on every push, an ordinary commit made with [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) ships a release. A plain `git commit` leaves the version alone and the workflow skips. `gitrelease`, which bumps the minor version and creates the GitHub release and tag, stays a deliberate manual step for minor releases.
135
135
 
136
136
  ------------------------------------------------------------------------
137
137
 
@@ -1 +0,0 @@
1
- __version__ = "0.3.74"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes