Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: support 3.13 #462

Merged
merged 1 commit into from
Oct 22, 2024
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/check-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.9"
dynamic = ["version"]
Expand Down
12 changes: 6 additions & 6 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""TODO: add more tests for API"""

import os
from contextlib import contextmanager
from contextlib import contextmanager, nullcontext
from time import sleep
from typing import Optional
from unittest.mock import ANY, call, patch
Expand Down Expand Up @@ -509,7 +509,7 @@ def test_if_deprecate_with_delete_and_auto_push_then_invoke_git_push_tag(
def test_if_register_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
with patch("gto.registry.git_push_tag") as mocked_git_push_tag:
with patch("gto.git_utils.TemporaryDirectory") as MockedTemporaryDirectory:
MockedTemporaryDirectory.return_value = tmp_dir
MockedTemporaryDirectory.return_value = nullcontext(tmp_dir)
gto.api.register(
repo=tests.resources.SAMPLE_REMOTE_REPO_URL,
name="model",
Expand All @@ -525,7 +525,7 @@ def test_if_register_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
def test_if_assign_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
with patch("gto.registry.git_push_tag") as mocked_git_push_tag:
with patch("gto.git_utils.TemporaryDirectory") as MockedTemporaryDirectory:
MockedTemporaryDirectory.return_value = tmp_dir
MockedTemporaryDirectory.return_value = nullcontext(tmp_dir)
gto.api.assign(
repo=tests.resources.SAMPLE_REMOTE_REPO_URL,
name="model",
Expand All @@ -550,7 +550,7 @@ def test_if_assign_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
def test_if_deprecate_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
with patch("gto.registry.git_push_tag") as mocked_git_push_tag:
with patch("gto.git_utils.TemporaryDirectory") as MockedTemporaryDirectory:
MockedTemporaryDirectory.return_value = tmp_dir
MockedTemporaryDirectory.return_value = nullcontext(tmp_dir)
gto.api.deprecate(
repo=tests.resources.SAMPLE_REMOTE_REPO_URL,
name="churn",
Expand All @@ -565,7 +565,7 @@ def test_if_deprecate_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir)
def test_if_deregister_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
with patch("gto.registry.git_push_tag") as mocked_git_push_tag:
with patch("gto.git_utils.TemporaryDirectory") as MockedTemporaryDirectory:
MockedTemporaryDirectory.return_value = tmp_dir
MockedTemporaryDirectory.return_value = nullcontext(tmp_dir)
gto.api.deregister(
repo=tests.resources.SAMPLE_REMOTE_REPO_URL,
name="churn",
Expand All @@ -581,7 +581,7 @@ def test_if_deregister_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir
def test_if_unassign_with_remote_repo_then_invoke_git_push_tag(tmp_dir: TmpDir):
with patch("gto.registry.git_push_tag") as mocked_git_push_tag:
with patch("gto.git_utils.TemporaryDirectory") as MockedTemporaryDirectory:
MockedTemporaryDirectory.return_value = tmp_dir
MockedTemporaryDirectory.return_value = nullcontext(tmp_dir)
gto.api.unassign(
repo=tests.resources.SAMPLE_REMOTE_REPO_URL,
name="churn",
Expand Down