Skip to content

Lb/breaking changes #9

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 10 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
Binary file added .coverage
Binary file not shown.
19 changes: 7 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
python -m pip install --upgrade pip
pip install setuptools wheel twine
poetry install
- name: Build and publish
run: |
poetry build
enable-cache: true
- name: Set up Python
run: uv python install
- name: Build package
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
15 changes: 6 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
python -m pip install --upgrade pip
pip install setuptools wheel twine
poetry install
run: uv sync
- name: Run tests
run: |
poetry run pytest
uv run pytest
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
__pycache__/
.DS_Store
.env
.idea/
.idea/
.venv/
.pytest_cache/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.0
82 changes: 65 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,62 @@
[tool.poetry]
name = "python-motion"
version = "0.2.1"
description = ""
authors = ["Lemuel Boyce <lemuel@vokality.com>"]
[project]
name = "motion"
dynamic = ["version"]
urls = { Homepage = "https://github.com/rhymiz/python-motion", GitHub = "https://github.com/rhymiz/python-motion" }
description = "A Python library for interfacing with Motion (usemotion.com) API"
readme = "README.md"
license = "MIT"
packages = [{ "include" = "motion", from = "src" }]
authors = [{ name = "Lemuel Boyce", email = "[email protected]" }]
keywords = [
"motion",
"usemotion",
"api",
"client",
"usemotion.com",
"productivity",
"ai",
]
requires-python = ">=3.11"
dependencies = ["pydantic>=2.11.5", "requests>=2.32.3"]
classifiers = [
"Topic :: Software Development :: Libraries",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

[tool.poetry.dependencies]
python = "^3.11"
requests = "^2.32.0"
pydantic = "^2.9.2"

[tool.poetry.group.dev.dependencies]
ruff = "*"
ruff-lsp = "*"
pytest = "*"
[dependency-groups]
dev = [
"pyright>=1.1.401",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"ruff>=0.11.12",
]


[tool.ruff]
exclude = [".venv"]
line-length = 79
indent-width = 4
target-version = "py311"
target-version = "py312"
respect-gitignore = true

[tool.ruff.lint]
select = ["E", "I", "B", "ASYNC"]
ignore = ["E501"]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]

[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"

[tool.ruff.analyze]
detect-string-imports = true


[tool.ruff.format]
quote-style = "double"
Expand All @@ -30,6 +66,18 @@ line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 79

[tool.pyright]
exclude = [".venv", "tests"]
typeCheckingMode = "strict"


[tool.hatch.version]
source = "uv-dynamic-versioning"

[tool.uv-dynamic-versioning]
fallback-version = "0.0.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
2 changes: 2 additions & 0 deletions src/motion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ProjectResource,
RecurringTaskResource,
ScheduleResource,
StatusResource,
TaskResource,
UserResource,
WorkspaceResource,
Expand All @@ -23,6 +24,7 @@ def __init__(self, api_key: str) -> None:
self.comments = CommentResource(self._client)
self.workspaces = WorkspaceResource(self._client)
self.schedules = ScheduleResource(self._client)
self.statuses = StatusResource(self._client)
self.recurring_tasks = RecurringTaskResource(self._client)


Expand Down
2 changes: 1 addition & 1 deletion src/motion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def call_api(
self,
method: HttpMethod,
path: str,
data: GenericTypedDict | None = None,
data: GenericTypedDict[Any] | None = None,
params: dict[str, Any] | None = None,
) -> Response:
"""
Expand Down
Loading
Loading