Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate most of kedro-datasets metadata to pyproject.toml #161

Merged
merged 3 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
cd $(plugin);\
rm -Rf dist;\
python setup.py sdist bdist_wheel
python -m build

pypi:
python -m pip install twine -U
Expand Down
25 changes: 25 additions & 0 deletions kedro-datasets/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
[project]
name = "kedro-datasets"
authors = [
{name = "Kedro"}
]
description = "Kedro-Datasets is where you can find all of Kedro's data connectors."
requires-python = ">=3.7, <3.11"
license = {text = "Apache Software License (Apache 2.0)"}
dependencies = [
"kedro~=0.18.4",
]
dynamic = ["readme", "version", "optional-dependencies"]

[project.urls]
Source = "https://github.com/kedro-org/kedro-plugins/tree/main/kedro-datasets"
Documentation = "https://docs.kedro.org"
Tracker = "https://github.com/kedro-org/kedro-plugins/issues"

[tool.setuptools.packages.find]
include = ["kedro_datasets*"]

[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}
version = {attr = "kedro_datasets.__version__"}

[tool.black]

[tool.isort]
Expand Down
1 change: 0 additions & 1 deletion kedro-datasets/requirements.txt

This file was deleted.

35 changes: 1 addition & 34 deletions kedro-datasets/setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import re
from codecs import open
from itertools import chain
from os import path

from setuptools import find_packages, setup

name = "kedro-datasets"
here = path.abspath(path.dirname(__file__))
from setuptools import setup

# at least 1.3 to be able to use XMLDataSet and pandas integration with fsspec
PANDAS = "pandas>=1.3, <3.0"
Expand All @@ -15,21 +9,6 @@
S3FS = "s3fs>=0.3.0, <0.5"
POLARS = "polars~=0.15.16"

with open("requirements.txt", "r", encoding="utf-8") as f:
install_requires = [x.strip() for x in f if x.strip()]

with open("test_requirements.txt", "r", encoding="utf-8") as f:
tests_require = [x.strip() for x in f if x.strip() and not x.startswith("-r")]

# get package version
package_name = name.replace("-", "_")
with open(path.join(here, package_name, "__init__.py"), encoding="utf-8") as f:
version = re.search(r'__version__ = ["\']([^"\']+)', f.read()).group(1)

# Get the long description from the README file
with open(path.join(here, "README.md"), encoding="utf-8") as f:
readme = f.read()


def _collect_requirements(requires):
return sorted(set(chain.from_iterable(requires.values())))
Expand Down Expand Up @@ -145,17 +124,5 @@ def _collect_requirements(requires):
extras_require["all"] = _collect_requirements(extras_require)

setup(
name=name,
version=version,
description="Kedro-Datasets is where you can find all of Kedro's data connectors.",
long_description=readme,
long_description_content_type="text/markdown",
url="https://github.com/kedro-org/kedro-plugins/tree/main/kedro-datasets",
install_requires=install_requires,
tests_require=tests_require,
author="Kedro",
python_requires=">=3.7, <3.11",
license="Apache Software License (Apache 2.0)",
packages=find_packages(exclude=["tests*"]),
extras_require=extras_require,
)