-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci/cd): add pipelines + modernize repo (#193)
This PR adds a CD pipeline for pydgraph. We also bring the repo into the modern era to support Python 3.11, and use modern build tools. Some noteworthy points: * python setup.py [command] is being deprecated (see here e.g.). * The correct approach now is to use "front end" build tools like python -m build and pip install -e . instead of invoking setup.py directly * We introduce a pyproject.toml file, which deprecates setup.py, requirements.txt, setup.cfg, etc. * We remove requirements.txt since this information can be found in pyproject.toml * Dev requirements introduced as optional dependencies in pyproject.toml (use pip install .[dev] from local repo, or pip install pydgraph[dev] once it is pushed to pypi) * Test framework is unified (i.e. local tests and CI tests use the same script local-test.sh) * README and PUBLISHING updated to reflect the above changes
- Loading branch information
1 parent
d81466a
commit 323a877
Showing
20 changed files
with
378 additions
and
1,765 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: cd-pydgraph | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releasetag: | ||
description: 'releasetag' | ||
required: true | ||
type: string | ||
jobs: | ||
pydgraph-build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: '${{ github.event.inputs.releasetag }}' | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[dev] | ||
# use twine to upload to pypi | ||
python -m pip install twine | ||
- name: Verify that protobufs are checked in | ||
run: | | ||
# should be a no-op | ||
python scripts/protogen.py | ||
git diff --exit-code -- . | ||
- name: Build pydgraph | ||
run: | | ||
rm -rf dist | ||
# build binary wheel and a source tarball | ||
python -m build | ||
- name: Upload to PyPi | ||
run: twine upload --username dgraph-io --password ${{ secrets.DGRAPH_PYPI_PASSWORD }} dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ pydgraph.iml | |
# Python Virtual Environments | ||
venv | ||
.venv | ||
pyvenv.cfg |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
|
||
"""Metadata about this package.""" | ||
|
||
VERSION = '21.3.2' | ||
VERSION = '23.0.0rc1' |
Oops, something went wrong.