Skip to content

Commit

Permalink
Remove setuptools_scm from dependency and switch back to manual versi…
Browse files Browse the repository at this point in the history
…oning
  • Loading branch information
joowani committed Apr 1, 2022
1 parent 4104cc3 commit b69a0df
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
python-version: [ 3.7, 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Create ArangoDB Docker container
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/pypi.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,3 @@ localdata/

# Node Modules
node_modules/

# setuptools_scm
arango/version.py
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
rev: 5.10.1
hooks:
- id: isort
args: [ --profile, black ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
rev: v0.931
hooks:
- id: mypy
files: ^arango/
additional_dependencies: ['types-requests']
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 4.0.1
hooks:
- id: flake8
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![codecov](https://codecov.io/gh/ArangoDB-Community/python-arango/branch/main/graph/badge.svg?token=M8zrjrzsUY)](https://codecov.io/gh/ArangoDB-Community/python-arango)
[![PyPI version](https://badge.fury.io/py/python-arango.svg)](https://badge.fury.io/py/python-arango)
[![GitHub license](https://img.shields.io/github/license/ArangoDB-Community/python-arango?color=brightgreen)](https://github.com/ArangoDB-Community/python-arango/blob/main/LICENSE)
![Python version](https://img.shields.io/badge/python-3.6%2B-blue)
![Python version](https://img.shields.io/badge/python-3.7%2B-blue)

# Python-Arango

Expand All @@ -15,12 +15,12 @@ database natively supporting documents, graphs and search.
## Requirements

- ArangoDB version 3.7+
- Python version 3.6+
- Python version 3.7+

## Installation

```shell
pip install python-arango
pip install python-arango --upgrade
```

## Getting Started
Expand Down
5 changes: 2 additions & 3 deletions arango/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from json import dumps, loads
from typing import Any, Callable, Optional, Sequence, Union

from pkg_resources import get_distribution

from arango.connection import (
BasicConnection,
Connection,
Expand All @@ -20,6 +18,7 @@
RoundRobinHostResolver,
SingleHostResolver,
)
from arango.version import version


class ArangoClient:
Expand Down Expand Up @@ -101,7 +100,7 @@ def version(self) -> str:
:return: Client version.
:rtype: str
"""
return get_distribution("python-arango").version
return version

def db(
self,
Expand Down
1 change: 1 addition & 0 deletions arango/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "7.3.2"
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Requirements
=============

- ArangoDB version 3.7+
- Python version 3.6+
- Python version 3.7+

Installation
============

.. code-block:: bash
~$ pip install python-arango
~$ pip install python-arango --upgrade
Contents
========
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools_scm[toml]>=3.4",
"wheel",
]
build-backend = "setuptools.build_meta"
Expand All @@ -21,5 +20,8 @@ addopts = "-s -vv -p no:warnings"
minversion = "6.0"
testpaths = ["tests"]

[tool.setuptools_scm]
write_to = "arango/version.py"
[tool.mypy]
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
strict = true
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ max-line-length = 88
extend-ignore = E203, E741, W503
exclude =.git .idea .*_cache dist htmlcov venv
per-file-ignores = __init__.py:F401

[mypy]
ignore_missing_imports = True
strict = True
24 changes: 13 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,42 @@
with open("./README.md") as fp:
long_description = fp.read()

version = {}
with open("./arango/version.py") as fp:
exec(fp.read(), version)

setup(
name="python-arango",
description="Python Driver for ArangoDB",
long_description=long_description,
long_description_content_type="text/markdown",
version=version["version"],
author="Joohwan Oh",
author_email="[email protected]",
url="https://github.com/ArangoDB-Community/python-arango",
keywords=["arangodb", "python", "driver"],
packages=find_packages(exclude=["tests"]),
include_package_data=True,
python_requires=">=3.6",
python_requires=">=3.7",
license="MIT",
use_scm_version=True,
setup_requires=["setuptools_scm"],
install_requires=[
"urllib3>=1.26.0",
"dataclasses>=0.6; python_version < '3.7'",
"requests",
"requests_toolbelt",
"PyJWT",
"setuptools>=42",
"setuptools_scm[toml]>=3.4",
],
extras_require={
"dev": [
"black",
"flake8>=3.8.4",
"isort>=5.0.0",
"mypy>=0.790",
"black>=22.3.0",
"flake8>=4.0.1",
"isort>=5.10.1",
"mypy>=0.942",
"mock",
"pre-commit>=2.9.3",
"pytest>=6.0.0",
"pytest-cov>=2.0.0",
"pre-commit>=2.17.0",
"pytest>=7.1.1",
"pytest-cov>=3.0.0",
"sphinx",
"sphinx_rtd_theme",
"types-pkg_resources",
Expand Down

0 comments on commit b69a0df

Please sign in to comment.