Skip to content

Commit 1e23ba4

Browse files
authored
Housekeeping (#13)
* cleanup `release.yml` * add python 3.11 & 3.12 to ci matrix * cleanup README * cleanup tests * cleanup: `arango_datasets` * rename test file * cleanup: `create_graph` * cleanup `datasets.py`
1 parent 753a5bc commit 1e23ba4

File tree

7 files changed

+253
-368
lines changed

7 files changed

+253
-368
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python: ["3.8", "3.9", "3.10"]
16+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1717
name: Lint - Python ${{ matrix.python }}
1818
steps:
1919
- uses: actions/checkout@v2
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
strategy:
3939
matrix:
40-
python: ["3.8", "3.9", "3.10"]
40+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
4141
name: Test - Python ${{ matrix.python }}
4242
steps:
4343
- uses: actions/checkout@v2

.github/workflows/release.yml

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,7 @@ env:
77
PACKAGE_DIR: arango_datasets
88
TESTS_DIR: tests
99
jobs:
10-
lint:
11-
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python: ["3.8", "3.9", "3.10"]
15-
name: Lint - Python ${{ matrix.python }}
16-
steps:
17-
- uses: actions/checkout@v2
18-
- name: Setup Python ${{ matrix.python }}
19-
uses: actions/setup-python@v2
20-
with:
21-
python-version: ${{ matrix.python }}
22-
- name: Install packages
23-
run: pip install .[dev]
24-
- name: Run black
25-
run: black --check --verbose --diff --color ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
26-
- name: Run flake8
27-
run: flake8 ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
28-
- name: Run isort
29-
run: isort --check --profile=black ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
30-
- name: Run mypy
31-
run: mypy ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
32-
- name: Run bandit
33-
run: bandit --exclude "./tests/*" -r ./
34-
test:
35-
needs: lint
36-
runs-on: ubuntu-latest
37-
strategy:
38-
matrix:
39-
python: ["3.8", "3.9", "3.10"]
40-
name: Test - Python ${{ matrix.python }}
41-
steps:
42-
- uses: actions/checkout@v2
43-
- name: Setup Python ${{ matrix.python }}
44-
uses: actions/setup-python@v2
45-
with:
46-
python-version: ${{ matrix.python }}
47-
- name: Set up ArangoDB Instance via Docker
48-
run: docker create --name adb -p 8529:8529 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb:3.10.0
49-
- name: Start ArangoDB Instance
50-
run: docker start adb
51-
- name: Setup pip
52-
run: python -m pip install --upgrade pip setuptools wheel
53-
- name: Install packages
54-
run: pip install .[dev]
55-
- name: Run pytest
56-
run: pytest --cov=${{env.PACKAGE_DIR}} --cov-report xml --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes --cov-fail-under=75
57-
5810
release:
59-
needs: [lint, test]
6011
runs-on: ubuntu-latest
6112
name: Release package
6213
steps:
@@ -66,24 +17,22 @@ jobs:
6617
run: git fetch --prune --unshallow
6718

6819
- name: Setup python
69-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v4
7021
with:
71-
python-version: "3.8"
22+
python-version: "3.10"
7223

7324
- name: Install release packages
74-
run: pip install setuptools wheel twine setuptools-scm[toml]
75-
76-
- name: Install dependencies
77-
run: pip install .[dev]
25+
run: pip install build twine
7826

7927
- name: Build distribution
80-
run: python setup.py sdist bdist_wheel
28+
run: python -m build
8129

8230
- name: Publish to PyPI Test
8331
env:
8432
TWINE_USERNAME: __token__
8533
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
8634
run: twine upload --repository testpypi dist/* #--skip-existing
35+
8736
- name: Publish to PyPI
8837
env:
8938
TWINE_USERNAME: __token__

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
Package for loading example datasets into an ArangoDB Instance.
33

44
```py
5-
from arango_datasets.datasets import Datasets
65
from arango import ArangoClient
6+
from arango_datasets import Datasets
77

88
# Datasets requires a valid database object
99
db = ArangoClient(hosts='http://localhost:8529').db("dbName", username="root", password="")
1010

1111
datasets = Datasets(db)
1212

13-
# list available datasets
13+
# List available datasets
1414
datasets.list_datasets()
1515

16-
# list more information about the dataset files and characteristics
17-
#datasets.dataset_info("IMDB_X")
16+
# List more information about a particular dataset
17+
datasets.dataset_info("IMDB_X")
1818

1919
# Import the dataset
20-
# datasets.load("IMDB_X")
20+
datasets.load("IMDB_X")
2121
```

arango_datasets/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from arango_datasets.datasets import Datasets # noqa: F401

0 commit comments

Comments
 (0)