diff --git a/.github/ISSUE_TEMPLATE/01-feature_request.yaml b/.github/ISSUE_TEMPLATE/01-feature_request.yaml new file mode 100644 index 0000000..085b9b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-feature_request.yaml @@ -0,0 +1,36 @@ +--- +name: ✨ Feature Request +description: Propose a new Diode SDK Python feature or enhancement +labels: ["enhancement", "status: needs triage"] +body: + - type: input + attributes: + label: Diode SDK Python version + description: What version of Diode SDK Python are you currently running? + placeholder: v0.4.0 + validations: + required: true + - type: dropdown + attributes: + label: Feature type + options: + - New ingestion entity type or new field of existing entity type + - New functionality + - Change to existing functionality + validations: + required: true + - type: textarea + attributes: + label: Proposed feature or enhancement + description: > + Describe in detail the new feature or enhancement you are proposing. The more detail you provide here, + the greater chance your proposal has of being discussed. + validations: + required: true + - type: textarea + attributes: + label: Use case + description: > + Explain how adding this feature or enhancement would benefit Diode users. What need does it address? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/02-bug_report.yaml b/.github/ISSUE_TEMPLATE/02-bug_report.yaml new file mode 100644 index 0000000..6c5ad64 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-bug_report.yaml @@ -0,0 +1,53 @@ +--- +name: 🐛 Bug Report +description: Report a reproducible bug in the current release of Diode SDK Python +labels: ["bug", "status: needs triage"] +body: + - type: input + attributes: + label: Diode SDK Python version + description: What version of Diode SDK Python are you currently running? + placeholder: v0.4.0 + validations: + required: true + - type: input + attributes: + label: Diode version + description: What version of Diode are you currently running? + placeholder: v0.6.0 + validations: + required: true + - type: input + attributes: + label: Diode NetBox Plugin version + description: What version of Diode NetBox Plugin are you currently running? + placeholder: v0.6.0 + validations: + required: true + - type: input + attributes: + label: NetBox version + description: What version of NetBox are you currently running? + placeholder: v4.1.3 + validations: + required: true + - type: textarea + attributes: + label: Steps to reproduce + description: > + Describe in detail the exact steps that someone else can take to reproduce this bug using given Diode SDK + Python, Diode, Diode NetBox Plugin and NetBox versions. + validations: + required: true + - type: textarea + attributes: + label: Expected behavior + description: What did you expect to happen? + validations: + required: true + - type: textarea + attributes: + label: Observed behavior + description: What happened instead? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/03-documentation_change.yaml b/.github/ISSUE_TEMPLATE/03-documentation_change.yaml new file mode 100644 index 0000000..4f34b79 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03-documentation_change.yaml @@ -0,0 +1,35 @@ +--- +name: 📖 Documentation Change +description: Suggest an addition or modification to the Diode SDK Python documentation +labels: ["documentation", "status: needs triage"] +body: + - type: dropdown + attributes: + label: Change type + description: What type of change are you proposing? + options: + - Addition + - Correction + - Removal + - Cleanup (formatting, typos, etc.) + validations: + required: true + - type: dropdown + attributes: + label: Area + description: To what section of the documentation does this change primarily pertain? + options: + - Features + - Installation/upgrade + - Getting started + - Configuration + - Development + - Other + validations: + required: true + - type: textarea + attributes: + label: Proposed changes + description: Describe the proposed changes and why they are necessary. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9464388..328952b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,12 +9,18 @@ concurrency: cancel-in-progress: false env: - GH_TOKEN: ${{ secrets.ORB_CI_GH_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SEMANTIC_RELEASE_PACKAGE: ${{ github.repository }} PYTHON_RUNTIME_VERSION: "3.11" APP_NAME: diode-sdk-python PYTHON_PACKAGE_NAME: netboxlabs-diode-sdk +permissions: + id-token: write + contents: write + issues: write + pull-requests: write + jobs: get-python-package-name: name: Get Python package name @@ -126,9 +132,6 @@ jobs: needs: [ get-python-package-name, get-next-version ] runs-on: ubuntu-latest timeout-minutes: 5 - permissions: - id-token: write - contents: read env: BUILD_VERSION: ${{ needs.get-next-version.outputs.new-release-version }} BUILD_TRACK: release diff --git a/README.md b/README.md index cf4b941..53cac60 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ pip install netboxlabs-diode-sdk ### Example -* `target` should be the address of the Diode service, e.g. `grpc://localhost:8081` for insecure connection +* `target` should be the address of the Diode service, e.g. `grpc://localhost:8080/diode` for insecure connection or `grpcs://example.com` for secure connection. ```python @@ -39,7 +39,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: diff --git a/docs/entities.md b/docs/entities.md index 49681fc..d320391 100644 --- a/docs/entities.md +++ b/docs/entities.md @@ -33,7 +33,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -141,7 +141,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -241,7 +241,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -324,7 +324,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -399,7 +399,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -452,7 +452,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -506,7 +506,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -574,7 +574,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -679,7 +679,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -770,7 +770,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -820,7 +820,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -875,7 +875,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -987,7 +987,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -1137,7 +1137,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: @@ -1289,7 +1289,7 @@ from netboxlabs.diode.sdk.ingester import ( def main(): with DiodeClient( - target="grpc://localhost:8081", + target="grpc://localhost:8080/diode", app_name="my-test-app", app_version="0.0.1", ) as client: diff --git a/netboxlabs/diode/sdk/client.py b/netboxlabs/diode/sdk/client.py index c62bae6..44049c8 100644 --- a/netboxlabs/diode/sdk/client.py +++ b/netboxlabs/diode/sdk/client.py @@ -16,6 +16,7 @@ from netboxlabs.diode.sdk.diode.v1 import ingester_pb2, ingester_pb2_grpc from netboxlabs.diode.sdk.exceptions import DiodeClientError, DiodeConfigError from netboxlabs.diode.sdk.ingester import Entity +from netboxlabs.diode.sdk.version import version_semver _DIODE_API_KEY_ENVVAR_NAME = "DIODE_API_KEY" _DIODE_SDK_LOG_LEVEL_ENVVAR_NAME = "DIODE_SDK_LOG_LEVEL" @@ -69,7 +70,7 @@ class DiodeClient: """Diode Client.""" _name = "diode-sdk-python" - _version = "0.0.1" + _version = version_semver() _app_name = None _app_version = None _channel = None diff --git a/pyproject.toml b/pyproject.toml index 44a7ff1..3388bec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ # Optional dependencies = [ "certifi==2024.7.4", - "grpcio==1.62.1", - "grpcio-status==1.62.1", + "grpcio==1.68.1", + "grpcio-status==1.68.1", "sentry-sdk>=2.2.1", ] diff --git a/tests/test_client.py b/tests/test_client.py index f1d6596..02a319c 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -19,6 +19,7 @@ parse_target, ) from netboxlabs.diode.sdk.exceptions import DiodeClientError, DiodeConfigError +from netboxlabs.diode.sdk.version import version_semver def test_init(): @@ -31,7 +32,7 @@ def test_init(): ) assert config.target == "localhost:8081" assert config.name == "diode-sdk-python" - assert config.version == "0.0.1" + assert config.version == version_semver() assert config.app_name == "my-producer" assert config.app_version == "0.0.1" assert config.tls_verify is False @@ -370,7 +371,7 @@ def test_client_properties_return_expected_values(): api_key="abcde", ) assert client.name == "diode-sdk-python" - assert client.version == "0.0.1" + assert client.version == version_semver() assert client.target == "localhost:8081" assert client.path == "" assert client.tls_verify is False