Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrp committed Feb 25, 2025
1 parent ccd8048 commit 0e65874
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 453 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python 3.12.1
python 3.13
660 changes: 241 additions & 419 deletions poetry.lock

Large diffs are not rendered by default.

33 changes: 10 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "releasy_lib"
version = "4.2.3"
version = "5.0.0-alpha.1"
description = "A library to mine release data"
authors = ["Felipe Curty <felipecrp@gmail.com>"]
license = "MIT"
Expand All @@ -11,32 +11,19 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.8"
pygit2 = "^1.11.1"
pyyaml = "^6.0"
python-dateutil = "^2.8.2"
python = "^3.13"
pygit2 = "^1.17.0"
pyyaml = "^6.0.2"
python-dateutil = "^2.9.0"


[tool.poetry.group.dev.dependencies]
pylint = "^2.16.2"
pytest = "^8.3.2"
pytest-cov = "^5.0.0"
pytest-profiling = "^1.7.0"
pylint = "^3.3.4"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
pytest-profiling = "^1.8.1"
pytest-pyspec = "^0.10.0"

[tool.pytest.ini_options]
addopts = "--pyspec"
python_classes = [
"Test",
"describe_*",
"with_*"
]
markers = [
"local: tests that only run local"
]

[tool.coverage.report]
omit = [ "tests/*" ]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
4 changes: 2 additions & 2 deletions releasy/miner/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def create_reference(
developer = f'{tag.tagger.name} <{tag.tagger.email}>'
description = tag.message
commit = tag.peel(pygit2.Commit)
change_refs = [str(commit.oid)] if commit else []
change_refs = [str(commit.id)] if commit else []
case pygit2.Commit() as commit:
timestamp = get_time(commit.committer)
developer = f'{commit.committer.name} <{commit.committer.email}>'
description = commit.message
change_refs = [str(commit.oid)]
change_refs = [str(commit.id)]
case _:
return None
return ReleaseReference(tag_ref.shorthand, timestamp, developer, description,
Expand Down
14 changes: 7 additions & 7 deletions releasy/old/repository_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ def fetch_tags(self) -> Set[Tag]:

def _get_tag(self, rtag: pygit2.Reference) -> Tag:
ref = self.git.get(rtag.target)
if ref.type == pygit2.GIT_OBJ_COMMIT:
commit = self.repository.get_commit(ref.hex)
if ref.type == pygit2.GIT_OBJECT_COMMIT:
commit = self.repository.get_commit(ref.id)
#TODO time
tag = Tag(self.repository, rtag.shorthand, commit)
return tag
elif ref.type == pygit2.GIT_OBJ_TAG: # annotatted tag
elif ref.type == pygit2.GIT_OBJECT_TAG: # annotatted tag
peel = rtag.peel()
if peel.type == pygit2.GIT_OBJ_COMMIT:
commit = self.repository.get_commit(rtag.peel().hex)
if peel.type == pygit2.GIT_OBJECT_COMMIT:
commit = self.repository.get_commit(rtag.peel().id)
rtag_ref: pygit2.Tag = ref
try:
message = rtag_ref.message
Expand Down Expand Up @@ -72,7 +72,7 @@ def fetch_commit(self, commit_id: str) -> Commit:

commit = Commit(
self.repository,
rcommit.hex,
rcommit.id,
message,
f"{rcommit.committer.name} <{rcommit.committer.email}>",
committer_time,
Expand All @@ -84,7 +84,7 @@ def fetch_commit_parents(self, commit: Commit) -> CommitSet:
commit_ref: pygit2.Commit = self.commit_cache.fetch_commit(commit.id)
parents = CommitSet()
for parent_ref in commit_ref.parents:
parent = self.repository.get_commit(parent_ref.hex)
parent = self.repository.get_commit(parent_ref.id)
parents.add(parent)
return parents

Expand Down
2 changes: 1 addition & 1 deletion tests/old/test_repository_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from releasy.old.repository_git import GitRepository

@pytest.mark.local
# @pytest.mark.local
class describe_git_repository:
@pytest.fixture(autouse=True)
def init(self):
Expand Down

0 comments on commit 0e65874

Please sign in to comment.