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
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: build

# yamllint disable-line rule:truthy
on:
pull_request:
push:
branches:
- master
- "release/**"
tags:
- "v*"

env:
DEFAULT_PYTHON: "3.11"

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install dependencies
run: uv sync --group dev
- name: Run tests
run: uv run pytest --cov src/dccp tests

- name: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: uv build

- name: publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
51 changes: 0 additions & 51 deletions .github/workflows/release.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
include:
- python-version: "3.11"
cvxpy-version: "1.6.7"
cvxpy-version: "1.9.0"
- python-version: "3.11"
cvxpy-version: "latest"
- python-version: "3.12"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ target/

# uv
uv.lock
src/dccp/_version.py

# autodocs
docs/src/api
Expand Down
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "dccp"
version = "2.0.0"
dynamic = ["version"]
description = "A CVXPY extension for difference of convex programs."
readme = "README.md"
license = { text = "GPLv3" }
Expand All @@ -18,7 +18,7 @@ maintainers = [
{ name = "Stefan de Lange", email = "langestefan@msn.com" },
]
requires-python = ">=3.11"
dependencies = ["cvxpy>=1.6.7"]
dependencies = ["cvxpy>=1.9.0"]
keywords = ["convex optimization", "cvxpy", "mathematical programming"]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down Expand Up @@ -165,5 +165,11 @@ max-complexity = 25
]

[tool.codespell]
ignore-words-list = "fro"
ignore-words-list = "coo,fro"
skip = "pyproject.toml"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "src/dccp/_version.py"
3 changes: 2 additions & 1 deletion tests/test_cvxpy_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from __future__ import annotations

import cvxpy as cp
from cvxpy.constraints.zero import Equality
from cvxpy.reductions.solution import Solution

from dccp.problem import Equality, _set_problem_status
from dccp.problem import _set_problem_status


class TestCvxpyCompatibility:
Expand Down
Loading