Skip to content

Commit 52e380e

Browse files
Misc: Pip lock (#134)
* Pip lock * Update permissoin * Update doc * Update pip lock with 3.11 * Update pip lock
1 parent 07e3fed commit 52e380e

6 files changed

Lines changed: 683 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
name: CI
44

5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
59
# Controls when the workflow will run
610
on:
711
# Triggers the workflow on push or pull request events but only for the main branch
@@ -31,6 +35,26 @@ jobs:
3135
- name: Run linter
3236
run: make lint
3337

38+
lock-check:
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
python-version: [3.11]
43+
os: [ubuntu-latest]
44+
runs-on: ${{ matrix.os }}
45+
steps:
46+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
- name: Install pip-tools
51+
run: pip install pip-tools
52+
- name: Check lock files are in sync
53+
run: |
54+
make lock
55+
git diff --exit-code requirements.txt requirements-dev.txt || \
56+
(echo "Lock files are out of sync with pyproject.toml. Run 'make lock' and commit." && exit 1)
57+
3458
license-check:
3559
strategy:
3660
fail-fast: false

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ install-dev: install ## Install the project in dev mode.
3232
$(ENV_PREFIX)pip install -e .[test,developer]
3333

3434

35+
.PHONY: lock
36+
lock: ## Regenerate lock files from pyproject.toml.
37+
$(ENV_PREFIX)pip-compile pyproject.toml -o requirements.txt --strip-extras
38+
$(ENV_PREFIX)pip-compile pyproject.toml --extra test --extra developer -o requirements-dev.txt --strip-extras
39+
$(ENV_PREFIX)pip-compile pyproject.toml --extra jupyter -o requirements-jupyter.txt --strip-extras
40+
3541
.PHONY: dist
3642
dist: ## install the distribution
3743
@echo "Building distribution:"

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ cd nx-neptune
4545
make install
4646
```
4747

48+
Dependencies are pinned in lock files (`requirements.txt`, `requirements-dev.txt`, `requirements-jupyter.txt`) generated by [pip-tools](https://pip-tools.readthedocs.io/). If you update `pyproject.toml`, regenerate them with:
49+
50+
```bash
51+
make lock
52+
```
53+
54+
> **Note:** `make lock` must be run with a Python 3.11 interpreter to match CI. If your default Python is a different version, create a 3.11 venv:
55+
> ```bash
56+
> python3.11 -m venv .venv-lock
57+
> source .venv-lock/bin/activate
58+
> pip install pip-tools
59+
> make lock
60+
> ```
61+
>
62+
> CI only verifies `requirements.txt` and `requirements-dev.txt`. The jupyter lock file (`requirements-jupyter.txt`) is not checked because it may contain platform-specific packages (e.g., `appnope` on macOS) that differ between local and CI environments.
63+
4864
## Prerequisite
4965
Before using this backend, ensure the following prerequisites are met:
5066

requirements-dev.txt

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# pip-compile --extra=developer --extra=test --output-file=requirements-dev.txt --strip-extras pyproject.toml
6+
#
7+
alabaster==1.0.0
8+
# via sphinx
9+
babel==2.18.0
10+
# via sphinx
11+
black==26.3.1
12+
# via nx-neptune (pyproject.toml)
13+
boto3==1.42.87
14+
# via nx-neptune (pyproject.toml)
15+
botocore==1.42.87
16+
# via
17+
# boto3
18+
# s3transfer
19+
certifi==2026.2.25
20+
# via
21+
# opensearch-py
22+
# requests
23+
cfgv==3.5.0
24+
# via pre-commit
25+
charset-normalizer==3.4.7
26+
# via requests
27+
click==8.3.2
28+
# via black
29+
coverage==7.13.5
30+
# via pytest-cov
31+
cymple==0.12.0
32+
# via nx-neptune (pyproject.toml)
33+
distlib==0.4.0
34+
# via virtualenv
35+
docutils==0.22.4
36+
# via sphinx
37+
dotenv==0.9.9
38+
# via nx-neptune (pyproject.toml)
39+
events==0.5
40+
# via opensearch-py
41+
filelock==3.25.2
42+
# via
43+
# python-discovery
44+
# virtualenv
45+
flake8==7.3.0
46+
# via flake8-pyproject
47+
flake8-pyproject==1.2.4
48+
# via nx-neptune (pyproject.toml)
49+
grpcio==1.80.0
50+
# via opensearch-protobufs
51+
identify==2.6.18
52+
# via pre-commit
53+
idna==3.11
54+
# via requests
55+
imagesize==2.0.0
56+
# via sphinx
57+
iniconfig==2.3.0
58+
# via pytest
59+
isort==8.0.1
60+
# via nx-neptune (pyproject.toml)
61+
jinja2==3.1.6
62+
# via sphinx
63+
jmespath==1.1.0
64+
# via
65+
# boto3
66+
# botocore
67+
librt==0.9.0
68+
# via mypy
69+
markupsafe==3.0.3
70+
# via jinja2
71+
mccabe==0.7.0
72+
# via flake8
73+
mypy==1.20.0
74+
# via nx-neptune (pyproject.toml)
75+
mypy-extensions==1.1.0
76+
# via
77+
# black
78+
# mypy
79+
networkx==3.6.1
80+
# via nx-neptune (pyproject.toml)
81+
nodeenv==1.10.0
82+
# via pre-commit
83+
numpy==2.4.4
84+
# via
85+
# nx-neptune (pyproject.toml)
86+
# pandas
87+
# scipy
88+
opensearch-protobufs==0.19.0
89+
# via opensearch-py
90+
opensearch-py==3.1.0
91+
# via nx-neptune (pyproject.toml)
92+
packaging==26.0
93+
# via
94+
# black
95+
# pytest
96+
# sphinx
97+
pandas==3.0.2
98+
# via nx-neptune (pyproject.toml)
99+
pathspec==1.0.4
100+
# via
101+
# black
102+
# mypy
103+
pip-licenses==5.5.5
104+
# via nx-neptune (pyproject.toml)
105+
platformdirs==4.9.6
106+
# via
107+
# black
108+
# python-discovery
109+
# virtualenv
110+
pluggy==1.6.0
111+
# via
112+
# pytest
113+
# pytest-cov
114+
pre-commit==4.5.1
115+
# via nx-neptune (pyproject.toml)
116+
prettytable==3.17.0
117+
# via pip-licenses
118+
protobuf==7.34.1
119+
# via opensearch-protobufs
120+
pycodestyle==2.14.0
121+
# via flake8
122+
pyflakes==3.4.0
123+
# via flake8
124+
pygments==2.20.0
125+
# via
126+
# pytest
127+
# sphinx
128+
pytest==9.0.3
129+
# via
130+
# nx-neptune (pyproject.toml)
131+
# pytest-asyncio
132+
# pytest-cov
133+
# pytest-order
134+
pytest-asyncio==1.3.0
135+
# via nx-neptune (pyproject.toml)
136+
pytest-cov==7.1.0
137+
# via nx-neptune (pyproject.toml)
138+
pytest-order==1.3.0
139+
# via nx-neptune (pyproject.toml)
140+
python-dateutil==2.9.0.post0
141+
# via
142+
# botocore
143+
# opensearch-py
144+
# pandas
145+
python-discovery==1.2.2
146+
# via virtualenv
147+
python-dotenv==1.2.2
148+
# via dotenv
149+
pytokens==0.4.1
150+
# via black
151+
pyyaml==6.0.3
152+
# via pre-commit
153+
requests==2.33.1
154+
# via
155+
# opensearch-py
156+
# sphinx
157+
roman-numerals==4.1.0
158+
# via sphinx
159+
s3transfer==0.16.0
160+
# via boto3
161+
scipy==1.17.1
162+
# via nx-neptune (pyproject.toml)
163+
six==1.17.0
164+
# via python-dateutil
165+
snowballstemmer==3.0.1
166+
# via sphinx
167+
sphinx==9.0.4
168+
# via nx-neptune (pyproject.toml)
169+
sphinxcontrib-applehelp==2.0.0
170+
# via sphinx
171+
sphinxcontrib-devhelp==2.0.0
172+
# via sphinx
173+
sphinxcontrib-htmlhelp==2.1.0
174+
# via sphinx
175+
sphinxcontrib-jsmath==1.0.1
176+
# via sphinx
177+
sphinxcontrib-qthelp==2.0.0
178+
# via sphinx
179+
sphinxcontrib-serializinghtml==2.0.0
180+
# via sphinx
181+
sqlglot==30.4.2
182+
# via nx-neptune (pyproject.toml)
183+
typing-extensions==4.15.0
184+
# via
185+
# grpcio
186+
# mypy
187+
# pytest-asyncio
188+
urllib3==2.6.3
189+
# via
190+
# botocore
191+
# opensearch-py
192+
# requests
193+
virtualenv==21.2.1
194+
# via pre-commit
195+
wcwidth==0.6.0
196+
# via prettytable

0 commit comments

Comments
 (0)