Skip to content

Commit

Permalink
Set up package
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Gorbil <[email protected]>
Co-authored-by: Kseniya Shaydurova <[email protected]>
Co-authored-by: Andrey Otto <[email protected]>
Co-authored-by: Nikita Azanov <[email protected]>
Co-authored-by: Shirokov Sergey <[email protected]>
Co-authored-by: Leonid Malin <[email protected]>
  • Loading branch information
7 people committed Apr 16, 2024
1 parent e28b691 commit 92d24e1
Show file tree
Hide file tree
Showing 16 changed files with 1,108 additions and 26 deletions.
132 changes: 113 additions & 19 deletions poetry.lock

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

34 changes: 27 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ packages = [
{ include = "saritasa_s3_tools" }
]

[tool.poetry.plugins.pytest11]
saritasa_s3_tools_plugin = "saritasa_s3_tools.testing.plugin"

[tool.poetry.dependencies]
python = "^3.11"
# The AWS SDK for Python
Expand All @@ -30,6 +33,13 @@ boto3 = "*"
# Mypy stubs for boto3
# https://pypi.org/project/boto3-stubs/#how-to-install
boto3-stubs = {extras=["s3"], version = "*"}
# AnyIO is an asynchronous networking and concurrency library
# that works on top of either asyncio or trio.
# https://anyio.readthedocs.io/en/stable/
anyio = {version= "<5", optional = true}

[tool.poetry.extras]
async = ["anyio"]


[tool.poetry.group.dev.dependencies]
Expand All @@ -55,9 +65,14 @@ mypy = "^1.9.0"
pytest = "^8.1.1"
# To prettify pytest output
pytest-sugar = "^1.0.0"
# Coverage plugin for pytest.
# https://github.com/pytest-dev/pytest-cov
pytest-cov = "^5.0.0"
# Coverage.py is a tool for measuring code coverage of Python programs.
# It monitors your program, noting which parts of the code have been executed,
# then analyzes the source to identify code that could have been executed but was not.
# https://coverage.readthedocs.io/en/latest/
coverage = "^7.4.4"
# HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.
# https://www.python-httpx.org/
httpx = {version ="^0.27.0"}

[build-system]
requires = ["poetry-core"]
Expand Down Expand Up @@ -157,13 +172,17 @@ split-on-trailing-comma = true
section-order = [
"future",
"standard-library",
"boto3",
"third-party",
"boto3",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
boto3 = ["boto3"]
boto3 = [
"boto3",
"botocore",
"mypy_boto3_s3",
]

[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
Expand Down Expand Up @@ -212,8 +231,6 @@ ignore = [
addopts = [
"--capture=no",
"--ff",
"--cov=saritasa_s3_tools",
"--cov-report=html",
]
# skip all files inside following dirs
norecursedirs = [
Expand All @@ -224,6 +241,9 @@ norecursedirs = [
[tool.coverage.run]
omit = []

[tool.coverage.report]
include = ["saritasa_s3_tools/**"]

# https://docformatter.readthedocs.io/en/latest/configuration.html#
[tool.docformatter]
wrap-descriptions=0
Expand Down
20 changes: 20 additions & 0 deletions saritasa_s3_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import contextlib

from . import keys, utils
from .client import S3Client
from .configs import S3FileTypeConfig

with contextlib.suppress(ImportError):
from . import async_client

with contextlib.suppress(ImportError):
from . import testing

__all__ = (
"keys",
"utils",
"S3Client",
"S3FileTypeConfig",
"async_client",
"testing",
)
1 change: 1 addition & 0 deletions saritasa_s3_tools/async_client/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .client import AsyncS3Client
Loading

0 comments on commit 92d24e1

Please sign in to comment.