Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"changelog": false,
"bumpVersionsWithWorkspaceProtocolOnly": true,
"privatePackages": {
"version": false,
"version": true,
"tag": false
}
},
"ignore": ["@apps/*", "@tools/*"]
}
2 changes: 1 addition & 1 deletion .github/workflows/cd-gitbook-sdk-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish SDK Docs to GitBook
on:
push:
tags:
- "sdk@*"
- "js/sdk@*"

permissions:
contents: read
Expand Down
55 changes: 29 additions & 26 deletions .github/workflows/cd-python-sdk.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,60 @@
name: Python SDK publish

permissions:
contents: write

on:
release:
types: [published]
workflow_dispatch:
inputs:
release_version:
description: 'Release version to use'
required: true
push:
branches:
- main
paths:
- "packages/sdk/python/human-protocol-sdk/**"

jobs:
publish-python-sdk:
name: Publish Python SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GH_GITBOOK_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
- name: Install JS dependencies
run: yarn install
- name: Build core package
run: yarn workspace @human-protocol/core build
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install dependencies
- name: Read package version
id: read_version
run: |
VERSION=$(jq -r '.version' packages/sdk/python/human-protocol-sdk/package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Install build deps
working-directory: ./packages/sdk/python/human-protocol-sdk
run: |
python -m pip install --upgrade pip
pip install setuptools==68.2.2 wheel twine
- name: Set the release version
uses: "DamianReeves/write-file-action@master"
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
path: ./packages/sdk/python/human-protocol-sdk/human_protocol_sdk/__init__.py
write-mode: overwrite
contents: |
__version__ = "${{ github.event.release.tag_name }}"
- name: Set the release version
uses: "DamianReeves/write-file-action@master"
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
path: ./packages/sdk/python/human-protocol-sdk/human_protocol_sdk/__init__.py
write-mode: overwrite
contents: |
__version__ = "${{ github.event.inputs.release_version }}"
- name: Build and publish
working-directory: ./packages/sdk/python/human-protocol-sdk
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: make publish-package
- name: Create and push tag
working-directory: ./packages/sdk/python/human-protocol-sdk
run: |
make publish-package
VERSION="${{ steps.read_version.outputs.version }}"
TAG="python/sdk@${VERSION}"
echo "Version: $VERSION | Tag: $TAG"
if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then
echo "Tag ${TAG} already exists. Skipping tag creation."
exit 0
fi
git tag -a "$TAG" -m "Python SDK $VERSION"
git push origin "$TAG"
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Dashboard Check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/human-protocol-sdk/**'
- 'packages/apps/dashboard/**'
- "packages/core/**"
- "packages/sdk/typescript/human-protocol-sdk/**"
- "packages/apps/dashboard/**"

jobs:
dashboard-server-test:
Expand All @@ -22,4 +22,4 @@ jobs:
- name: Build libs
run: yarn build:libs
- name: Run dashboard Server test
run: yarn workspace @human-protocol/dashboard-server test
run: yarn workspace @apps/dashboard-server test
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-faucet-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Faucet server check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/human-protocol-sdk/**'
- 'packages/apps/faucet/server/**'
- "packages/core/**"
- "packages/sdk/typescript/human-protocol-sdk/**"
- "packages/apps/faucet/server/**"

jobs:
faucet-server-test:
Expand All @@ -25,4 +25,4 @@ jobs:
run: cp .env.example .env
working-directory: packages/apps/faucet/server
- name: Run faucet/server test
run: yarn workspace @human-protocol/faucet-server test
run: yarn workspace @apps/faucet-server test
10 changes: 5 additions & 5 deletions .github/workflows/ci-test-fortune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Fortune check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/human-protocol-sdk/**'
- 'packages/apps/fortune/**'
- "packages/core/**"
- "packages/sdk/typescript/human-protocol-sdk/**"
- "packages/apps/fortune/**"

jobs:
fortune-exchange-oracle-test:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Build libs
run: yarn build:libs
- name: Run Exchange Oracle tests
run: yarn workspace @human-protocol/fortune-exchange-oracle-server test
run: yarn workspace @apps/fortune-exchange-oracle-server test

fortune-recording-oracle-test:
name: Fortune Recording Oracle Tests
Expand All @@ -38,4 +38,4 @@ jobs:
- name: Build libs
run: yarn build:libs
- name: Run Recording Oracle tests
run: yarn workspace @human-protocol/fortune-recording-oracle test
run: yarn workspace @apps/fortune-recording-oracle test
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-human-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Human App Check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/human-protocol-sdk/**'
- 'packages/apps/human-app/**'
- "packages/core/**"
- "packages/sdk/typescript/human-protocol-sdk/**"
- "packages/apps/human-app/**"

jobs:
job-app-server-test:
Expand All @@ -22,4 +22,4 @@ jobs:
- name: Build libs
run: yarn build:libs
- name: Run Job Human App unit tests
run: yarn workspace @human-protocol/human-app-server test
run: yarn workspace @apps/human-app-server test
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-job-launcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Job Launcher Check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/human-protocol-sdk/**'
- 'packages/apps/job-launcher/**'
- "packages/core/**"
- "packages/sdk/typescript/human-protocol-sdk/**"
- "packages/apps/job-launcher/**"

jobs:
job-launcher-server-test:
Expand All @@ -22,4 +22,4 @@ jobs:
- name: Build libs
run: yarn build:libs
- name: Run Job Launcher Server test
run: yarn workspace @human-protocol/job-launcher-server test
run: yarn workspace @apps/job-launcher-server test
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-reputation-oracle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Reputation Oracle Check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/human-protocol-sdk/**'
- 'packages/apps/reputation-oracle/**'
- "packages/core/**"
- "packages/sdk/typescript/human-protocol-sdk/**"
- "packages/apps/reputation-oracle/**"

jobs:
reputation-oracle-test:
Expand All @@ -22,4 +22,4 @@ jobs:
- name: Build libs
run: yarn build:libs
- name: Run reputation oracle test
run: yarn workspace @human-protocol/reputation-oracle test
run: yarn workspace @apps/reputation-oracle test
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Subgraph check
on:
push:
paths:
- 'packages/core/**'
- 'packages/sdk/typescript/subgraph/**'
- "packages/core/**"
- "packages/sdk/typescript/subgraph/**"

jobs:
subgraph-test:
Expand All @@ -22,6 +22,6 @@ jobs:
- name: Build core package
run: yarn workspace @human-protocol/core build
- name: Generate manifest for Polygon for tests
run: NETWORK=polygon yarn workspace @human-protocol/subgraph generate
run: NETWORK=polygon yarn workspace @tools/subgraph generate
- name: Run subgraph test
run: yarn workspace @human-protocol/subgraph test
run: yarn workspace @tools/subgraph test
2 changes: 1 addition & 1 deletion docker-setup/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ services:

graph-node-db:
container_name: hp-dev-graph-node-db
image: postgres:latest
image: postgres:16
restart: *default-restart
logging:
<<: *default-logging
Expand Down
2 changes: 2 additions & 0 deletions docs/sdk/python/human_protocol_sdk.constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@ Enum for escrow statuses.
#### Partial *= 2*

#### Pending *= 1*

#### ToCancel *= 6*
Loading
Loading