2024-03-25 13:28:35 +01:00
|
|
|
import os
|
|
|
|
import pathlib
|
|
|
|
|
|
|
|
import setuptools
|
|
|
|
|
|
|
|
package_metadata: dict = {}
|
2025-01-24 11:35:39 -08:00
|
|
|
with open("./src/datahub_dagster_plugin/_version.py") as fp:
|
2024-03-25 13:28:35 +01:00
|
|
|
exec(fp.read(), package_metadata)
|
|
|
|
|
|
|
|
|
|
|
|
def get_long_description():
|
|
|
|
root = os.path.dirname(__file__)
|
|
|
|
return pathlib.Path(os.path.join(root, "README.md")).read_text()
|
|
|
|
|
|
|
|
|
|
|
|
_version: str = package_metadata["__version__"]
|
|
|
|
_self_pin = (
|
2024-08-21 21:43:36 +05:30
|
|
|
f"=={_version}"
|
|
|
|
if not (_version.endswith(("dev0", "dev1")) or "docker" in _version)
|
|
|
|
else ""
|
2024-03-25 13:28:35 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
base_requirements = {
|
|
|
|
# Actual dependencies.
|
|
|
|
"dagster >= 1.3.3",
|
|
|
|
"dagit >= 1.3.3",
|
2024-10-22 19:57:46 -07:00
|
|
|
f"acryl-datahub[datahub-rest,sql-parser]{_self_pin}",
|
2024-03-25 13:28:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
mypy_stubs = {
|
|
|
|
"types-dataclasses",
|
|
|
|
"sqlalchemy-stubs",
|
2024-08-02 04:57:54 -07:00
|
|
|
"types-setuptools",
|
2024-03-25 13:28:35 +01:00
|
|
|
"types-six",
|
|
|
|
"types-python-dateutil",
|
|
|
|
"types-requests",
|
|
|
|
"types-toml",
|
|
|
|
"types-PyYAML",
|
|
|
|
"types-freezegun",
|
|
|
|
"types-cachetools",
|
|
|
|
# versions 0.1.13 and 0.1.14 seem to have issues
|
|
|
|
"types-click==0.1.12",
|
|
|
|
"types-tabulate",
|
|
|
|
# avrogen package requires this
|
|
|
|
"types-pytz",
|
|
|
|
}
|
|
|
|
|
|
|
|
base_dev_requirements = {
|
|
|
|
*base_requirements,
|
|
|
|
*mypy_stubs,
|
2024-08-28 09:22:11 +02:00
|
|
|
"dagster-aws >= 0.11.0",
|
|
|
|
"dagster-snowflake >= 0.11.0",
|
|
|
|
"dagster-snowflake-pandas >= 0.11.0",
|
2024-03-25 13:28:35 +01:00
|
|
|
"coverage>=5.1",
|
2025-01-17 23:50:13 +05:30
|
|
|
"ruff==0.9.2",
|
2024-03-25 13:28:35 +01:00
|
|
|
"mypy>=1.4.0",
|
|
|
|
# pydantic 1.8.2 is incompatible with mypy 0.910.
|
|
|
|
# See https://github.com/samuelcolvin/pydantic/pull/3175#issuecomment-995382910.
|
|
|
|
"pydantic>=1.10.0,!=1.10.3",
|
|
|
|
"pytest>=6.2.2",
|
|
|
|
"pytest-asyncio>=0.16.0",
|
|
|
|
"pytest-cov>=2.8.1",
|
|
|
|
"tox",
|
2024-08-28 19:53:42 +05:30
|
|
|
# Missing numpy requirement in 8.0.0
|
|
|
|
"deepdiff!=8.0.0",
|
2024-03-25 13:28:35 +01:00
|
|
|
"requests-mock",
|
|
|
|
"freezegun",
|
|
|
|
"jsonpickle",
|
|
|
|
"build",
|
|
|
|
"twine",
|
|
|
|
"packaging",
|
|
|
|
}
|
|
|
|
|
|
|
|
dev_requirements = {
|
|
|
|
*base_dev_requirements,
|
|
|
|
}
|
|
|
|
|
|
|
|
integration_test_requirements = {
|
|
|
|
*dev_requirements,
|
|
|
|
}
|
|
|
|
|
|
|
|
entry_points = {
|
|
|
|
"dagster.plugins": "acryl-datahub-dagster-plugin = datahub_dagster_plugin.datahub_dagster_plugin:DatahubDagsterPlugin"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setuptools.setup(
|
|
|
|
# Package metadata.
|
|
|
|
name=package_metadata["__package_name__"],
|
|
|
|
version=package_metadata["__version__"],
|
|
|
|
url="https://datahubproject.io/",
|
|
|
|
project_urls={
|
|
|
|
"Documentation": "https://datahubproject.io/docs/",
|
|
|
|
"Source": "https://github.com/datahub-project/datahub",
|
|
|
|
"Changelog": "https://github.com/datahub-project/datahub/releases",
|
|
|
|
},
|
|
|
|
license="Apache License 2.0",
|
|
|
|
description="Datahub Dagster plugin to capture executions and send to Datahub",
|
|
|
|
long_description=get_long_description(),
|
|
|
|
long_description_content_type="text/markdown",
|
|
|
|
classifiers=[
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Intended Audience :: Information Technology",
|
|
|
|
"Intended Audience :: System Administrators",
|
|
|
|
"License :: OSI Approved",
|
|
|
|
"License :: OSI Approved :: Apache Software License",
|
|
|
|
"Operating System :: Unix",
|
|
|
|
"Operating System :: POSIX :: Linux",
|
|
|
|
"Environment :: Console",
|
|
|
|
"Environment :: MacOS X",
|
|
|
|
"Topic :: Software Development",
|
|
|
|
],
|
|
|
|
# Package info.
|
|
|
|
zip_safe=False,
|
2024-12-13 17:51:42 +01:00
|
|
|
python_requires=">=3.9",
|
2024-03-25 13:28:35 +01:00
|
|
|
package_dir={"": "src"},
|
|
|
|
packages=setuptools.find_namespace_packages(where="./src"),
|
|
|
|
entry_points=entry_points,
|
|
|
|
# Dependencies.
|
|
|
|
install_requires=list(base_requirements),
|
|
|
|
extras_require={
|
|
|
|
"ignore": [], # This is a dummy extra to allow for trailing commas in the list.
|
|
|
|
"dev": list(dev_requirements),
|
|
|
|
"integration-tests": list(integration_test_requirements),
|
|
|
|
},
|
|
|
|
)
|