Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AAriam committed Oct 24, 2023
1 parent 1b7d105 commit 54092e0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespaces = true
# ----------------------------------------- Project Metadata -------------------------------------
#
[project]
version = "0.0.0.dev139"
version = "0.0.0.dev140"
name = "RepoDynamics"
dependencies = [
"packaging >= 23.2, < 24",
Expand Down
20 changes: 15 additions & 5 deletions src/repodynamics/meta/_data/schema/dev/maintainers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ properties:
minItems: 1
uniqueItems: true
items:
type: string
pattern: ^[A-Za-z0-9][A-Za-z0-9\-]*$
oneOf:
- type: string
pattern: '^[A-Za-z0-9][A-Za-z0-9\-]*$'
- type: string
pattern: '^\${{\s*.*\s*}}$'
discussion:
description: Assignees for the project discussions
type: object
Expand All @@ -45,8 +48,11 @@ properties:
minItems: 1
uniqueItems: true
items:
type: string
pattern: ^[A-Za-z0-9][A-Za-z0-9\-]*$
oneOf:
- type: string
pattern: '^[A-Za-z0-9][A-Za-z0-9\-]*$'
- type: string
pattern: '^\${{\s*.*\s*}}$'
pull:
description: Pull request assignees and reviewers of the repository
type: object
Expand All @@ -70,4 +76,8 @@ properties:
uniqueItems: true
items:
type: string
pattern: ^[A-Za-z0-9][A-Za-z0-9\-]*$
oneOf:
- type: string
pattern: '^[A-Za-z0-9][A-Za-z0-9\-]*$'
- type: string
pattern: '^\${{\s*.*\s*}}$'
19 changes: 18 additions & 1 deletion src/repodynamics/meta/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def __init__(
def generate(self) -> dict:
self._metadata["name"] = self._name()
self._metadata["authors"] = self._authors()
self._metadata["maintainer"]["list"] = self._maintainers()
self._metadata["discussion"]["categories"] = self._discussions()
self._metadata["license"] |= self._license()
self._metadata['keyword_slugs'] = self._keywords()
Expand Down Expand Up @@ -123,6 +122,9 @@ def generate(self) -> dict:

self._metadata["label"]["list"] = self.repo_labels()
self._metadata = _util.dict.fill_template(self._metadata, self._metadata)

self._metadata["maintainer"]["list"] = self._maintainers()

self._validate_relationships()
self._reader.cache_save()
return self._metadata
Expand Down Expand Up @@ -640,6 +642,21 @@ def _package_releases(self) -> dict[str, list[str | dict[str, str | list[str] |
],
}
dev_branch.append(release_info)
elif curr_branch == f"{dev_prefix}0":
release_info = {
"branch": curr_branch,
"version": "0.0.0",
"python_versions": self._metadata["package"]["python_versions"],
"os_titles": self._metadata["package"]["os_titles"],
"package_managers": ["pip"],
"cli_scripts": [
script["name"] for script in self._metadata["package"].get("cli_scripts", [])
],
"gui_scripts": [
script["name"] for script in self._metadata["package"].get("gui_scripts", [])
],
}
dev_branch.append(release_info)
releases = dev_branch + list(release_branch.values()) + ([main_branch] if main_branch else [])
releases.sort(key=lambda i: i["version"], reverse=True)
all_python_versions = []
Expand Down

0 comments on commit 54092e0

Please sign in to comment.