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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ jobs:
with:
python-version: "3.10"
- run: pip install build
- name: Verify tag matches package version
run: |
TAG="${{ github.event.release.tag_name }}"
TAG_VERSION="${TAG#v}"
PKG_VERSION=$(python -c "
import ast, pathlib
tree = ast.parse(pathlib.Path('src/triggerdev/_version.py').read_text())
for node in ast.walk(tree):
if isinstance(node, ast.Assign):
for target in node.targets:
if isinstance(target, ast.Name) and target.id == '__version__':
print(ast.literal_eval(node.value))
")
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "::error::Tag version ($TAG_VERSION) does not match _version.py ($PKG_VERSION)"
exit 1
fi
- run: python -m build
- uses: actions/upload-artifact@v4.6.0
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ with Client() as client:

## Contributing

Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
Contributions are welcome. See [CONTRIBUTING.md](https://github.com/mehmetkr/triggerdev-python/blob/main/CONTRIBUTING.md) for guidelines.

## License

[MIT](LICENSE)
[MIT](https://github.com/mehmetkr/triggerdev-python/blob/main/LICENSE)
13 changes: 0 additions & 13 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

from __future__ import annotations

import httpx2
import pytest
import respx

from triggerdev import Client

Expand All @@ -19,17 +17,6 @@ def api_key() -> str:
return "tr_dev_sk_test_1234"


@pytest.fixture()
def respx_mock() -> respx.MockRouter:
with respx.mock(assert_all_called=False) as router:
yield router


@pytest.fixture()
def client(api_key: str, base_url: str) -> Client:
return Client(api_key=api_key, base_url=base_url)


@pytest.fixture()
def mock_response() -> httpx2.Response:
return httpx2.Response(200, json={"id": "run_1234"})