From b2a73c142aa1f4937a5b459d61eb140e9d0f858e Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Tue, 4 Feb 2025 16:34:39 -0800 Subject: [PATCH 1/6] added a step to install dependencies in release --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16b8d81..7d5b141 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,12 @@ jobs: with: python-version: '3.12' + # Install all dependencies from pyproject.toml + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . + - name: Get Version id: version run: | From 36a13c868c6e1a09af474b3b2e5bf376fce882c3 Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Tue, 4 Feb 2025 16:56:47 -0800 Subject: [PATCH 2/6] some defensive programming around moving the version def --- .github/workflows/pr-preview.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 128a103..ccb18cc 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -12,10 +12,11 @@ jobs: with: python-version: '3.12' + # Install all dependencies from pyproject.toml - name: Install dependencies run: | python -m pip install --upgrade pip - pip install requests + pip install -e . - name: Set preview version run: | From c084b1f9ca4819850785af5d47e91e5e0101f315 Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Wed, 5 Feb 2025 12:05:07 -0800 Subject: [PATCH 3/6] updated required py version to 3.11 --- pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a60130d..66c8c6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "socket-sdk-python" dynamic = ["version"] -requires-python = ">= 3.9" +requires-python = ">= 3.11" dependencies = [ 'requests', 'typing-extensions>=4.12.2' @@ -26,12 +26,11 @@ maintainers = [ classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14" + ] # modern, faster linter and language server. install with `pip install -e ".[dev]"` From 049ee238d8ffbbf0815f717f1c2ba2e004fe2001 Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Wed, 5 Feb 2025 12:06:35 -0800 Subject: [PATCH 4/6] version bump --- socketdev/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socketdev/version.py b/socketdev/version.py index 719ffe9..6cc1d24 100644 --- a/socketdev/version.py +++ b/socketdev/version.py @@ -1 +1 @@ -__version__ = "2.0.0" \ No newline at end of file +__version__ = "2.0.1" \ No newline at end of file From 9e05b5e62d5603a72f98428e984c2327afdcd00a Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Wed, 5 Feb 2025 12:14:43 -0800 Subject: [PATCH 5/6] version check wf now deletes prev comments if it passes --- .github/workflows/version-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 11305a5..12bbae0 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -85,7 +85,7 @@ jobs: owner: owner, repo: repo, comment_id: versionComment.id, - body: `❌ **Version Check Failed**\n\nPlease increment...` + body: `❌ **Version Check Failed**\n\nPlease increment the version. Current version in main: ${process.env.MAIN_VERSION}, PR version: ${process.env.PR_VERSION}` }); } } else if (!success) { @@ -94,6 +94,6 @@ jobs: owner: owner, repo: repo, issue_number: prNumber, - body: `❌ **Version Check Failed**\n\nPlease increment...` + body: `❌ **Version Check Failed**\n\nPlease increment the version. Current version in main: ${process.env.MAIN_VERSION}, PR version: ${process.env.PR_VERSION}` }); } \ No newline at end of file From 146aac4caf4ea676e7d58865502cbeefeef56a4b Mon Sep 17 00:00:00 2001 From: Eric Hibbs Date: Wed, 5 Feb 2025 14:25:25 -0800 Subject: [PATCH 6/6] fixed python version, polyfill, and cleaned up pyproject --- pyproject.toml | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 66c8c6e..630eb73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,13 @@ [build-system] requires = [ - "setuptools >= 61.0", - "requests" + "setuptools >= 61.0" ] build-backend = "setuptools.build_meta" [project] name = "socket-sdk-python" dynamic = ["version"] -requires-python = ">= 3.11" +requires-python = ">= 3.9" dependencies = [ 'requests', 'typing-extensions>=4.12.2' @@ -26,45 +25,32 @@ maintainers = [ classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14" - ] # modern, faster linter and language server. install with `pip install -e ".[dev]"` [project.optional-dependencies] dev = [ "ruff>=0.3.0", - "twine", - "wheel", - "build", + "twine>=4.0.0", + "wheel>=0.40.0", + "build>=1.0.0" +] +test = [ + "pytest>=7.0.0", + "pytest-cov>=4.0.0" ] [project.urls] Homepage = "https://github.com/socketdev/socket-sdk-python" [tool.setuptools.packages.find] -include = [ - "socketdev", - "socketdev.core", - "socketdev.dependencies", - "socketdev.export", - "socketdev.fullscans", - "socketdev.npm", - "socketdev.openapi", - "socketdev.org", - "socketdev.purl", - "socketdev.quota", - "socketdev.report", - "socketdev.repos", - "socketdev.repositories", - "socketdev.sbom", - "socketdev.settings", - "socketdev.tools", - "socketdev.utils", -] +include = ["socketdev", "socketdev.*"] [tool.setuptools.dynamic] version = {attr = "socketdev.version.__version__"}