Skip to content

Commit a3774a5

Browse files
committed
Merge branch 'main' into pdl-182
2 parents b318180 + b11bb7f commit a3774a5

File tree

214 files changed

+4699
-31042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+4699
-31042
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python-version: ['3.11', '3.12']
13+
python-version: ['3.11', '3.12', '3.13']
1414

1515
steps:
1616
- uses: actions/checkout@v4
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Quay Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
REGISTRY: quay.io
12+
# github.repository as account/repo
13+
IMAGE_NAME: project_pdl/pdl
14+
15+
jobs:
16+
# Build and push a multi-platform Docker image to Docker Hub
17+
publish-image:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: Docker Setup QEMU
28+
uses: docker/setup-qemu-action@v2
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v2
32+
33+
- name: Login to Docker Hub
34+
uses: docker/login-action@v2
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ secrets.QUAYIO_USERNAME }}
38+
password: ${{ secrets.QUAYIO_TOKEN }}
39+
40+
- name: Build and push ${{ github.ref_name }} to ${{ env.REGISTRY }}
41+
uses: docker/build-push-action@v4
42+
with:
43+
context: .
44+
platforms: linux/amd64,linux/arm64
45+
push: true
46+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

.github/workflows/run-examples.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ['3.11', '3.12']
16+
python-version: ['3.11', '3.12', '3.13']
1717

1818
steps:
1919
- uses: actions/checkout@v4
@@ -44,4 +44,5 @@ jobs:
4444
WATSONX_PROJECT_ID: ${{ secrets.WATSONX_PROJECT_ID }}
4545
WATSONX_APIKEY: ${{ secrets.WATSONX_APIKEY }}
4646
WATSONX_URL: ${{ secrets.WATSONX_URL }}
47+
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
4748
run: py.test -v --capture=tee-sys tests/test_examples_run.py

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ default_language_version:
55
repos:
66
# check some basic stuff
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.6.0
8+
rev: v5.0.0
99
hooks:
1010
# Check for files that would conflict in case-insensitive filesystems
1111
- id: check-case-conflict
@@ -45,6 +45,12 @@ repos:
4545
"-sn", # Don't display the score
4646
"--rcfile=pylintrc"
4747
]
48+
# run the bandit security linter
49+
- repo: https://github.com/PyCQA/bandit
50+
rev: 1.7.10
51+
hooks:
52+
- id: bandit
53+
args: [-c, bandit.yaml]
4854
# Type check the Python code with MyPy
4955
- repo: https://github.com/pre-commit/mirrors-mypy
5056
rev: 'v1.11.2'

README.md

Lines changed: 86 additions & 31 deletions
Large diffs are not rendered by default.

bandit.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# This is the configuration file for the bandit python static analysis tool
3+
exclude_dirs:
4+
- build
5+
# We are less worried about tests, as they are not a part of the library meant to be used by users
6+
# with untrusted inputs.
7+
- test
8+
skips:
9+
- B101 # allow the use of assert

dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
FROM --platform=linux/arm64/v8 python:3.11-slim
1+
FROM python:3.11-slim
22

33
WORKDIR /pdl
44

55
RUN apt-get update && apt-get install -y git
66

77
COPY . /pdl
88

9-
RUN pip install prompt-declaration-language
109
RUN pip install prompt-declaration-language[examples]
1110

1211
ENTRYPOINT ["pdl"]

docs/README.md

Lines changed: 73 additions & 31 deletions
Large diffs are not rendered by default.
333 KB
Binary file not shown.
175 KB
Loading

0 commit comments

Comments
 (0)