nbdevAuto 0.3.79__tar.gz → 0.3.81__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.79
3
+ Version: 0.3.81
4
4
  Summary: automating nbdev
5
5
  Author-email: Benedict Thekkel <bthekkel1@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -48,6 +48,8 @@ pip install 'nbdevAuto[gh]' # also installs githubkit, which `ghstatus` needs
48
48
 
49
49
  Requires Python 3.10 or newer.
50
50
 
51
+ ------------------------------------------------------------------------
52
+
51
53
  ## Use
52
54
 
53
55
  Every exported function is also a console script, so the common case is a bare word in the terminal at the root of an nbdev project:
@@ -127,6 +129,8 @@ The parent Knowledge repo’s `justfile` calls [`upload`](https://bthek1.github.
127
129
 
128
130
  [`ghstatus`](https://bthek1.github.io/nbdevAuto/github.html#ghstatus) is the other half of that loop. [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) pushes to 19 repos and then goes blind: whether each repo’s CI passed and whether its Pages deploy actually landed is invisible from the terminal. `just ci`, `just report` and `just audit` in the parent repo are all thin wrappers around this one command, which answers for the whole fleet in about 1.5 seconds instead of 19 browser tabs.
129
131
 
132
+ ------------------------------------------------------------------------
133
+
130
134
  ## Releases
131
135
 
132
136
  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.
@@ -18,6 +18,8 @@ pip install 'nbdevAuto[gh]' # also installs githubkit, which `ghstatus` needs
18
18
 
19
19
  Requires Python 3.10 or newer.
20
20
 
21
+ ------------------------------------------------------------------------
22
+
21
23
  ## Use
22
24
 
23
25
  Every exported function is also a console script, so the common case is a bare word in the terminal at the root of an nbdev project:
@@ -97,6 +99,8 @@ The parent Knowledge repo’s `justfile` calls [`upload`](https://bthek1.github.
97
99
 
98
100
  [`ghstatus`](https://bthek1.github.io/nbdevAuto/github.html#ghstatus) is the other half of that loop. [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) pushes to 19 repos and then goes blind: whether each repo’s CI passed and whether its Pages deploy actually landed is invisible from the terminal. `just ci`, `just report` and `just audit` in the parent repo are all thin wrappers around this one command, which answers for the whole fleet in about 1.5 seconds instead of 19 browser tabs.
99
101
 
102
+ ------------------------------------------------------------------------
103
+
100
104
  ## Releases
101
105
 
102
106
  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.
@@ -0,0 +1 @@
1
+ __version__ = "0.3.81"
@@ -50,6 +50,7 @@ d = { 'settings': { 'branch': 'main',
50
50
  'nbdevAuto.fleet._public_notebooks': ('fleet.html#_public_notebooks', 'nbdevAuto/fleet.py'),
51
51
  'nbdevAuto.fleet._render': ('fleet.html#_render', 'nbdevAuto/fleet.py'),
52
52
  'nbdevAuto.fleet._src': ('fleet.html#_src', 'nbdevAuto/fleet.py'),
53
+ 'nbdevAuto.fleet._unfenced': ('fleet.html#_unfenced', 'nbdevAuto/fleet.py'),
53
54
  'nbdevAuto.fleet.ahead_of_remote': ('fleet.html#ahead_of_remote', 'nbdevAuto/fleet.py'),
54
55
  'nbdevAuto.fleet.copy_one': ('fleet.html#copy_one', 'nbdevAuto/fleet.py'),
55
56
  'nbdevAuto.fleet.dirty_submodules': ('fleet.html#dirty_submodules', 'nbdevAuto/fleet.py'),
@@ -604,7 +604,7 @@ NB_RULES = [
604
604
  ("no_trailing_rule", "## cell without a trailing ---", 7),
605
605
  ]
606
606
  # Matched case-insensitively against the `##` headings, as substrings, so "Datasets"
607
- # also accepts "Datasets and splits". From dl-task-notebook-format.instructions.md.
607
+ # also accepts "Datasets and splits". From dl-task-notebook-format.md.
608
608
  DLTASK_SECTIONS = ["What is", "Real-world use cases", "Evaluation", "Datasets",
609
609
  "Setup", "benchmark", "Common frameworks", "Going further"]
610
610
  DLTASK_NOT_TASKS = ("Theory", "Frameworks")
@@ -617,6 +617,18 @@ def _src(c):
617
617
  s = c.get("source", "")
618
618
  return "".join(s) if isinstance(s, list) else s
619
619
 
620
+ def _unfenced(md):
621
+ "Markdown with the lines inside ``` or ~~~ fences blanked out."
622
+ out, fence = [], None
623
+ for line in md.split("\n"):
624
+ m = re.match(r"^\s*(```+|~~~+)", line)
625
+ if m and (fence is None or m.group(1)[0] == fence[0] and len(m.group(1)) >= len(fence)):
626
+ fence = None if fence else m.group(1)
627
+ out.append("")
628
+ else:
629
+ out.append("" if fence else line)
630
+ return "\n".join(out)
631
+
620
632
  def lint_notebook(path, sub=""):
621
633
  """{rule key: count} for one notebook. A count is the number of offending items
622
634
  (diagrams, characters, cells); 1 for a yes/no rule. Empty means it meets the standard."""
@@ -646,9 +658,14 @@ def lint_notebook(path, sub=""):
646
658
  if not exports and "skip_showdoc: true" not in first: out["no_skip_showdoc"] = 1
647
659
 
648
660
  # The title cell is checked above; a `##` packed into it is a title problem first.
649
- multi = sum(len(re.findall(r"^##\s", m, re.M)) > 1 for m in md[1:])
650
- trail = sum(bool(re.search(r"^##\s", m, re.M)) and not m.rstrip().endswith("---")
651
- for m in md[1:])
661
+ # A `## ` line inside a code fence is an example, not a heading (15_Markdown teaches them).
662
+ h2s = [len(re.findall(r"^##\s", _unfenced(m), re.M)) for m in md[1:]]
663
+ multi = sum(n > 1 for n in h2s)
664
+ # A heading-only cell (its content is in the cells below) takes no rule: the `---`
665
+ # would render directly under the heading, doubling its underline.
666
+ bare = [not [l for l in m.strip().splitlines()[1:] if l.strip()] for m in md[1:]]
667
+ trail = sum(n > 0 and not b and not m.rstrip().endswith("---")
668
+ for n, b, m in zip(h2s, bare, md[1:]))
652
669
  if multi: out["multi_h2"] = multi
653
670
  if trail: out["no_trailing_rule"] = trail
654
671
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdevAuto
3
- Version: 0.3.79
3
+ Version: 0.3.81
4
4
  Summary: automating nbdev
5
5
  Author-email: Benedict Thekkel <bthekkel1@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -48,6 +48,8 @@ pip install 'nbdevAuto[gh]' # also installs githubkit, which `ghstatus` needs
48
48
 
49
49
  Requires Python 3.10 or newer.
50
50
 
51
+ ------------------------------------------------------------------------
52
+
51
53
  ## Use
52
54
 
53
55
  Every exported function is also a console script, so the common case is a bare word in the terminal at the root of an nbdev project:
@@ -127,6 +129,8 @@ The parent Knowledge repo’s `justfile` calls [`upload`](https://bthek1.github.
127
129
 
128
130
  [`ghstatus`](https://bthek1.github.io/nbdevAuto/github.html#ghstatus) is the other half of that loop. [`upload`](https://bthek1.github.io/nbdevAuto/automate.html#upload) pushes to 19 repos and then goes blind: whether each repo’s CI passed and whether its Pages deploy actually landed is invisible from the terminal. `just ci`, `just report` and `just audit` in the parent repo are all thin wrappers around this one command, which answers for the whole fleet in about 1.5 seconds instead of 19 browser tabs.
129
131
 
132
+ ------------------------------------------------------------------------
133
+
130
134
  ## Releases
131
135
 
132
136
  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.
@@ -1 +0,0 @@
1
- __version__ = "0.3.79"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes