Skip to content
Merged
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
317 changes: 161 additions & 156 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,137 +1,137 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

requires = [ "hatch-vcs", "hatchling" ]

[project]
name = "aleph-sdk-python"
dynamic = ["version"]
description = "Lightweight Python Client library for the Aleph.im network"
readme = "README.md"
license = { file = "LICENSE.txt" }
authors = [
{ name = "Aleph.im Team", email = "[email protected]" },
{ name = "Aleph.im Team", email = "[email protected]" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Framework :: aiohttp",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Topic :: Software Development :: Libraries",
]
"Development Status :: 4 - Beta",
"Framework :: aiohttp",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dynamic = [ "version" ]
dependencies = [
"aiohttp>=3.8.3",
"aleph-message>=0.4.9",
"coincurve; python_version<\"3.11\"",
"coincurve>=19.0.0; python_version>=\"3.11\"",
"eth_abi>=4.0.0; python_version>=\"3.11\"",
"jwcrypto==1.5.6",
"python-magic",
"typing_extensions",
"aioresponses>=0.7.6",
"aleph-superfluid>=0.2.1",
"eth_typing==4.3.1",
"web3==6.3.0",
"base58==2.1.1", # Needed now as default with _load_account changement
"pynacl==1.5.0" # Needed now as default with _load_account changement
]

[project.optional-dependencies]
cosmos = [
"cosmospy",
]
dns = [
"aiodns",
]
docs = [
"sphinxcontrib-plantuml",
]
ledger = [
"ledgereth==0.9.1",
]
mqtt = [
"aiomqtt<=0.1.3",
"certifi",
"Click",
]
nuls2 = [
"aleph-nuls2",
]
substrate = [
"py-sr25519-bindings",
"substrate-interface",
]
solana = [
"base58",
"pynacl",
]
tezos = [
"aleph-pytezos==0.1.1",
"pynacl",
]
encryption = [
"eciespy; python_version<\"3.11\"",
"eciespy>=0.3.13; python_version>=\"3.11\"",
"aiohttp>=3.8.3",
"aioresponses>=0.7.6",
"aleph-message>=0.4.9",
"aleph-superfluid>=0.2.1",
"base58==2.1.1", # Needed now as default with _load_account changement
"coincurve; python_version<'3.11'",
"coincurve>=19; python_version>='3.11'",
"eth-abi>=4; python_version>='3.11'",
"eth-typing==4.3.1",
"jwcrypto==1.5.6",
"pynacl==1.5", # Needed now as default with _load_account changement
"python-magic",
"typing-extensions",
"web3==6.3",
]
all = [
"aleph-sdk-python[cosmos,dns,docs,ledger,mqtt,nuls2,substrate,solana,tezos,encryption]",

optional-dependencies.all = [
"aleph-sdk-python[cosmos,dns,docs,ledger,mqtt,nuls2,substrate,solana,tezos,encryption]",
]
optional-dependencies.cosmos = [
"cosmospy",
]
optional-dependencies.dns = [
"aiodns",
]
optional-dependencies.docs = [
"sphinxcontrib-plantuml",
]
optional-dependencies.encryption = [
"eciespy; python_version<'3.11'",
"eciespy>=0.3.13; python_version>='3.11'",
]
optional-dependencies.ledger = [
"ledgereth==0.9.1",
]
optional-dependencies.mqtt = [
"aiomqtt<=0.1.3",
"certifi",
"click",
]
optional-dependencies.nuls2 = [
"aleph-nuls2",
]
optional-dependencies.solana = [
"base58",
"pynacl",
]
optional-dependencies.substrate = [
"py-sr25519-bindings",
"substrate-interface",
]
optional-dependencies.tezos = [
"aleph-pytezos==0.1.1",
"pynacl",
]
urls.Documentation = "https://aleph.im/"
urls.Homepage = "https://github.com/aleph-im/aleph-sdk-python"

[tool.hatch.metadata]
allow-direct-references = true

[project.urls]
Documentation = "https://aleph.im/"
Homepage = "https://github.com/aleph-im/aleph-sdk-python"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.targets.wheel]
packages = [
"src/aleph",
"pyproject.toml",
"README.md",
"LICENSE.txt",
"src/aleph",
"pyproject.toml",
"README.md",
"LICENSE.txt",
]

[tool.hatch.build.targets.sdist]
include = [
"src/aleph",
"pyproject.toml",
"README.md",
"LICENSE.txt",
"src/aleph",
"pyproject.toml",
"README.md",
"LICENSE.txt",
]

[tool.isort]
profile = "black"

[[tool.hatch.envs.all.matrix]]
python = ["3.9", "3.10", "3.11"]
python = [ "3.9", "3.10", "3.11" ]

[tool.hatch.envs.testing]
features = [
"cosmos",
"dns",
"ledger",
"nuls2",
"substrate",
"solana",
"tezos",
"encryption",
"cosmos",
"dns",
"ledger",
"nuls2",
"substrate",
"solana",
"tezos",
"encryption",
]
dependencies = [
"pytest==8.0.1",
"pytest-cov==4.1.0",
"pytest-mock==3.12.0",
"pytest-asyncio==0.23.5",
"pytest-aiohttp==1.0.5",
"aioresponses==0.7.6",
"fastapi",
"httpx",
"secp256k1",
"pytest==8.0.1",
"pytest-cov==4.1.0",
"pytest-mock==3.12.0",
"pytest-asyncio==0.23.5",
"pytest-aiohttp==1.0.5",
"aioresponses==0.7.6",
"fastapi",
"httpx",
"secp256k1",
]
[tool.hatch.envs.testing.scripts]
test = "pytest {args:} ./src/ ./tests/ ./examples/"
Expand All @@ -148,98 +148,103 @@ cov = [
[tool.hatch.envs.linting]
detached = true
dependencies = [
"black==24.2.0",
"mypy==1.9.0",
"mypy-extensions==1.0.0",
"ruff==0.4.8",
"isort==5.13.2",
"black==24.2.0",
"mypy==1.9.0",
"mypy-extensions==1.0.0",
"ruff==0.4.8",
"isort==5.13.2",
"pyproject-fmt==2.2.1",
]
[tool.hatch.envs.linting.scripts]
typing = "mypy --config-file=pyproject.toml {args:} ./src/ ./tests/ ./examples/"
style = [
"ruff check {args:.} ./src/ ./tests/ ./examples/",
"black --check --diff {args:} ./src/ ./tests/ ./examples/",
"isort --check-only --profile black {args:} ./src/ ./tests/ ./examples/",
"ruff check {args:.} ./src/ ./tests/ ./examples/",
"black --check --diff {args:} ./src/ ./tests/ ./examples/",
"isort --check-only --profile black {args:} ./src/ ./tests/ ./examples/",
"pyproject-fmt --check pyproject.toml",
]
fmt = [
"black {args:} ./src/ ./tests/ ./examples/",
"ruff check --fix {args:.} ./src/ ./tests/ ./examples/",
"isort --profile black {args:} ./src/ ./tests/ ./examples/",
"style",
"black {args:} ./src/ ./tests/ ./examples/",
"ruff check --fix {args:.} ./src/ ./tests/ ./examples/",
"isort --profile black {args:} ./src/ ./tests/ ./examples/",
"pyproject-fmt pyproject.toml",
"style",
]
all = [
"style",
"typing",
]

[tool.mypy]
python_version = 3.9
mypy_path = "src"
exclude = [
"conftest.py"
"style",
"typing",
]
show_column_numbers = true
check_untyped_defs = true

# Import discovery
# Install types for third-party library stubs (e.g. from typeshed repository)
install_types = true
non_interactive = true
# Suppresses error messages about imports that cannot be resolved (no py.typed file, no stub file, etc).
ignore_missing_imports = true
# Don't follow imports
follow_imports = "silent"


# Miscellaneous strictness flags
# Allows variables to be redefined with an arbitrary type, as long as the redefinition is in the same block and nesting level as the original definition.
allow_redefinition = true
[tool.isort]
profile = "black"

[tool.pytest.ini_options]
minversion = "6.0"
pythonpath = ["src"]
pythonpath = [ "src" ]
addopts = "-vv -m \"not ledger_hardware\""
norecursedirs = ["*.egg", "dist", "build", ".tox", ".venv", "*/site-packages/*"]
testpaths = ["tests/unit"]
markers = {ledger_hardware = "marks tests as requiring ledger hardware"}
norecursedirs = [ "*.egg", "dist", "build", ".tox", ".venv", "*/site-packages/*" ]
testpaths = [ "tests/unit" ]
markers = { ledger_hardware = "marks tests as requiring ledger hardware" }

[tool.coverage.run]
branch = true
parallel = true
source = [
"src/",
"src/",
]
omit = [
"*/site-packages/*",
"*/site-packages/*",
]

[tool.coverage.paths]
source = [
"src/",
"src/",
]
omit = [
"*/site-packages/*",
"*/site-packages/*",
]

[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Have to re-enable the standard pragma
"pragma: no cover",

# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",

# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",

# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",

# Don't complain about ineffective code:
"pass",
]

# Don't complain about ineffective code:
"pass",
[tool.mypy]
python_version = 3.9
mypy_path = "src"
exclude = [
"conftest.py",
]
show_column_numbers = true
check_untyped_defs = true

# Import discovery
# Install types for third-party library stubs (e.g. from typeshed repository)
install_types = true
non_interactive = true
# Suppresses error messages about imports that cannot be resolved (no py.typed file, no stub file, etc).
ignore_missing_imports = true
# Don't follow imports
follow_imports = "silent"

# Miscellaneous strictness flags
# Allows variables to be redefined with an arbitrary type, as long as the redefinition is in the same block and nesting level as the original definition.
allow_redefinition = true
Loading