Skip to content

Commit

Permalink
✨🐛 FIX Our Python distribution support keys are incorrect #620
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed May 30, 2024
1 parent 8d95162 commit 1400beb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 28 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dist-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
api.github.com:443
github.com:443
- uses: OZI-Project/draft@914c0f88bb59d105ed0fc061278442565bb6860c
- uses: OZI-Project/draft@b1b9f3b412ed16a45dfe7c6f60ea8d6fbae97630
id: draft
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -145,9 +145,9 @@ jobs:
strategy:
matrix:
py:
- 'security'
- 'bugfix2'
- 'bugfix1'
- 'security2'
- 'security1'
- 'bugfix'
- 'prerelease'
fail-fast: true
max-parallel: 1
Expand All @@ -174,7 +174,7 @@ jobs:
tuf-repo-cdn.sigstore.dev:443
objects.githubusercontent.com:443
- uses: OZI-Project/release@e9a930e5aeb72027b339ffd138a261e7174d7b87
- uses: OZI-Project/release@4f6d83ec6fd65e43f393bb7797b7a8a9a882de22
id: release
with:
tag: ${{ needs.draft.outputs.tag }}
Expand Down
4 changes: 2 additions & 2 deletions ozi/spec/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class Publish(Default):
class Draft(Default):
"""Draft release patterns for packaged project."""

version: str = '0.2.0'
version: str = '0.3.0'


@dataclass(slots=True, frozen=True, eq=True)
class Release(Default):
"""Release patterns for packaged project."""

version: str = '0.5.10'
version: str = '0.6.0'


@dataclass(slots=True, frozen=True, eq=True)
Expand Down
42 changes: 21 additions & 21 deletions ozi/spec/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,31 @@ def _minor_versions(self: Self) -> list[int]:
)[:4]

@cached_property
def bugfix1_minor(self: Self) -> int:
_, _, bugfix1, *_ = self._minor_versions
return bugfix1
def bugfix_minor(self: Self) -> int:
_, _, bugfix, *_ = self._minor_versions
return bugfix

@cached_property
def bugfix1(self: Self) -> str:
return '.'.join(map(str, (self.major, self.bugfix1_minor)))
def bugfix(self: Self) -> str:
return '.'.join(map(str, (self.major, self.bugfix_minor)))

@cached_property
def bugfix2_minor(self: Self) -> int:
_, bugfix2, *_ = self._minor_versions
return bugfix2
def security1_minor(self: Self) -> int:
_, security1, *_ = self._minor_versions
return security1

@cached_property
def bugfix2(self: Self) -> str:
return '.'.join(map(str, (self.major, self.bugfix2_minor)))
def security1(self: Self) -> str:
return '.'.join(map(str, (self.major, self.security1_minor)))

@cached_property
def security_minor(self: Self) -> int:
security, *_ = self._minor_versions
return security
def security2_minor(self: Self) -> int:
security2, *_ = self._minor_versions
return security2

@cached_property
def security(self: Self) -> str:
return '.'.join(map(str, (self.major, self.security_minor)))
def security2(self: Self) -> str:
return '.'.join(map(str, (self.major, self.security2_minor)))

@cached_property
def prerelease_minor(self: Self) -> int | None:
Expand All @@ -149,15 +149,15 @@ def classifiers(self: Self) -> Sequence[tuple[str, str]]: # pragma: no cover
('Classifier', f'Programming Language :: Python :: {self.major} :: Only'),
(
'Classifier',
f'Programming Language :: Python :: {self.security}',
f'Programming Language :: Python :: {self.security2}',
),
(
'Classifier',
f'Programming Language :: Python :: {self.bugfix2}',
f'Programming Language :: Python :: {self.security1}',
),
(
'Classifier',
f'Programming Language :: Python :: {self.bugfix1}',
f'Programming Language :: Python :: {self.bugfix}',
),
]
if self.prerelease_minor: # pragma: defer to spec
Expand All @@ -181,9 +181,9 @@ class Support(Default):
metadata_version: str = '2.1'
major: str = '3'
prerelease: str = _python_support.prerelease
bugfix1: str = _python_support.bugfix1
bugfix2: str = _python_support.bugfix2
security: str = _python_support.security
bugfix: str = _python_support.bugfix
security1: str = _python_support.security1
security2: str = _python_support.security2
deprecation_schedule: Mapping[int, str] = field(
default_factory=lambda: _python_support.deprecation_schedule,
)
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ match = "release/1.10"
prerelease_token = "alpha"
prerelease = false

[tool.semantic_release.branches."release/1.11"]
match = "release/1.11"
prerelease_token = "alpha"
prerelease = false

[tool.semantic_release.commit_parser_options]
major_tags = [":boom:"]
minor_tags = [
Expand Down

0 comments on commit 1400beb

Please sign in to comment.