Skip to content

Commit d10f331

Browse files
authored
Add project metadata (#364)
1 parent af30a54 commit d10f331

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

aws_advanced_python_wrapper/database_dialect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from typing import (TYPE_CHECKING, Callable, ClassVar, Dict, Optional,
1818
Protocol, Tuple, runtime_checkable)
1919

20-
from .utils.driver_info import DriverInfo
20+
from aws_advanced_python_wrapper.driver_info import DriverInfo
2121

2222
if TYPE_CHECKING:
2323
from aws_advanced_python_wrapper.pep249 import Connection

aws_advanced_python_wrapper/utils/driver_info.py renamed to aws_advanced_python_wrapper/driver_info.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import os
16+
from pathlib import Path
17+
1518
import toml
1619

20+
PROJECT_DIR = Path(__file__).parent.parent
21+
PYPROJECT = toml.load(os.path.join(PROJECT_DIR, "pyproject.toml"))
22+
1723

1824
class DriverInfo:
19-
DRIVER_NAME = "Amazon Web Services (AWS) Advanced Python Wrapper"
20-
DRIVER_VERSION = toml.load("pyproject.toml")["tool"]["poetry"]["version"]
25+
DRIVER_NAME = PYPROJECT["tool"]["poetry"]["description"]
26+
DRIVER_VERSION = PYPROJECT["tool"]["poetry"]["version"]

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ description = "Amazon Web Services (AWS) Advanced Python Wrapper"
55
authors = ["Amazon Web Services"]
66
readme = "README.md"
77
license = "Apache-2.0"
8+
include = ["CONTRIBUTING.md"]
9+
repository = "https://github.com/awslabs/aws-advanced-python-wrapper"
10+
documentation = "https://github.com/awslabs/aws-advanced-python-wrapper/docs/"
11+
classifiers = [
12+
"Development Status :: 5 - Production/Stable",
13+
"Intended Audience :: Developers",
14+
"Natural Language :: English",
15+
"License :: OSI Approved :: Apache Software License",
16+
"Programming Language :: Python",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3 :: Only",
19+
"Programming Language :: Python :: 3.8",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
]
824

925
[tool.poetry.dependencies]
1026
python = "^3.8.1"

tests/integration/container/utils/rds_test_utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import pytest
3131
from botocore.config import Config
3232

33+
from aws_advanced_python_wrapper.driver_info import DriverInfo
3334
from aws_advanced_python_wrapper.errors import UnsupportedOperationError
34-
from aws_advanced_python_wrapper.utils.driver_info import DriverInfo
3535
from aws_advanced_python_wrapper.utils.log import Logger
3636
from aws_advanced_python_wrapper.utils.messages import Messages
3737
from .database_engine import DatabaseEngine

tests/unit/test_dialect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
AuroraMysqlDialect, AuroraPgDialect, DatabaseDialectManager, DialectCode,
2222
MultiAzMysqlDialect, MysqlDatabaseDialect, PgDatabaseDialect,
2323
RdsMysqlDialect, RdsPgDialect, TargetDriverType, UnknownDatabaseDialect)
24+
from aws_advanced_python_wrapper.driver_info import DriverInfo
2425
from aws_advanced_python_wrapper.errors import AwsWrapperError
2526
from aws_advanced_python_wrapper.hostinfo import HostInfo
26-
from aws_advanced_python_wrapper.utils.driver_info import DriverInfo
2727
from aws_advanced_python_wrapper.utils.properties import (Properties,
2828
WrapperProperties)
2929

0 commit comments

Comments
 (0)