Skip to content

Commit de87ccf

Browse files
authored
fix: Test and CI (#3983)
1 parent 26cfdee commit de87ccf

File tree

4 files changed

+7
-54
lines changed

4 files changed

+7
-54
lines changed

.github/workflows/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
version: ${{ steps.get-version.outputs.version-without-v }}
2727

2828
publish-release:
29-
needs: [get-version]
29+
needs: [check-deep-tests, get-version]
3030
uses: ./.github/workflows/publish-release-reusable.yml
3131
with:
3232
name: ${{ needs.get-version.outputs.version }}

Scripts/prepare_release.py

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -166,51 +166,28 @@ def delete(self):
166166
class Version(NamedTuple):
167167
"""Support functions for version numbers.
168168
169-
>>> v = Version.from_string("3.8.2-xyz", datetime.date(2022, 8, 1))
170-
>>> v.short
169+
>>> v = Version.from_string("3.8.2-xyz")
170+
>>> v.string
171171
'3.8.2-xyz'
172-
>>> v.full
173-
'3.8.2.40801-xyz'
174-
>>> v.comment
175-
'Version 3.8.2, year 2018+4, month 8, day 1.'
176172
"""
177173

178174
VERSION_NUMBER_PATTERN = re.compile("^(?P<prefix>[0-9]+[.][0-9]+[.][0-9]+)(?P<identifier>-.+)?$")
179175

180176
main: str # Main version number (1.2.3)
181-
date: datetime.date # Release date
182177
identifier: str # Optional marker ("alpha")
183178

184179
@classmethod
185-
def from_string(cls, vernum: str, date: Optional[datetime.date]=None) -> Optional["Version"]:
180+
def from_string(cls, vernum: str) -> Optional["Version"]:
186181
"""Parse a short version string into a `Version` object."""
187182
if m := cls.VERSION_NUMBER_PATTERN.match(vernum):
188183
prefix, identifier = m.group("prefix", "identifier")
189-
date = date or datetime.date.today()
190-
return Version(prefix, date, identifier or "")
184+
return Version(prefix, identifier or "")
191185
return None
192186

193187
@property
194-
def year_delta(self):
195-
return self.date.year - 2018
196-
197-
@property
198-
def short(self):
188+
def string(self):
199189
return f"{self.main}{self.identifier}"
200190

201-
@property
202-
def timestamp(self):
203-
return str((self.year_delta * 100 + self.date.month) * 100 + self.date.day)
204-
205-
@property
206-
def full(self):
207-
return f"{self.main}.{self.timestamp}{self.identifier}"
208-
209-
@property
210-
def comment(self):
211-
return (f"Version {self.main}, year 2018+{self.year_delta}, " +
212-
f"month {self.date.month}, day {self.date.day}.")
213-
214191
class Release:
215192
REMOTE = "origin"
216193
NEWSFRAGMENTS_PATH = "docs/dev/news"
@@ -316,9 +293,7 @@ def _update_build_props_file(self) -> None:
316293
tail = version_element.tail
317294
version_element.clear()
318295
version_element.tail = tail
319-
version_element.text = vernum.full
320-
comment = ElementTree.Comment(vernum.comment)
321-
version_element.append(comment)
296+
version_element.text = vernum.string
322297
xml.write(self.build_props_path, encoding="utf-8")
323298

324299
def _create_release_branch(self):

Test/separate-verification/including-doo.dfy

Lines changed: 0 additions & 22 deletions
This file was deleted.
-556 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)