Skip to content

Commit 9184f81

Browse files
committed
Change poetry to pipenv
1 parent 59e78e2 commit 9184f81

File tree

7 files changed

+418
-1112
lines changed

7 files changed

+418
-1112
lines changed

.github/workflows/publish_lambda_packages.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ jobs:
1616
- name: Install rustup
1717
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
1818
- name: Install python dependencies
19-
run: pip install ./distribution/lambda
20-
- name: Mypy lint
21-
run: mypy distribution/lambda/
19+
run: |
20+
pip install --user pipenv
21+
pipenv install
22+
- name: Lint and format
23+
run: |
24+
cd distribution/lambda
25+
mypy .
26+
black . --check
2227
- name: Retrieve and export commit date, hash, and tags
2328
run: |
2429
echo "QW_COMMIT_DATE=$(TZ=UTC0 git log -1 --format=%cd --date=format-local:%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV

distribution/lambda/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ package:
2727
if [ "$${QW_LAMBDA_BUILD:-0}" = "1" ]
2828
then
2929
pushd ../../quickwit/
30+
rustc --version
3031
cargo lambda build \
3132
-p quickwit-lambda \
3233
--release \

distribution/lambda/Pipfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
aws-cdk-lib = "2.95.1"
8+
cargo-lambda = "1.1.0"
9+
constructs = "10.3.0"
10+
pyyaml = "6.0.1"
11+
black = "24.3.0"
12+
boto3 = "1.28.59"
13+
mypy = "1.7.0"
14+
ziglang = "0.11.0"
15+
16+
# boto3-stubs = "^1.28.39"
17+
# types-requests = "^2.31.0.2"
18+
# types-pyyaml = "^6.0.12.11"
19+
20+
[dev-packages]
21+
22+
[requires]
23+
python_version = ">=3.10,<4.0"

distribution/lambda/Pipfile.lock

Lines changed: 381 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

distribution/lambda/README.md

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,13 @@ console](https://console.aws.amazon.com/servicequotas/home/services/lambda/quota
3131
3232
### Python venv
3333

34-
This project is set up like a standard Python project. The initialization
35-
process also creates a virtualenv within this project, stored under the `.venv`
36-
directory. To create the virtualenv it assumes that there is a `python3`
37-
executable in your path with access to the `venv` package. If for any reason the
38-
automatic creation of the virtualenv fails, you can create the virtualenv
39-
manually.
34+
The Python environment is configured using pipenv:
4035

41-
To manually create a virtualenv on MacOS and Linux:
42-
43-
```bash
44-
python3 -m venv .venv
45-
```
46-
47-
After the init process completes and the virtualenv is created, you can use the following
48-
step to activate your virtualenv.
49-
50-
```bash
51-
source .venv/bin/activate
5236
```
53-
54-
Once the virtualenv is activated, you can install the required dependencies.
55-
56-
```bash
57-
pip install .
58-
```
59-
60-
If you prefer using Poetry, achieve the same by running:
61-
```bash
62-
poetry shell
63-
poetry install
37+
# Install pipenv if needed.
38+
pip install --user pipenv
39+
pipenv shell
40+
pipenv install
6441
```
6542

6643
### Example stacks

distribution/lambda/poetry.lock

Lines changed: 0 additions & 1054 deletions
This file was deleted.

distribution/lambda/pyproject.toml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)