diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c39f9bb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,49 @@ +[build-system] +requires = ["setuptools>=42", "wheel", "setuptools-git-versioning"] +build-backend = "setuptools.build_meta" + +[tool.setuptools-git-versioning] +enabled = true + +[project] +name = "tieval" +dynamic = ["version"] +dependencies = [ + "nltk", + "xmltodict", + "networkx>=2.8.1", + "py_heideltime", + "cached-path==1.1.2", +] +requires-python = ">=3.8" +authors = [{ name = "Hugo Sousa", email = "hugo.o.sousa@inesctec.pt" }] +maintainers = [{ name = "Hugo Sousa", email = "hugo.o.sousa@inesctec.pt" }] +description = "A framework for evaluation and development of temporal-aware models." +readme = "README.md" +license = { file = "LICENSE" } +keywords = [ + "temporal information", + "evaluation", + "temporal information extraction", + "temporal relation classification", + "temporal relation extraction", + "temporal expression identification", + "event identification", + "event classification", +] +classifiers = [ + 'Development Status :: 2 - Pre-Alpha', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', +] + +[project.optional-dependencies] +test = ["pytest"] +models = ["allenlp==2.9.3", "py_heideltime"] + +[project.urls] +Documentation = "https://tieval.readthedocs.io/" +Repository = "https://github.com/LIAAD/tieval" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 15159bc..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -allenlp==2.9.3 -nltk -xmltodict -networkx>=2.8.1 -py_heideltime -cached-path==1.1.2 \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index c1b4b15..0000000 --- a/setup.py +++ /dev/null @@ -1,56 +0,0 @@ -import subprocess -from pathlib import Path -from setuptools import find_packages, setup - -PWD = Path(__file__).parent.resolve() - -README = (PWD / "README.md").read_text(encoding="utf-8") - - -version = ( - subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE) - .stdout.decode("utf-8") - .strip() -) - -if "-" in version: - # See: https://peps.python.org/pep-0440/#local-version-segments - v, i, s = version.split("-") - version = v + "+" + i + ".git." + s - -version_path = PWD / "tieval" / "VERSION" -if not version: - version = version_path.read_text(encoding="utf-8").strip() -else: - version_path.write_text(f"{version}\n", encoding="utf-8") - -setup( - name="tieval", - version=version, - url="https://github.com/LIAAD/tieval", - license='MIT', - author="Hugo Sousa", - author_email="hugo.o.sousa@inesctec.pt", - description="This framework facilitates the development and test of temporal-aware models.", - long_description_content_type='text/markdown', - long_description=README, - packages=find_packages(exclude=('tests*',)), - package_data={"tieval": ["VERSION"]}, - install_requires=[ - "nltk", - "xmltodict", - "networkx>=2.8.1", - "py_heideltime", - "cached-path==1.1.2" - ], - - classifiers=[ - 'Development Status :: 2 - Pre-Alpha', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - ], - python_requires=">=3.8", -) diff --git a/tieval/__init__.py b/src/tieval/__init__.py similarity index 100% rename from tieval/__init__.py rename to src/tieval/__init__.py diff --git a/tieval/__main__.py b/src/tieval/__main__.py similarity index 100% rename from tieval/__main__.py rename to src/tieval/__main__.py diff --git a/tieval/base.py b/src/tieval/base.py similarity index 100% rename from tieval/base.py rename to src/tieval/base.py diff --git a/tieval/closure.py b/src/tieval/closure.py similarity index 100% rename from tieval/closure.py rename to src/tieval/closure.py diff --git a/tieval/datasets/__init__.py b/src/tieval/datasets/__init__.py similarity index 100% rename from tieval/datasets/__init__.py rename to src/tieval/datasets/__init__.py diff --git a/tieval/datasets/metadata.py b/src/tieval/datasets/metadata.py similarity index 100% rename from tieval/datasets/metadata.py rename to src/tieval/datasets/metadata.py diff --git a/tieval/datasets/readers/__init__.py b/src/tieval/datasets/readers/__init__.py similarity index 100% rename from tieval/datasets/readers/__init__.py rename to src/tieval/datasets/readers/__init__.py diff --git a/tieval/datasets/readers/dataset.py b/src/tieval/datasets/readers/dataset.py similarity index 100% rename from tieval/datasets/readers/dataset.py rename to src/tieval/datasets/readers/dataset.py diff --git a/tieval/datasets/readers/document.py b/src/tieval/datasets/readers/document.py similarity index 100% rename from tieval/datasets/readers/document.py rename to src/tieval/datasets/readers/document.py diff --git a/tieval/datasets/utils.py b/src/tieval/datasets/utils.py similarity index 100% rename from tieval/datasets/utils.py rename to src/tieval/datasets/utils.py diff --git a/tieval/entities.py b/src/tieval/entities.py similarity index 100% rename from tieval/entities.py rename to src/tieval/entities.py diff --git a/tieval/evaluate/__init__.py b/src/tieval/evaluate/__init__.py similarity index 100% rename from tieval/evaluate/__init__.py rename to src/tieval/evaluate/__init__.py diff --git a/tieval/evaluate/metrics.py b/src/tieval/evaluate/metrics.py similarity index 100% rename from tieval/evaluate/metrics.py rename to src/tieval/evaluate/metrics.py diff --git a/tieval/links.py b/src/tieval/links.py similarity index 100% rename from tieval/links.py rename to src/tieval/links.py diff --git a/tieval/models/__init__.py b/src/tieval/models/__init__.py similarity index 100% rename from tieval/models/__init__.py rename to src/tieval/models/__init__.py diff --git a/tieval/models/base.py b/src/tieval/models/base.py similarity index 100% rename from tieval/models/base.py rename to src/tieval/models/base.py diff --git a/tieval/models/classification/__init__.py b/src/tieval/models/classification/__init__.py similarity index 100% rename from tieval/models/classification/__init__.py rename to src/tieval/models/classification/__init__.py diff --git a/tieval/models/classification/temporal_relation/__init__.py b/src/tieval/models/classification/temporal_relation/__init__.py similarity index 100% rename from tieval/models/classification/temporal_relation/__init__.py rename to src/tieval/models/classification/temporal_relation/__init__.py diff --git a/tieval/models/classification/temporal_relation/cogcomp2.py b/src/tieval/models/classification/temporal_relation/cogcomp2.py similarity index 100% rename from tieval/models/classification/temporal_relation/cogcomp2.py rename to src/tieval/models/classification/temporal_relation/cogcomp2.py diff --git a/tieval/models/identification/__init__.py b/src/tieval/models/identification/__init__.py similarity index 100% rename from tieval/models/identification/__init__.py rename to src/tieval/models/identification/__init__.py diff --git a/tieval/models/identification/event.py b/src/tieval/models/identification/event.py similarity index 100% rename from tieval/models/identification/event.py rename to src/tieval/models/identification/event.py diff --git a/tieval/models/identification/timex.py b/src/tieval/models/identification/timex.py similarity index 100% rename from tieval/models/identification/timex.py rename to src/tieval/models/identification/timex.py diff --git a/tieval/models/metadata.py b/src/tieval/models/metadata.py similarity index 100% rename from tieval/models/metadata.py rename to src/tieval/models/metadata.py diff --git a/tieval/temporal_relation.py b/src/tieval/temporal_relation.py similarity index 100% rename from tieval/temporal_relation.py rename to src/tieval/temporal_relation.py diff --git a/tieval/utils.py b/src/tieval/utils.py similarity index 100% rename from tieval/utils.py rename to src/tieval/utils.py