Skip to content

Commit

Permalink
new: adbdgl refactor (#30)
Browse files Browse the repository at this point in the history
* initial commit (WIP)

* checkpoint

* Update adapter.py

* checkpoint 2

* cleanup

* checkpoint

* checkpoint

* cleanup: `valid_meta`

* mvp: #29

todo: update jupyter notebook to reflect new functionality

* fix: black

* fix: flake8

* Update setup.py

* temp: try for 3.10

* new: 3.10 support

* cleanup: progress bars

* update: documentation

* Update README.md

* new: adbdgl 3.0.0 notebook

* new: address comments

* revive PR

improvements based on pyg-adapter, general code cleanup

* swap python 3.7 support for 3.11

3.7 has reached eol

* fix: PyG typos

* cleanup: udf behaviour (dgl to arangodb)

* fix: rich progress style

* lock python-arango version

* new: notebook output file

* code cleanup

* fix: explicit_metagraph

that took a while to find...

* cleanup function order

* more cleanup

* address comments

* fix: PyG typos

* Update README.md

* fix: typo

* DGL Refactor Updates (#31)

* initial commit

* bump

* cleanup workflows

* Update build.yml

* Update build.yml

* parameter renaming, new `use_async` param

* update release action

* Update README.md

* Update README.md
  • Loading branch information
aMahanna committed Oct 26, 2023
1 parent 5d98756 commit 0f40b1d
Show file tree
Hide file tree
Showing 56 changed files with 9,825 additions and 1,921 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: build
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
push:
branches: [ master ]
env:
PACKAGE_DIR: adbdgl_adapter
Expand All @@ -13,34 +12,47 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9"]
python: ["3.8", "3.9", "3.10", "3.11"]
name: Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: setup.py

- name: Set up ArangoDB Instance via Docker
run: docker create --name adb -p 8529:8529 -e ARANGO_ROOT_PASSWORD= arangodb/arangodb:3.9.1
run: docker create --name adb -p 8529:8529 -e ARANGO_ROOT_PASSWORD= arangodb/arangodb

- name: Start ArangoDB Instance
run: docker start adb

- name: Setup pip
run: python -m pip install --upgrade pip setuptools wheel

- name: Install packages
run: pip install .[dev]

- name: Run black
run: black --check --verbose --diff --color ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}

- name: Run flake8
run: flake8 ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}

- name: Run isort
run: isort --check --profile=black ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}

- name: Run mypy
run: mypy ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}

- name: Run pytest
run: pytest --cov=${{env.PACKAGE_DIR}} --cov-report xml --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes

- name: Publish to coveralls.io
if: matrix.python == '3.8'
if: matrix.python == '3.10'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
70 changes: 14 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,34 @@ on:
workflow_dispatch:
release:
types: [published]
env:
PACKAGE_DIR: adbdgl_adapter
TESTS_DIR: tests
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9"]
name: Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Set up ArangoDB Instance via Docker
run: docker create --name adb -p 8529:8529 -e ARANGO_ROOT_PASSWORD= arangodb/arangodb:3.9.1
- name: Start ArangoDB Instance
run: docker start adb
- name: Setup pip
run: python -m pip install --upgrade pip setuptools wheel
- name: Install packages
run: pip install .[dev]
- name: Run black
run: black --check --verbose --diff --color ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
- name: Run flake8
run: flake8 ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
- name: Run isort
run: isort --check --profile=black ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
- name: Run mypy
run: mypy ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}}
- name: Run pytest
run: pytest --cov=${{env.PACKAGE_DIR}} --cov-report xml --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes
- name: Publish to coveralls.io
if: matrix.python == '3.8'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github

release:
needs: build
runs-on: ubuntu-latest
name: Release package
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Fetch complete history for all tags and branches
run: git fetch --prune --unshallow

- name: Setup python
uses: actions/setup-python@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10"

- name: Install release packages
run: pip install setuptools wheel twine setuptools-scm[toml]

- name: Install dependencies
run: pip install .[dev]

- name: Build distribution
run: python setup.py sdist bdist_wheel

- name: Publish to PyPI Test
- name: Publish to Test PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
run: twine upload --repository testpypi dist/* #--skip-existing
- name: Publish to PyPI

- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand All @@ -83,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
name: Update Changelog
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -95,10 +53,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup python
uses: actions/setup-python@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10"

- name: Install release packages
run: pip install wheel gitchangelog pystache
Expand All @@ -110,12 +68,12 @@ jobs:
run: gitchangelog ${{env.VERSION}} > CHANGELOG.md

- name: Make commit for auto-generated changelog
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
add: "CHANGELOG.md"
branch: actions/changelog
new_branch: actions/changelog
message: "!gitchangelog"

- name: Create pull request for the auto generated changelog
Expand All @@ -128,4 +86,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Alert developer of open PR
run: echo "Changelog $PR_URL is ready to be merged by developer."
run: echo "Changelog $PR_URL is ready to be merged by developer."
Loading

0 comments on commit 0f40b1d

Please sign in to comment.