-
Notifications
You must be signed in to change notification settings - Fork 90
chore(ci/cd): add pipelines + modernize repo #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
df22737
5b2d3e3
38be49d
4d738b1
0725506
70a3efa
0ec019e
538c4fb
8ede8b3
6f0b024
18afb64
4e768ca
0ed1a40
95e4b1d
d5f137e
a89c2cb
2aaad97
d1d23bb
b7ce420
a08ca40
5c38da1
a532340
1778307
f04b2af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 -r requirements_dev.txt | ||
| # 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/* |
| 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.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,6 @@ This is the official Dgraph database client implementation for Python (Python >= | |
|
|
||
| This client follows the [Dgraph Go client][goclient] closely. | ||
|
|
||
| **Use [Discuss Issues](https://discuss.dgraph.io/c/issues/35/clients/46) to report issues about this repository.** | ||
|
|
||
| [goclient]: https://github.com/dgraph-io/dgo | ||
|
|
||
| Before using this client, we highly recommend that you read the [Dgraph Python | ||
|
|
@@ -45,14 +43,6 @@ Install using pip: | |
| pip install pydgraph | ||
| ``` | ||
|
|
||
| ### Install Notes | ||
|
|
||
| To avoid issues when adding composite credentials or when using client authorization, please install gRPC version 1.19.0: | ||
|
|
||
| ```sh | ||
| pip install grpcio==1.19.0 | ||
| ``` | ||
|
|
||
| ## Supported Versions | ||
|
|
||
| Depending on the version of Dgraph that you are connecting to, you will have to | ||
|
|
@@ -63,6 +53,7 @@ use a different version of this client. | |
| | 1.0.X | <= *1.2.0* | | ||
| | 1.1.X | >= *2.0.0* | | ||
| | 1.2.X | >= *2.0.0* | | ||
| | 23.X.Y | >= *23.0.0* | | ||
|
|
||
| ## Quickstart | ||
|
|
||
|
|
@@ -100,7 +91,7 @@ op = pydgraph.Operation(schema=schema) | |
| client.alter(op) | ||
| ``` | ||
|
|
||
| Starting with Dgraph version 20.03.0, indexes can be computed in the background. | ||
| Indexes can be computed in the background. | ||
mangalaman93 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| You can set the `run_in_background` field of `pydgraph.Operation` to `True` | ||
| before passing it to the `Alter` function. You can find more details | ||
| [here](https://docs.dgraph.io/master/query-language/#indexes-in-background). | ||
|
|
@@ -465,12 +456,13 @@ except Exception as e: | |
|
|
||
| ## Development | ||
|
|
||
| ### Building the source | ||
| ### Build from source | ||
|
|
||
| To build and install pydgraph locally, run | ||
|
|
||
| ```sh | ||
| python setup.py install | ||
| # To install for the current user, use this instead: | ||
| # python setup.py install --user | ||
| python -m build | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| If you have made changes to the `pydgraph/proto/api.proto` file, you need need | ||
|
|
@@ -494,16 +486,14 @@ The required change is outlined below as a diff. | |
|
|
||
| ### Running tests | ||
|
|
||
| To run the tests in your local machine, install and run `tox`: | ||
| To run the tests in your local machine, run: | ||
|
|
||
| ```bash | ||
| pip install tox | ||
| tox | ||
| bash scripts/local-test.sh | ||
| ``` | ||
|
|
||
| This script assumes Dgraph and [dgo](https://github.com/dgraph-io/dgo) (Go | ||
| client) are already built on the local machine and that their code is in | ||
| `$GOPATH/src`. It also requires that docker and docker-compose are installed in | ||
| This script assumes dgraph is located on your path. Dgraph release binaries can be found [here](https://github.com/dgraph-io/dgraph/releases). | ||
|
||
| The test script also requires that `docker` and `docker compose` are installed on | ||
| your machine. | ||
|
|
||
| The script will take care of bringing up a Dgraph cluster and bringing it down | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't we need to follow calver for pydgraph. We should just do a minor release instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it is not clean but unfortunately there are already calver releases for pydgraph: https://github.com/dgraph-io/pydgraph/releases
The latest release is v21.03.0. The table here was not updated.