Skip to content

Test semantic release #35

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

Closed
wants to merge 14 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

- [ ] I have run the tests locally with `make install-dev` and `make test`
- [ ] I have updated the `README.md` if my changes affected it
- [ ] I have updated the package version in `linkup/_version.py` if I plan on creating a new release
- [ ] I have updated the package version in `linkup/_version.py` and `pyproject.toml` if I plan on creating a new release
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Semantic Release

on:
push:
branches:
- test_semantic_release

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.13"

- name: Install dependencies
run: |
uv pip install python-semantic-release

- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: semantic-release publish
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
install:
@echo "Installing local package..."
pip install .
install-dev:
@echo "Installing local package in developper mode..."
pip install -e .
pip install -r requirements-dev.txt
pre-commit install
@echo "Installing local package..."
uv sync
uv run pre-commit install
test:
@echo "Running tests..."
pre-commit run --all-files
mypy .
uv run pre-commit run --all-files
uv run mypy .
# Follow the test practices recommanded by LangChain (v0.3)
# See https://python.langchain.com/docs/contributing/how_to/integrations/standard_tests/
pytest --cov=linkup/ --cov-report term-missing --disable-socket --allow-unix-socket tests/unit_tests
uv run pytest --cov=src/linkup/ --cov-report term-missing --disable-socket --allow-unix-socket tests/unit_tests
# TODO: uncomment the following line when integration tests are ready
# pytest tests/integration_tests
release:
@echo "Running semantic release..."
semantic-release publish
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
[project]
name = "linkup-sdk"
version = "0.2.8"
description = "A Python Client SDK for the Linkup API"
readme = "README.md"
requires-python = ">=3.9"
authors = [
{ name = "LINKUP TECHNOLOGIES", email = "[email protected]" }
]
keywords = ["linkup", "api", "sdk", "client", "search"]
license = "MIT"

classifiers = [
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
]

dependencies = [
"httpx",
"pydantic"
]

[project.urls]
Homepage = "https://github.com/LinkupPlatform/linkup-python-sdk"
Documentation = "https://github.com/LinkupPlatform/linkup-python-sdk#readme"
Source = "https://github.com/LinkupPlatform/linkup-python-sdk"
Tracker = "https://github.com/LinkupPlatform/linkup-python-sdk/issues"

[dependency-groups]
dev = [
"mypy>=1.16.1",
"pre-commit>=4.2.0",
"pytest>=8.4.1",
"pytest-asyncio>=1.0.0",
"pytest-cov>=6.2.1",
"pytest-mock>=3.14.1",
"pytest-socket>=0.7.0"
]

[tool.mypy]
exclude = ['^tests/', 'venv/', '.venv/']
strict = true
Expand All @@ -22,3 +63,25 @@ select = [

[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*_test.py" = ["S101"] # Use of assert detected

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/linkup"]

[tool.semantic_release]
version_source = "file"
version_pattern = "pyproject.toml:version = \"{version}\""
commit_parser = "conventional"
tag_format = "v{version}"
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
major_on_zero = true

[tool.semantic_release.changelog.default_templates]
changelog_file = "CHANGELOG.md"

[tool.semantic_release.commit_parser_options]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
9 changes: 0 additions & 9 deletions requirements-dev.txt

This file was deleted.

52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading