Skip to content

Commit 1a30044

Browse files
committed
Migrating to uv
1 parent a7c65c2 commit 1a30044

3 files changed

Lines changed: 934 additions & 33 deletions

File tree

pyartifactory/objects/artifact.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,21 @@ def _download(self, artifact_path: str, local_directory_path: Optional[Path] = N
165165
logger.debug("Artifact %s successfully downloaded", local_filename)
166166
return local_file_full_path
167167

168-
def stream(self, artifact_path: str, chunk_size=8192: int) -> Iterator[bytes]:
168+
def stream(self, artifact_path: str, chunk_size: int = 8192) -> Iterator[bytes]:
169169
"""
170170
Open an Iterator stream of an artifact (file).
171171
:param artifact_path: Path to file in Artifactory
172172
:param chunk_size: Size of bytes in a chunk
173-
:return: Iterator of byte chunks
173+
:return: Iterator of byte chunks
174174
"""
175175
artifact_path = artifact_path.lstrip("/")
176176

177177
artifact_path_url = urllib.parse.quote(artifact_path)
178178
# Filter out keep-alive new chunks with a filter function
179-
return filter(lambda chunk: chunk, self._get(f"{artifact_path_url}", stream=True).iter_content(chunk_size=chunk_size))
179+
return filter(
180+
lambda chunk: chunk,
181+
self._get(f"{artifact_path_url}", stream=True).iter_content(chunk_size=chunk_size),
182+
)
180183

181184
def download(self, artifact_path: str, local_directory_path: str = ".") -> Path:
182185
"""

pyproject.toml

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "PyArtifactory"
33
version = "2.10.0"
44
description = "Typed interactions with the Jfrog Artifactory REST API"
55
authors = [
6-
"Ananias CARVALHO <carvalhoananias@hotmail.com>",
7-
"Thomas GAUDIN <thomas.gaudin@centraliens-lille.org>",
8-
"Helio Chissini de Castro <heliocastro@gmail.com"
6+
{ name = "Ananias CARVALHO", email = "carvalhoananias@hotmail.com" },
7+
{ name = "Thomas GAUDIN", email = "thomas.gaudin@centraliens-lille.org" },
8+
{ name = "Helio Chissini de Castro", email = "heliocastro@gmail.com" },
99
]
10-
license = "MIT"
10+
requires-python = "~=3.8"
1111
readme = "README.md"
12-
repository = "https://github.com/anancarv/python-artifactory"
13-
documentation = "https://github.com/anancarv/python-artifactory"
12+
license = "MIT"
1413
keywords = ["artifactory"]
1514
classifiers = [
1615
"Development Status :: 5 - Production/Stable",
@@ -23,33 +22,36 @@ classifiers = [
2322
"Programming Language :: Python :: 3.11",
2423
"Topic :: Software Development :: Libraries",
2524
"Topic :: System :: Filesystems",
26-
"Operating System :: OS Independent"
25+
"Operating System :: OS Independent",
26+
]
27+
dependencies = [
28+
"requests~=2.31",
29+
"typing_extensions>=4.7.1,<5",
30+
"pydantic[email]>=2.4.0,<3",
2731
]
2832

29-
[tool.poetry.urls]
33+
[project.urls]
34+
Repository = "https://github.com/anancarv/python-artifactory"
35+
Documentation = "https://github.com/anancarv/python-artifactory"
3036
"Bug Tracker" = "https://github.com/anancarv/python-artifactory/issues"
3137

32-
[tool.poetry.dependencies]
33-
python = "^3.8"
34-
requests = "^2.31"
35-
typing_extensions = "^4.7.1"
36-
pydantic = {extras = ["email"], version = "^2.4.0"}
37-
38-
[tool.poetry.group.dev.dependencies]
39-
ruff = "^0.0.289"
40-
pytest = "^7.4.2"
41-
black = "^23.3.0"
42-
pre-commit = "^2.9.2"
43-
responses = "^0.23.3"
44-
pytest-mock = "^2.0.0"
45-
detect-secrets = "^1.2.0"
46-
pytest-cov = "^4.1.0"
47-
mypy = "^1.5.1"
48-
typed-ast = "^1.5.5"
49-
types-urllib3 = "^1.26.25.14"
50-
types-requests = "^2.31.0.2"
51-
pytest-md = "^0.2.0"
52-
pytest-emoji = "^0.2.0"
38+
[dependency-groups]
39+
dev = [
40+
"ruff>=0.0.289,<0.0.290",
41+
"pytest>=7.4.2,<8",
42+
"black>=23.3.0,<24",
43+
"pre-commit>=2.9.2,<3",
44+
"responses>=0.23.3,<0.24",
45+
"pytest-mock>=2.0.0,<3",
46+
"detect-secrets>=1.2.0,<2",
47+
"pytest-cov>=4.1.0,<5",
48+
"mypy>=1.5.1,<2",
49+
"typed-ast>=1.5.5,<2",
50+
"types-urllib3>=1.26.25.14,<2",
51+
"types-requests>=2.31.0.2,<3",
52+
"pytest-md>=0.2.0,<0.3",
53+
"pytest-emoji>=0.2.0,<0.3",
54+
]
5355

5456
[build-system]
5557
requires = ["poetry>=0.12"]

0 commit comments

Comments
 (0)