Skip to content

Commit a20ca32

Browse files
committed
Migrate from socket-sdk-python to socketdev>=3.0.0 and switch to uv
- Update pyproject.toml to use socketdev>=3.0.0,<4.0.0 instead of socket-sdk-python - Replace pip-tools with uv for dependency management - Update Makefile to use uv commands (uv pip compile, uv pip sync, etc.) - Update Dockerfile to install socketdev instead of socket-sdk-python - Update deployment scripts to reference socketdev - Update README to reflect uv usage - Regenerate all requirements files with uv - Add requirements-test.txt file - Update SOCKET_SDK_PATH references to point to ../socketdev - Version bump to 2.2.3
1 parent a2d97ab commit a20ca32

File tree

9 files changed

+241
-126
lines changed

9 files changed

+241
-126
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ RUN for i in $(seq 1 10); do \
1818
sleep 30; \
1919
done && \
2020
if [ ! -z "$SDK_VERSION" ]; then \
21-
pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socket-sdk-python==${SDK_VERSION}; \
21+
pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketdev==${SDK_VERSION}; \
2222
fi

Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: setup compile-deps sync-deps clean test lint init-tools local-dev first-time-setup update-deps dev-setup sync-all first-time-local-setup
22

33
# Environment variable for local SDK path (optional)
4-
SOCKET_SDK_PATH ?= ../socket-sdk-python
4+
SOCKET_SDK_PATH ?= ../socketdev
55

66
# Environment variable to control local development mode
77
USE_LOCAL_SDK ?= false
@@ -27,33 +27,33 @@ sync-all: sync-deps
2727

2828
# === Implementation targets ===
2929

30-
# Creates virtual environment and installs pip-tools
30+
# Creates virtual environment and installs uv
3131
init-tools:
32-
python -m venv .venv
33-
. .venv/bin/activate && pip install pip-tools
32+
python3 -m venv .venv
33+
. .venv/bin/activate && pip install uv
3434

3535
# Installs dependencies needed for local development
36-
# Currently: socket-sdk-python from test PyPI or local path
36+
# Currently: socketdev from test PyPI or local path
3737
local-dev: init-tools
3838
ifeq ($(USE_LOCAL_SDK),true)
39-
. .venv/bin/activate && pip install -e $(SOCKET_SDK_PATH)
39+
. .venv/bin/activate && uv pip install -e $(SOCKET_SDK_PATH)
4040
endif
4141

4242
# Creates/updates requirements.txt files with locked versions based on pyproject.toml
4343
compile-deps: local-dev
44-
. .venv/bin/activate && pip-compile --output-file=requirements.txt pyproject.toml
45-
. .venv/bin/activate && pip-compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
46-
. .venv/bin/activate && pip-compile --extra=test --output-file=requirements-test.txt pyproject.toml
44+
. .venv/bin/activate && uv pip compile --output-file=requirements.txt pyproject.toml
45+
. .venv/bin/activate && uv pip compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
46+
. .venv/bin/activate && uv pip compile --extra=test --output-file=requirements-test.txt pyproject.toml
4747

4848
# Creates virtual environment and installs dependencies from pyproject.toml
4949
setup: compile-deps
50-
. .venv/bin/activate && pip install -e ".[dev,test]"
50+
. .venv/bin/activate && uv pip install -e ".[dev,test]"
5151

5252
# Installs exact versions from requirements.txt into your virtual environment
5353
sync-deps:
54-
. .venv/bin/activate && pip-sync requirements.txt requirements-dev.txt requirements-test.txt
54+
. .venv/bin/activate && uv pip sync requirements.txt requirements-dev.txt requirements-test.txt
5555
ifeq ($(USE_LOCAL_SDK),true)
56-
. .venv/bin/activate && pip install -e $(SOCKET_SDK_PATH)
56+
. .venv/bin/activate && uv pip install -e $(SOCKET_SDK_PATH)
5757
endif
5858

5959
# Removes virtual environment and cache files

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,9 @@ make first-time-setup
371371
2. Local Development Setup (for SDK development):
372372
```bash
373373
pyenv local 3.11 # Ensure correct Python version
374-
SOCKET_SDK_PATH=~/path/to/socket-sdk-python make first-time-local-setup
374+
SOCKET_SDK_PATH=~/path/to/socketdev make first-time-local-setup
375375
```
376-
The default SDK path is `../socket-sdk-python` if not specified.
376+
The default SDK path is `../socketdev` if not specified.
377377
378378
#### Ongoing Development Tasks
379379
@@ -397,7 +397,7 @@ High-level workflows:
397397
- `make dev-setup`: Setup for local development (included in first-time-local-setup)
398398
399399
Implementation targets:
400-
- `make init-tools`: Creates virtual environment and installs pip-tools
400+
- `make init-tools`: Creates virtual environment and installs uv
401401
- `make local-dev`: Installs dependencies needed for local development
402402
- `make compile-deps`: Generates requirements.txt files with locked versions
403403
- `make setup`: Creates virtual environment and installs dependencies
@@ -410,7 +410,7 @@ Implementation targets:
410410
411411
#### Core Configuration
412412
- `SOCKET_SECURITY_API_KEY`: Socket Security API token (alternative to --api-token parameter)
413-
- `SOCKET_SDK_PATH`: Path to local socket-sdk-python repository (default: ../socket-sdk-python)
413+
- `SOCKET_SDK_PATH`: Path to local socketdev repository (default: ../socketdev)
414414
415415
#### GitLab Integration
416416
- `GITLAB_TOKEN`: GitLab API token for GitLab integration (supports both Bearer and PRIVATE-TOKEN authentication)

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.2.2"
9+
version = "2.2.3"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [
@@ -16,7 +16,7 @@ dependencies = [
1616
'GitPython',
1717
'packaging',
1818
'python-dotenv',
19-
'socket-sdk-python>=2.1.8,<3'
19+
'socketdev>=3.0.0,<4.0.0'
2020
]
2121
readme = "README.md"
2222
description = "Socket Security CLI for CI/CD"
@@ -45,7 +45,7 @@ test = [
4545
dev = [
4646
"ruff>=0.3.0",
4747
"twine", # for building
48-
"pip-tools>=7.4.0", # for pip-compile
48+
"uv>=0.1.0", # for dependency management
4949
"pre-commit",
5050
"hatch"
5151
]

requirements-dev.txt

Lines changed: 139 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,158 @@
1-
# generated by rye
2-
# use `rye lock` or `rye sync` to update this lockfile
3-
#
4-
# last locked with the following flags:
5-
# pre: false
6-
# features: ["test"]
7-
# all-features: false
8-
# with-sources: false
9-
# generate-hashes: false
10-
# universal: false
11-
12-
hatchling==1.27.0
13-
hatch==1.14.0
14-
argparse==1.4.0
15-
# via socketsecurity
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
3+
anyio==4.10.0
4+
# via httpx
165
certifi==2024.12.14
17-
# via requests
6+
# via
7+
# httpcore
8+
# httpx
9+
# requests
10+
cfgv==3.4.0
11+
# via pre-commit
1812
charset-normalizer==3.4.1
1913
# via requests
20-
colorama==0.4.6
21-
# via pytest-watch
22-
coverage==7.6.10
23-
# via pytest-cov
24-
docopt==0.6.2
25-
# via pytest-watch
14+
click==8.2.1
15+
# via
16+
# hatch
17+
# userpath
18+
distlib==0.4.0
19+
# via virtualenv
20+
docutils==0.22
21+
# via readme-renderer
22+
filelock==3.19.1
23+
# via virtualenv
2624
gitdb==4.0.12
2725
# via gitpython
2826
gitpython==3.1.44
29-
# via socketsecurity
27+
# via socketsecurity (pyproject.toml)
28+
h11==0.16.0
29+
# via httpcore
30+
hatch==1.14.0
31+
# via socketsecurity (pyproject.toml)
32+
hatchling==1.27.0
33+
# via hatch
34+
httpcore==1.0.9
35+
# via httpx
36+
httpx==0.28.1
37+
# via hatch
38+
hyperlink==21.0.0
39+
# via hatch
40+
id==1.5.0
41+
# via twine
42+
identify==2.6.13
43+
# via pre-commit
3044
idna==3.10
31-
# via requests
32-
iniconfig==2.0.0
33-
# via pytest
45+
# via
46+
# anyio
47+
# httpx
48+
# hyperlink
49+
# requests
50+
jaraco-classes==3.4.0
51+
# via keyring
52+
jaraco-context==6.0.1
53+
# via keyring
54+
jaraco-functools==4.3.0
55+
# via keyring
56+
keyring==25.6.0
57+
# via
58+
# hatch
59+
# twine
60+
markdown-it-py==4.0.0
61+
# via rich
62+
mdurl==0.1.2
63+
# via markdown-it-py
3464
mdutils==1.6.0
35-
# via socketsecurity
65+
# via socketsecurity (pyproject.toml)
66+
more-itertools==10.7.0
67+
# via
68+
# jaraco-classes
69+
# jaraco-functools
70+
nh3==0.3.0
71+
# via readme-renderer
72+
nodeenv==1.9.1
73+
# via pre-commit
3674
packaging==24.2
37-
# via pytest
38-
# via socketsecurity
75+
# via
76+
# socketsecurity (pyproject.toml)
77+
# hatch
78+
# hatchling
79+
# twine
80+
pathspec==0.12.1
81+
# via hatchling
82+
pexpect==4.9.0
83+
# via hatch
84+
platformdirs==4.3.8
85+
# via
86+
# hatch
87+
# virtualenv
3988
pluggy==1.5.0
40-
# via pytest
89+
# via hatchling
90+
pre-commit==4.3.0
91+
# via socketsecurity (pyproject.toml)
4192
prettytable==3.12.0
42-
# via socketsecurity
43-
pytest==8.3.4
44-
# via pytest-asyncio
45-
# via pytest-cov
46-
# via pytest-mock
47-
# via pytest-watch
48-
# via socketsecurity
49-
pytest-asyncio==0.25.1
50-
# via socketsecurity
51-
pytest-cov==6.0.0
52-
# via socketsecurity
53-
pytest-mock==3.14.0
54-
# via socketsecurity
55-
pytest-watch==4.2.0
56-
# via socketsecurity
93+
# via socketsecurity (pyproject.toml)
94+
ptyprocess==0.7.0
95+
# via pexpect
96+
pygments==2.19.2
97+
# via
98+
# readme-renderer
99+
# rich
57100
python-dotenv==1.0.1
58-
# via socketsecurity
101+
# via socketsecurity (pyproject.toml)
102+
pyyaml==6.0.2
103+
# via pre-commit
104+
readme-renderer==44.0
105+
# via twine
59106
requests==2.32.4
60-
# via socket-sdk-python
61-
# via socketsecurity
107+
# via
108+
# socketsecurity (pyproject.toml)
109+
# id
110+
# requests-toolbelt
111+
# socketdev
112+
# twine
113+
requests-toolbelt==1.0.0
114+
# via twine
115+
rfc3986==2.0.0
116+
# via twine
117+
rich==14.1.0
118+
# via
119+
# hatch
120+
# twine
121+
ruff==0.12.10
122+
# via socketsecurity (pyproject.toml)
123+
shellingham==1.5.4
124+
# via hatch
62125
smmap==5.0.2
63126
# via gitdb
64-
socket-sdk-python==2.0.15
65-
# via socketsecurity
127+
sniffio==1.3.1
128+
# via anyio
129+
socketdev==3.0.0
130+
# via socketsecurity (pyproject.toml)
131+
tomli-w==1.2.0
132+
# via hatch
133+
tomlkit==0.13.3
134+
# via hatch
135+
trove-classifiers==2025.8.6.13
136+
# via hatchling
137+
twine==6.1.0
138+
# via socketsecurity (pyproject.toml)
66139
typing-extensions==4.12.2
67-
# via socket-sdk-python
140+
# via socketdev
68141
urllib3==2.5.0
69-
# via requests
70-
watchdog==6.0.0
71-
# via pytest-watch
142+
# via
143+
# requests
144+
# twine
145+
userpath==1.9.2
146+
# via hatch
147+
uv==0.8.13
148+
# via
149+
# socketsecurity (pyproject.toml)
150+
# hatch
151+
virtualenv==20.34.0
152+
# via
153+
# hatch
154+
# pre-commit
72155
wcwidth==0.2.13
73156
# via prettytable
157+
zstandard==0.24.0
158+
# via hatch

requirements-test.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile --extra=test --output-file=requirements-test.txt pyproject.toml
3+
certifi==2025.8.3
4+
# via requests
5+
charset-normalizer==3.4.3
6+
# via requests
7+
colorama==0.4.6
8+
# via pytest-watch
9+
coverage==7.10.5
10+
# via pytest-cov
11+
docopt==0.6.2
12+
# via pytest-watch
13+
gitdb==4.0.12
14+
# via gitpython
15+
gitpython==3.1.45
16+
# via socketsecurity (pyproject.toml)
17+
idna==3.10
18+
# via requests
19+
iniconfig==2.1.0
20+
# via pytest
21+
mdutils==1.8.0
22+
# via socketsecurity (pyproject.toml)
23+
packaging==25.0
24+
# via
25+
# socketsecurity (pyproject.toml)
26+
# pytest
27+
pluggy==1.6.0
28+
# via
29+
# pytest
30+
# pytest-cov
31+
prettytable==3.16.0
32+
# via socketsecurity (pyproject.toml)
33+
pygments==2.19.2
34+
# via pytest
35+
pytest==8.4.1
36+
# via
37+
# socketsecurity (pyproject.toml)
38+
# pytest-asyncio
39+
# pytest-cov
40+
# pytest-mock
41+
# pytest-watch
42+
pytest-asyncio==1.1.0
43+
# via socketsecurity (pyproject.toml)
44+
pytest-cov==6.2.1
45+
# via socketsecurity (pyproject.toml)
46+
pytest-mock==3.14.1
47+
# via socketsecurity (pyproject.toml)
48+
pytest-watch==4.2.0
49+
# via socketsecurity (pyproject.toml)
50+
python-dotenv==1.1.1
51+
# via socketsecurity (pyproject.toml)
52+
requests==2.32.5
53+
# via
54+
# socketsecurity (pyproject.toml)
55+
# socketdev
56+
smmap==5.0.2
57+
# via gitdb
58+
socketdev==3.0.0
59+
# via socketsecurity (pyproject.toml)
60+
typing-extensions==4.14.1
61+
# via socketdev
62+
urllib3==2.5.0
63+
# via requests
64+
watchdog==6.0.0
65+
# via pytest-watch
66+
wcwidth==0.2.13
67+
# via prettytable

0 commit comments

Comments
 (0)