Skip to content

Commit 94e6a39

Browse files
authored
Merge pull request #105 from hydroshare/remove-pkg-resources-dependency
Remove pkg resources dependency
2 parents 6b0ecb0 + 39247a6 commit 94e6a39

5 files changed

Lines changed: 100 additions & 96 deletions

File tree

hsclient/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Version information
2+
__version__ = "1.1.6"
3+
14
from hsclient.hydroshare import (
25
Aggregation,
36
File,

hsclient/hydroshare.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
from hsclient.oauth2_model import Token
5454
from hsclient.utils import attribute_filter, encode_resource_url, is_aggregation, main_file_type
5555

56-
import pkg_resources # part of setuptools
57-
VERSION = pkg_resources.get_distribution(__package__).version
56+
from hsclient import __version__ as VERSION
5857

5958
CHECK_TASK_PING_INTERVAL = 10
6059

pyproject.toml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
[build-system]
2+
requires = ["setuptools>=61", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "hsclient"
7+
dynamic = ["version"]
8+
description = "A python client for managing HydroShare resources"
9+
readme = "README.md"
10+
license = "MIT"
11+
requires-python = ">=3.9"
12+
authors = [
13+
{name = "Scott Black", email = "scott.black@usu.edu"},
14+
]
15+
classifiers = [
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.14",
22+
]
23+
dependencies = [
24+
"hsmodels>=1.0.4",
25+
"requests",
26+
"requests_oauthlib",
27+
]
28+
29+
[project.urls]
30+
Homepage = "https://github.com/hydroshare/hsclient"
31+
32+
[project.optional-dependencies]
33+
pandas = ["pandas"]
34+
xarray = ["netCDF4", "xarray"]
35+
rasterio = ["rasterio"]
36+
fiona = ["fiona"]
37+
all = ["pandas", "netCDF4", "xarray", "rasterio", "fiona"]
38+
dev = [
39+
"pandas", "netCDF4", "xarray", "rasterio", "fiona",
40+
"pytest", "pytest-xdist", "pytest-cov",
41+
"mkdocs", "mknotebooks", "mkdocstrings", "mkdocstrings-python",
42+
]
43+
44+
[tool.setuptools]
45+
packages = {find = {include = ["hsclient", "hsclient.*"], exclude = ["tests"]}}
46+
47+
[tool.setuptools.dynamic]
48+
version = {attr = "hsclient.__version__"}
49+
50+
[tool.pytest.ini_options]
51+
testpaths = ["tests"]
52+
53+
[tool.flake8]
54+
max-line-length = 120
55+
max-complexity = 14
56+
inline-quotes = "single"
57+
multiline-quotes = "double"
58+
59+
[tool.isort]
60+
line_length = 120
61+
known_first_party = "hsclient"
62+
multi_line_output = 3
63+
include_trailing_comma = true
64+
force_grid_wrap = 0
65+
combine_as_imports = true
66+
67+
[tool.coverage.run]
68+
source = ["hsclient"]
69+
branch = true
70+
71+
[tool.coverage.report]
72+
precision = 2
73+
74+
[tool.mypy]
75+
show_error_codes = true
76+
follow_imports = "silent"
77+
strict_optional = true
78+
warn_redundant_casts = true
79+
warn_unused_ignores = true
80+
disallow_any_generics = true
81+
check_untyped_defs = true
82+
no_implicit_reexport = true
83+
warn_unused_configs = true
84+
disallow_subclassing_any = true
85+
disallow_incomplete_defs = true
86+
disallow_untyped_decorators = true
87+
disallow_untyped_calls = true
88+
disallow_untyped_defs = true
89+
90+
[[tool.mypy.overrides]]
91+
module = "email_validator"
92+
ignore_missing_imports = true
93+
94+
[[tool.mypy.overrides]]
95+
module = "dotenv"
96+
ignore_missing_imports = true

setup.cfg

Lines changed: 0 additions & 51 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)