Skip to content

Commit

Permalink
ci: support 3.13 (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Oct 22, 2024
1 parent 4c3f6c7 commit eb9b68e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
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

0 comments on commit eb9b68e

Please # to comment.