Skip to content
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
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Semantic Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install -U pip
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also setup python, so you can remove the set up python step I think (check the documentation maybe but this is what we did in some of our other repositories)

uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
21 changes: 10 additions & 11 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
# uv run pytest tests/integration_tests
release:
@echo "Running semantic release..."
semantic-release publish
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
[project]
authors = []
dependencies = [
"httpx",
"pydantic"
]

description = ""
name = "linkup-python-sdk"
readme = "README.md"
requires-python = ">=3.9"
version = "0.1.0"

[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",
"ruff>=0.8.0",
"types-setuptools>=80.9.0"
]

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

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

[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"]

[tool.setuptools.packages.find]
where = ["src"]

[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
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.
File renamed without changes.
Loading