bittensor-pylon-client 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bittensor_pylon_client-0.1.0/.dockerignore +9 -0
- bittensor_pylon_client-0.1.0/.github/actions/setup-python-env/action.yml +22 -0
- bittensor_pylon_client-0.1.0/.github/actions/validate-version/action.yml +49 -0
- bittensor_pylon_client-0.1.0/.github/workflows/cd-docker.yml +53 -0
- bittensor_pylon_client-0.1.0/.github/workflows/cd-pypi.yml +56 -0
- bittensor_pylon_client-0.1.0/.github/workflows/ci.yml +48 -0
- bittensor_pylon_client-0.1.0/.gitignore +15 -0
- bittensor_pylon_client-0.1.0/CHECKLISTS.md +26 -0
- bittensor_pylon_client-0.1.0/CLAUDE.md +437 -0
- bittensor_pylon_client-0.1.0/Dockerfile +26 -0
- bittensor_pylon_client-0.1.0/PKG-INFO +32 -0
- bittensor_pylon_client-0.1.0/README.md +292 -0
- bittensor_pylon_client-0.1.0/alembic.ini +36 -0
- bittensor_pylon_client-0.1.0/docker-run.sh +16 -0
- bittensor_pylon_client-0.1.0/noxfile.py +37 -0
- bittensor_pylon_client-0.1.0/pylon/__init__.py +1 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/asynchronous/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/asynchronous/api.py +392 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/asynchronous/client.py +87 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/asynchronous/communicators.py +248 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/asynchronous/config.py +25 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/config.py +38 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/sync/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/sync/api.py +381 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/sync/client.py +87 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/sync/communicators.py +246 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/client/sync/config.py +25 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/apiver.py +9 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/bodies.py +66 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/constants.py +2 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/currency.py +44 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/endpoints.py +48 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/exceptions.py +40 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/models.py +178 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/requests.py +144 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/responses.py +82 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/settings.py +56 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/common/types.py +76 -0
- bittensor_pylon_client-0.1.0/pylon/_internal/docker_manager.py +88 -0
- bittensor_pylon_client-0.1.0/pylon/service/__init__.py +1 -0
- bittensor_pylon_client-0.1.0/pylon/service/api.py +194 -0
- bittensor_pylon_client-0.1.0/pylon/service/bittensor/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/pylon/service/bittensor/client.py +650 -0
- bittensor_pylon_client-0.1.0/pylon/service/bittensor/pool.py +159 -0
- bittensor_pylon_client-0.1.0/pylon/service/dependencies.py +40 -0
- bittensor_pylon_client-0.1.0/pylon/service/envs/docker-compose.yaml.example +9 -0
- bittensor_pylon_client-0.1.0/pylon/service/envs/test_env.template +27 -0
- bittensor_pylon_client-0.1.0/pylon/service/exceptions.py +6 -0
- bittensor_pylon_client-0.1.0/pylon/service/identities.py +39 -0
- bittensor_pylon_client-0.1.0/pylon/service/lifespans.py +26 -0
- bittensor_pylon_client-0.1.0/pylon/service/main.py +43 -0
- bittensor_pylon_client-0.1.0/pylon/service/metrics.py +326 -0
- bittensor_pylon_client-0.1.0/pylon/service/prometheus_controller.py +54 -0
- bittensor_pylon_client-0.1.0/pylon/service/routers.py +13 -0
- bittensor_pylon_client-0.1.0/pylon/service/schema.py +33 -0
- bittensor_pylon_client-0.1.0/pylon/service/sentry_config.py +20 -0
- bittensor_pylon_client-0.1.0/pylon/service/settings.py +3 -0
- bittensor_pylon_client-0.1.0/pylon/service/tasks.py +170 -0
- bittensor_pylon_client-0.1.0/pylon/service/utils.py +74 -0
- bittensor_pylon_client-0.1.0/pylon/v1/__init__.py +66 -0
- bittensor_pylon_client-0.1.0/pyproject.toml +109 -0
- bittensor_pylon_client-0.1.0/tests/.test-env +18 -0
- bittensor_pylon_client-0.1.0/tests/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/base_test.py +247 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/conftest.py +41 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/test_get_commitment.py +26 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/test_get_commitments.py +42 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/test_get_latest_neurons.py +44 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/test_get_neurons.py +47 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/test_set_commitment.py +161 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/identity/test_set_weights.py +77 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/open_access/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/open_access/test_get_commitment.py +26 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/open_access/test_get_commitments.py +42 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/open_access/test_get_latest_neurons.py +42 -0
- bittensor_pylon_client-0.1.0/tests/client/asynchronous/open_access/test_get_neurons.py +96 -0
- bittensor_pylon_client-0.1.0/tests/client/conftest.py +13 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/base_test.py +182 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/conftest.py +41 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/test_get_commitment.py +26 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/test_get_commitments.py +41 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/test_get_latest_neurons.py +28 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/test_get_neurons.py +46 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/test_set_commitment.py +157 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/identity/test_set_weights.py +76 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/open_access/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/open_access/test_get_commitment.py +26 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/open_access/test_get_commitments.py +41 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/open_access/test_get_latest_neurons.py +28 -0
- bittensor_pylon_client-0.1.0/tests/client/synchronous/open_access/test_get_neurons.py +95 -0
- bittensor_pylon_client-0.1.0/tests/client/test_async_config.py +80 -0
- bittensor_pylon_client-0.1.0/tests/client/test_sync_config.py +77 -0
- bittensor_pylon_client-0.1.0/tests/conftest.py +14 -0
- bittensor_pylon_client-0.1.0/tests/factories.py +11 -0
- bittensor_pylon_client-0.1.0/tests/helpers.py +31 -0
- bittensor_pylon_client-0.1.0/tests/mock_bittensor_client.py +267 -0
- bittensor_pylon_client-0.1.0/tests/mock_data.json +76 -0
- bittensor_pylon_client-0.1.0/tests/service/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/test_bittensor_client_delegation.py +242 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/test_bittensor_client_pool.py +238 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/conftest.py +87 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_commit_weights.py +85 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_generate_certificate_keypair.py +47 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_block.py +12 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_certificate.py +51 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_certificates.py +46 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_commitment.py +42 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_commitments.py +47 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_hyperparams.py +34 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_neurons.py +180 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_neurons_list.py +166 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_get_subnet_state.py +104 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_set_commitment.py +19 -0
- bittensor_pylon_client-0.1.0/tests/service/bittensor/turbobt/test_set_weights.py +84 -0
- bittensor_pylon_client-0.1.0/tests/service/conftest.py +73 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_generate_certificate_keypair_endpoint.py +123 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_certificate_by_hotkey_endpoint.py +59 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_certificates_endpoint.py +65 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_commitment_by_hotkey_endpoint.py +45 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_commitments_endpoint.py +48 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_latest_neurons_endpoint.py +81 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_neurons_endpoint.py +123 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_get_own_certificate_endpoint.py +59 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_put_weights_endpoint.py +143 -0
- bittensor_pylon_client-0.1.0/tests/service/identity_endpoints/test_set_commitment_endpoint.py +157 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/__init__.py +0 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/test_get_certificate_by_hotkey_endpoint.py +61 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/test_get_certificates_endpoint.py +65 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/test_get_commitment_by_hotkey_endpoint.py +49 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/test_get_commitments_endpoint.py +48 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/test_get_latest_neurons_endpoint.py +73 -0
- bittensor_pylon_client-0.1.0/tests/service/open_access_endpoints/test_get_neurons_endpoint.py +125 -0
- bittensor_pylon_client-0.1.0/tests/service/test_identities_settings.py +40 -0
- bittensor_pylon_client-0.1.0/tests/service/test_metrics_endpoint.py +85 -0
- bittensor_pylon_client-0.1.0/tests/wallets/pylon/coldkey +0 -0
- bittensor_pylon_client-0.1.0/tests/wallets/pylon/coldkeypub.txt +1 -0
- bittensor_pylon_client-0.1.0/tests/wallets/pylon/hotkeys/pylon +1 -0
- bittensor_pylon_client-0.1.0/tests/wallets/pylon/hotkeys/pylonpub.txt +1 -0
- bittensor_pylon_client-0.1.0/uv.lock +1534 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Setup python env
|
|
2
|
+
description: Set up Python with uv and nox
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
description: Python version to use
|
|
7
|
+
required: true
|
|
8
|
+
|
|
9
|
+
runs:
|
|
10
|
+
using: composite
|
|
11
|
+
steps:
|
|
12
|
+
- name: Set up Python
|
|
13
|
+
uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: ${{ inputs.python-version }}
|
|
16
|
+
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v7.1.3
|
|
19
|
+
|
|
20
|
+
- name: Install nox
|
|
21
|
+
shell: bash
|
|
22
|
+
run: pip install nox==2025.11.12
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Validate Version
|
|
2
|
+
description: Validates that the git tag version matches the version in code
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
tag-prefix:
|
|
6
|
+
description: 'Prefix to strip from the tag (e.g., "client-v" or "service-v")'
|
|
7
|
+
required: true
|
|
8
|
+
version-file:
|
|
9
|
+
description: 'Path to the file containing __version__ (e.g., "pylon/__init__.py")'
|
|
10
|
+
required: true
|
|
11
|
+
|
|
12
|
+
outputs:
|
|
13
|
+
version:
|
|
14
|
+
description: 'The extracted version from the tag'
|
|
15
|
+
value: ${{ steps.extract.outputs.VERSION }}
|
|
16
|
+
|
|
17
|
+
runs:
|
|
18
|
+
using: composite
|
|
19
|
+
steps:
|
|
20
|
+
- name: Extract version from tag
|
|
21
|
+
id: extract
|
|
22
|
+
shell: bash
|
|
23
|
+
run: |
|
|
24
|
+
TAG="${GITHUB_REF#refs/tags/}"
|
|
25
|
+
VERSION="${TAG#${{ inputs.tag-prefix }}}"
|
|
26
|
+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
27
|
+
echo "Extracted version: $VERSION"
|
|
28
|
+
|
|
29
|
+
- name: Get version from code
|
|
30
|
+
id: code_version
|
|
31
|
+
shell: bash
|
|
32
|
+
run: |
|
|
33
|
+
CODE_VERSION=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' ${{ inputs.version-file }})
|
|
34
|
+
echo "CODE_VERSION=$CODE_VERSION" >> $GITHUB_OUTPUT
|
|
35
|
+
echo "Version in ${{ inputs.version-file }}: $CODE_VERSION"
|
|
36
|
+
|
|
37
|
+
- name: Validate version match
|
|
38
|
+
shell: bash
|
|
39
|
+
run: |
|
|
40
|
+
TAG_VERSION="${{ steps.extract.outputs.VERSION }}"
|
|
41
|
+
CODE_VERSION="${{ steps.code_version.outputs.CODE_VERSION }}"
|
|
42
|
+
|
|
43
|
+
if [ "$TAG_VERSION" != "$CODE_VERSION" ]; then
|
|
44
|
+
echo "::error::Version mismatch! Tag version ($TAG_VERSION) does not match code version ($CODE_VERSION)"
|
|
45
|
+
echo "Please update ${{ inputs.version-file }} to match the tag version."
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
echo "Version validation passed: $TAG_VERSION"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: CD Docker
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'service-v*'
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
DOCKER_REPO_NAME: "backenddevelopersltd/bittensor-pylon"
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
validate-version:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
outputs:
|
|
18
|
+
version: ${{ steps.validate.outputs.version }}
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Validate version
|
|
23
|
+
id: validate
|
|
24
|
+
uses: ./.github/actions/validate-version
|
|
25
|
+
with:
|
|
26
|
+
tag-prefix: 'service-v'
|
|
27
|
+
version-file: 'pylon/service/__init__.py'
|
|
28
|
+
|
|
29
|
+
docker-push:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
needs: validate-version
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Set up Docker Buildx
|
|
36
|
+
uses: docker/setup-buildx-action@v3
|
|
37
|
+
|
|
38
|
+
- name: Log in to Docker Hub
|
|
39
|
+
uses: docker/login-action@v3
|
|
40
|
+
with:
|
|
41
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
42
|
+
password: ${{ secrets.DOCKERHUB_KEY }}
|
|
43
|
+
|
|
44
|
+
- name: Build and push image
|
|
45
|
+
uses: docker/build-push-action@v5
|
|
46
|
+
with:
|
|
47
|
+
context: .
|
|
48
|
+
push: true
|
|
49
|
+
tags: |
|
|
50
|
+
${{ env.DOCKER_REPO_NAME }}:${{ needs.validate-version.outputs.version }}
|
|
51
|
+
${{ env.DOCKER_REPO_NAME }}:latest
|
|
52
|
+
cache-from: type=gha
|
|
53
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: CD PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'client-v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
validate-version:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
version: ${{ steps.validate.outputs.version }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Validate version
|
|
20
|
+
id: validate
|
|
21
|
+
uses: ./.github/actions/validate-version
|
|
22
|
+
with:
|
|
23
|
+
tag-prefix: 'client-v'
|
|
24
|
+
version-file: 'pylon/__init__.py'
|
|
25
|
+
|
|
26
|
+
release-build:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
needs: validate-version
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- uses: astral-sh/setup-uv@v6
|
|
33
|
+
|
|
34
|
+
- name: Build release distributions
|
|
35
|
+
run: uv build
|
|
36
|
+
|
|
37
|
+
- name: Upload distributions
|
|
38
|
+
uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: release-dists
|
|
41
|
+
path: dist/
|
|
42
|
+
|
|
43
|
+
pypi-publish:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
needs: [validate-version, release-build]
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write
|
|
48
|
+
steps:
|
|
49
|
+
- name: Retrieve release distributions
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: release-dists
|
|
53
|
+
path: dist/
|
|
54
|
+
|
|
55
|
+
- name: Publish package distributions to PyPI
|
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, main]
|
|
6
|
+
tags:
|
|
7
|
+
- 'client-v*'
|
|
8
|
+
- 'service-v*'
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
TAG_VERSION: "v1-latest"
|
|
13
|
+
DOCKER_REPO_NAME: "backenddevelopersltd/bittensor-pylon"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout code
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Setup python env
|
|
23
|
+
uses: ./.github/actions/setup-python-env
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.12'
|
|
26
|
+
|
|
27
|
+
- name: Run linting checks with nox
|
|
28
|
+
run: nox -s lint
|
|
29
|
+
|
|
30
|
+
test:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout code
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Setup python env
|
|
37
|
+
uses: ./.github/actions/setup-python-env
|
|
38
|
+
with:
|
|
39
|
+
python-version: '3.12'
|
|
40
|
+
|
|
41
|
+
- name: Create dotenv file
|
|
42
|
+
run: cp ./pylon/service/envs/test_env.template .env
|
|
43
|
+
|
|
44
|
+
- name: Run unit tests with nox
|
|
45
|
+
env:
|
|
46
|
+
PYLON_DOCKER_IMAGE_NAME: ${{ env.DOCKER_REPO_NAME }}:${{ env.TAG_VERSION }}
|
|
47
|
+
run: nox -s test
|
|
48
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Checklists
|
|
2
|
+
|
|
3
|
+
This file contains checklists of things that must be done when implementing a specific kind of feature. Developers
|
|
4
|
+
are encouraged to follow the checklist to not forget anything before posting a PR. The checklists may be handy for
|
|
5
|
+
LLM agents to make a review or implement missing steps.
|
|
6
|
+
|
|
7
|
+
If no proper feature category is here, it may be added if needed.
|
|
8
|
+
|
|
9
|
+
## Adding new endpoint to the Pylon service
|
|
10
|
+
|
|
11
|
+
* Add the endpoint
|
|
12
|
+
* Add endpoint tests in tests/service:
|
|
13
|
+
* success (with and without optional parameters if applicable)
|
|
14
|
+
* edge cases (for example empty response, edge parameters etc.)
|
|
15
|
+
* validation errors
|
|
16
|
+
* other possible errors
|
|
17
|
+
* All a PylonRequest and a PylonResponse for the Pylon client.
|
|
18
|
+
* PylonRequest should be used as an input data for write endpoints (unless it does not contain any parameters)
|
|
19
|
+
* Implement a proper translation for PylonRequest in the Pylon client
|
|
20
|
+
* Expose the PylonRequest and PylonResponse by the public interface (apiver)
|
|
21
|
+
* Add tests for the pylon client in tests/client:
|
|
22
|
+
* proper response from api (with and without optional parameters if applicable)
|
|
23
|
+
* edge cases if any applicable
|
|
24
|
+
* pylon request validation errors
|
|
25
|
+
* other possible errors
|
|
26
|
+
* Check if the information in README is not stale.
|