Skip to content

Commit

Permalink
Migrate to pyproject.toml (#12)
Browse files Browse the repository at this point in the history
* migrate to `pyproject.toml`

* cleanup

* fix mypy
  • Loading branch information
aMahanna committed Nov 15, 2023
1 parent e61add2 commit 753a5bc
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 102 deletions.
8 changes: 0 additions & 8 deletions HISTORY.rst

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# arango_datasets
Package for loading example datasets into an ArangoDB Instance.

```
```py
from arango_datasets.datasets import Datasets
from arango import ArangoClient

Expand Down
4 changes: 1 addition & 3 deletions arango_datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ def load_jsonl(
def load_file(self, collection_name: str, edge_type: bool, file_url: str) -> None:
collection: StandardCollection
try:
collection = self.user_db.create_collection(
collection_name, edge=edge_type
) # type: ignore
collection = self.user_db.create_collection(collection_name, edge=edge_type)
except CollectionCreateError as exec:
print(
f"""Failed to create {collection_name} collection due
Expand Down
5 changes: 0 additions & 5 deletions dev_requirements.txt

This file was deleted.

79 changes: 70 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,77 @@
# pyproject.toml
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests"
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
normalize = true

[project]
name = "arango_datasets"
description = "Package for fetching and loading datasets for ArangoDB deployments."
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.8"


authors = [{name = "Christopher Woodward", email = "[email protected]"}]

classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]

dependencies = ["python-arango>=7.4.1", "requests>=2.28.1", "rich>=12.6.0"]

[project.optional-dependencies]
dev = [
"bandit>=1.7.4",
"black>=22.10.0",
"flake8>=5.0.4",
"Flake8-pyproject",
"isort>=5.10.1",
"mypy>=0.982",
"pre-commit>=2.20.0",
"pytest>=7.1.3",
"pytest-cov>=4.0.0",
"sphinx>=5.3.0",
"types-requests>=2.28.11.2",
"types-setuptools>=65.5.0.1",
]

[tool.black]
line-length=88
[project.urls]
"Homepage" = "https://github.com/arangoml/arangodb_datasets"

[tool.setuptools]
packages = ["arango_datasets"]

[tool.pytest.ini_options]
addopts = "-s -vv"
minversion = "6.0"
testpaths = ["tests"]

[tool.coverage.report]
omit = ["*tests*"]

[tool.coverage.run]
omit = ["*tests*"]
omit = ["*tests*"]

[tool.isort]
profile = "black"

[tool.flake8]
max-line-length = 88
extend-ignore = ["E203", "W503", "E251"]
exclude = [".git", ".idea", ".*_cache", "dist", "venv"]

[tool.mypy]
strict = true
ignore_missing_imports = true
implicit_reexport = true
scripts_are_modules = true
follow_imports = "skip"
disallow_subclassing_any = false
disallow_untyped_decorators = false
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

12 changes: 0 additions & 12 deletions setup.cfg

This file was deleted.

62 changes: 2 additions & 60 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
#!/usr/bin/env python
from setuptools import setup

"""The setup script."""

from setuptools import find_packages, setup

with open("HISTORY.rst") as history_file:
history = history_file.read()

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

install_requirements = ["python-arango>=7.4.1", "requests>=2.28.1", "rich>=12.6.0"]


dev_requirements = [
"bandit>=1.7.4",
"black>=22.10.0",
"flake8>=5.0.4",
"isort>=5.10.1",
"mypy>=0.982",
"pre-commit>=2.20.0",
"pytest>=7.1.3",
"pytest-cov>=4.0.0",
"sphinx>=5.3.0",
"types-requests>=2.28.11.2",
"types-setuptools>=65.5.0.1",
]

setup(
name="arango_datasets",
version="1.1.2",
author="Chris Woodward",
author_email="[email protected]",
description="Package for fetching and loading datasets for ArangoDB deployments.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/cw00dw0rd/arango_datasets",
project_urls={
"Bug Tracker": "https://github.com/cw00dw0rd/arango_datasets",
},
python_requires=">=3.8",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
license="Apache Software License 2.0",
keywords="arango_datasets",
package_dir={"arango_datasets": "arango_datasets"},
packages=find_packages(include=["arango_datasets", "arango_datasets.*"]),
include_package_data=True,
# -----
install_requires=install_requirements,
test_suite="tests",
extras_require={"dev": dev_requirements},
zip_safe=False,
)
setup()

0 comments on commit 753a5bc

Please sign in to comment.