Skip to content

Commit

Permalink
load dvc.testing.plugin for benchmarks (#65)
Browse files Browse the repository at this point in the history
* load dvc.testing.plugin for benchmarks

* bring back benchmarks

* s/dvc-s3/dvc_s3
  • Loading branch information
skshetry authored Mar 1, 2024
1 parent 9b44fd3 commit 16016c7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: run benchmarks
timeout-minutes: 180
run: pytest --dist no --benchmark-save benchmarks-s3 --benchmark-group-by func --dvc-revs main,2.45.0,2.41.1,2.40.0,2.39.0,2.18.1,2.11.0 --size ${DATASET} dvc_s3/tests/benchmarks.py --dvc-install-deps s3
run: pytest --dist no --benchmark-save benchmarks-s3 --benchmark-group-by func --dvc-revs main,2.45.0,2.41.1,2.40.0,2.39.0,2.18.1,2.11.0 --dataset ${DATASET} dvc_s3/tests/benchmarks.py --dvc-install-deps s3

- name: upload raw results
uses: actions/upload-artifact@v3
Expand Down
3 changes: 3 additions & 0 deletions dvc_s3/tests/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# pylint: disable=unused-import
from dvc.testing.benchmarks.cli.stories.use_cases.test_sharing import (
test_sharing as test_sharing_s3, # noqa: F401
)
2 changes: 1 addition & 1 deletion dvc_s3/tests/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def is_dir(self):
def exists(self):
return self.is_file() or self.is_dir()

def mkdir(self, mode=0o777, parents=False, exist_ok=False): # noqa: ARG002
def mkdir(self, mode=0o777, parents=False, exist_ok=False):
assert mode == 0o777
assert parents

Expand Down
2 changes: 1 addition & 1 deletion dvc_s3/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _make_s3():

@pytest.fixture
# pylint: disable-next=redefined-outer-name,unused-argument
def make_s3_version_aware(versioning, tmp_s3_path, s3_server): # noqa: ARG001
def make_s3_version_aware(versioning, tmp_s3_path, s3_server):
def _make_s3():
return FakeS3(str(tmp_s3_path).rstrip("/"), config=s3_server)

Expand Down
4 changes: 2 additions & 2 deletions dvc_s3/tests/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
prefix = "some/prefix"
url = f"s3://{bucket_name}/{prefix}"
key_id = "key-id"
key_secret = "key-secret" # noqa: S105
session_token = "session-token" # noqa: S105
key_secret = "key-secret"
session_token = "session-token"


@pytest.fixture(autouse=True, name="grants")
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Source = "https://github.com/iterative/dvc-s3"

[tool.pytest.ini_options]
log_level = "debug"
addopts = "-ra"
addopts = "-ra -pdvc.testing.plugin"
markers = [
"needs_internet: Might need network access for the tests",
]
Expand Down Expand Up @@ -115,4 +115,4 @@ extend-ignore-names = ["M", "SCM"]
max-args = 10

[tool.ruff.lint.per-file-ignores]
"dvc-s3/tests/**" = ["S", "ARG001", "ARG002", "TRY002", "TRY301"]
"dvc_s3/tests/**" = ["S", "ARG001", "ARG002", "TRY002", "TRY301"]

0 comments on commit 16016c7

Please sign in to comment.