Skip to content

libvcs 0.33.0 (test performance improved) #453

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

Merged
merged 4 commits into from
Oct 13, 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
11 changes: 11 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ $ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force

Added Python 3.13 to package trove classifiers and CI tests.

#### libvcs 0.30.1 -> 0.33.0 (#453)

Faster, cached pytest fixtures. Upstream tests are 50% faster.

- https://github.com/vcs-python/libvcs/blob/v0.32.1/CHANGES#libvcs-0310-2024-10-12
- https://libvcs.git-pull.com/history.html#libvcs-0-32-1-2024-10-12

#### Faster tests fixtures (#453)

libvcs's included test fixtures beyond v0.31.0+ are 33%+ faster.

## vcspull v1.31.0 (2024-06-18)

### Breaking changes
Expand Down
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def xdg_config_path(
return p


@pytest.fixture()
@pytest.fixture
def config_path(
xdg_config_path: pathlib.Path,
request: pytest.FixtureRequest,
Expand All @@ -81,7 +81,7 @@ def set_xdg_config_path(
monkeypatch.setenv("XDG_CONFIG_HOME", str(xdg_config_path))


@pytest.fixture()
@pytest.fixture
def repos_path(user_path: pathlib.Path, request: pytest.FixtureRequest) -> pathlib.Path:
"""Return temporary directory for repository checkout guaranteed unique."""
path = user_path / "repos"
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ vcspull = 'vcspull:cli.cli'

[tool.poetry.dependencies]
python = "^3.9"
libvcs = "~0.30.1"
libvcs = "~0.33.0"
colorama = ">=0.3.9"
PyYAML = "^6.0"

Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __call__(
...


@pytest.fixture()
@pytest.fixture
def load_yaml(tmp_path: pathlib.Path) -> LoadYAMLFn:
"""Return a yaml loading function that uses temporary directory path."""

Expand Down
4 changes: 2 additions & 2 deletions tests/test_config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
from .helpers import EnvironmentVarGuard, load_raw, write_config


@pytest.fixture()
@pytest.fixture
def yaml_config(config_path: pathlib.Path) -> pathlib.Path:
"""Ensure and return vcspull yaml configuration file path."""
yaml_file = config_path / "repos1.yaml"
yaml_file.touch()
return yaml_file


@pytest.fixture()
@pytest.fixture
def json_config(config_path: pathlib.Path) -> pathlib.Path:
"""Ensure and return vcspull json configuration file path."""
json_file = config_path / "repos2.json"
Expand Down
8 changes: 3 additions & 5 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ def test_config_variations(
remote_list: list[str],
) -> None:
"""Test vcspull sync'ing across a variety of configurations."""
dummy_repo_name = "dummy_repo"
dummy_repo = create_git_remote_repo(remote_repo_name=dummy_repo_name)
dummy_repo = create_git_remote_repo()

config_file = write_config_remote(
config_path=tmp_path / "myrepos.yaml",
Expand Down Expand Up @@ -252,11 +251,10 @@ def test_updating_remote(
has_extra_remotes: bool,
) -> None:
"""Verify yaml configuration state is applied and reflected to local VCS clone."""
dummy_repo_name = "dummy_repo"
dummy_repo = create_git_remote_repo(remote_repo_name=dummy_repo_name)
dummy_repo = create_git_remote_repo()

mirror_name = "mirror_repo"
mirror_repo = create_git_remote_repo(remote_repo_name=mirror_name)
mirror_repo = create_git_remote_repo()

repo_parent = tmp_path / "study" / "myrepo"
repo_parent.mkdir(parents=True)
Expand Down