Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu, macos]
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
version: ["3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: answerdotai/workflows/nbdev-ci@master
Expand Down
8 changes: 6 additions & 2 deletions nbdev/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ghapi.core import *

from datetime import datetime
from packaging.version import Version
import shutil,subprocess

from .doclinks import *
Expand Down Expand Up @@ -71,8 +72,11 @@ def changelog(self:Release,
"Create the CHANGELOG.md file, or return the proposed text if `debug` is `True`"
if not self.changefile.exists(): self.changefile.write_text("# Release notes\n\n<!-- do not remove -->\n")
marker = '<!-- do not remove -->\n'
try: self.commit_date = self.gh.repos.get_latest_release().published_at
except HTTP404NotFoundError: self.commit_date = '2000-01-01T00:00:004Z'
try: self.commit_date = (lr:=self.gh.repos.get_latest_release()).published_at
except HTTP404NotFoundError: lr,self.commit_date = None,'2000-01-01T00:00:004Z'
if lr and (Version(self.cfg.version) <= Version(lr.tag_name)):
print(f'Error: Version bump required: expected: >{lr.tag_name}, got: {self.cfg.version}.')
raise SystemExit(1)
res = f"\n## {self.cfg.version}\n"
issues = self._issue_groups()
res += '\n'.join(_issues_txt(*o) for o in zip(issues, self.groups.values()))
Expand Down
15 changes: 6 additions & 9 deletions nbs/api/18_release.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"from ghapi.core import *\n",
"\n",
"from datetime import datetime\n",
"from packaging.version import Version\n",
"import shutil,subprocess\n",
"\n",
"from nbdev.doclinks import *"
Expand Down Expand Up @@ -285,8 +286,11 @@
" \"Create the CHANGELOG.md file, or return the proposed text if `debug` is `True`\"\n",
" if not self.changefile.exists(): self.changefile.write_text(\"# Release notes\\n\\n<!-- do not remove -->\\n\")\n",
" marker = '<!-- do not remove -->\\n'\n",
" try: self.commit_date = self.gh.repos.get_latest_release().published_at\n",
" except HTTP404NotFoundError: self.commit_date = '2000-01-01T00:00:004Z'\n",
" try: self.commit_date = (lr:=self.gh.repos.get_latest_release()).published_at\n",
" except HTTP404NotFoundError: lr,self.commit_date = None,'2000-01-01T00:00:004Z'\n",
" if lr and (Version(self.cfg.version) <= Version(lr.tag_name)): \n",
" print(f'Error: Version bump required: expected: >{lr.tag_name}, got: {self.cfg.version}.')\n",
" raise SystemExit(1)\n",
" res = f\"\\n## {self.cfg.version}\\n\"\n",
" issues = self._issue_groups()\n",
" res += '\\n'.join(_issues_txt(*o) for o in zip(issues, self.groups.values()))\n",
Expand Down Expand Up @@ -867,13 +871,6 @@
"#| hide\n",
"import nbdev; nbdev.nbdev_export()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down