Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] MPL review gap #550

Draft
wants to merge 633 commits into
base: python-reviewed
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
633 commits
Select commit Hold shift + click to select a range
1988b7b
like the tenth utf8 implementation
lucasmcdonald3 Aug 28, 2024
5f0ca8c
like the tenth utf8 implementation
lucasmcdonald3 Aug 28, 2024
3e40d4d
wip
lucasmcdonald3 Aug 30, 2024
043d4cb
libs
lucasmcdonald3 Aug 30, 2024
cab4e10
libs
lucasmcdonald3 Aug 30, 2024
3f6ff15
m
lucasmcdonald3 Aug 30, 2024
1b2c0e5
rename
lucasmcdonald3 Aug 30, 2024
c1869ff
the 13th implementation of utf8 is a variant of implementations 3,4,5
lucasmcdonald3 Aug 30, 2024
36c8bb9
utf8
lucasmcdonald3 Sep 3, 2024
74a51bd
m
lucasmcdonald3 Sep 3, 2024
5900441
m
lucasmcdonald3 Sep 3, 2024
5feb305
m
lucasmcdonald3 Sep 3, 2024
b5c7533
new externs, new deps
lucasmcdonald3 Sep 4, 2024
0f4a68d
vectors
lucasmcdonald3 Sep 4, 2024
73c13af
repoly
lucasmcdonald3 Sep 4, 2024
30db3ee
repoly
lucasmcdonald3 Sep 4, 2024
b50225f
fix
lucasmcdonald3 Sep 4, 2024
6cd1752
smithygen
lucasmcdonald3 Sep 5, 2024
4881335
extern updates
lucasmcdonald3 Sep 5, 2024
e441235
??????????
lucasmcdonald3 Sep 5, 2024
96718bf
???
lucasmcdonald3 Sep 5, 2024
2f69005
???
lucasmcdonald3 Sep 5, 2024
3f250b4
fix
lucasmcdonald3 Sep 5, 2024
13b1397
missing
lucasmcdonald3 Sep 5, 2024
13d9960
missing
lucasmcdonald3 Sep 5, 2024
6f92376
?
lucasmcdonald3 Sep 5, 2024
3791f5e
repoly no async
lucasmcdonald3 Sep 5, 2024
b82fbff
Merge branch 'main' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 5, 2024
1b331e9
merge
lucasmcdonald3 Sep 5, 2024
f2ed259
wip
lucasmcdonald3 Sep 6, 2024
887942a
m
lucasmcdonald3 Sep 6, 2024
3f0533a
m
lucasmcdonald3 Sep 6, 2024
82c7ad4
m
lucasmcdonald3 Sep 6, 2024
e9238c5
m
lucasmcdonald3 Sep 6, 2024
24f1221
m
lucasmcdonald3 Sep 6, 2024
048027b
cleanup
lucasmcdonald3 Sep 9, 2024
72ec19c
m
lucasmcdonald3 Sep 9, 2024
b3e25e3
Merge branch 'main' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 9, 2024
06dcb09
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 9, 2024
dcdc189
m
lucasmcdonald3 Sep 9, 2024
fdf9f31
clean
lucasmcdonald3 Sep 9, 2024
73f906c
m
lucasmcdonald3 Sep 9, 2024
31588f0
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 9, 2024
b782290
merge
lucasmcdonald3 Sep 9, 2024
bff96ab
docs(Python): Add Python docs config (#549)
lucasmcdonald3 Sep 9, 2024
45c2659
Merge branch 'lucmcdon/python-mpl-v2' into python-release
lucasmcdonald3 Sep 9, 2024
4ff52ad
merge
lucasmcdonald3 Sep 9, 2024
cc6dca5
sync
lucasmcdonald3 Sep 9, 2024
93d1950
m
lucasmcdonald3 Sep 9, 2024
e34ae26
m
lucasmcdonald3 Sep 10, 2024
e981af2
m
lucasmcdonald3 Sep 10, 2024
0ff3f7f
tox
lucasmcdonald3 Sep 10, 2024
7af68d8
revert
lucasmcdonald3 Sep 10, 2024
f1fcaa6
main 4.8
lucasmcdonald3 Sep 10, 2024
96a349a
merge
lucasmcdonald3 Sep 10, 2024
68fb87d
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 10, 2024
933dfba
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 10, 2024
a952bcc
m
lucasmcdonald3 Sep 10, 2024
e1439b2
test
lucasmcdonald3 Sep 10, 2024
17c550e
test
lucasmcdonald3 Sep 10, 2024
f704de3
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 10, 2024
8b15595
m
lucasmcdonald3 Sep 10, 2024
def667c
m
lucasmcdonald3 Sep 10, 2024
1ebb17b
m
lucasmcdonald3 Sep 10, 2024
901fba4
m
lucasmcdonald3 Sep 10, 2024
9d84e46
m
lucasmcdonald3 Sep 10, 2024
c591268
m
lucasmcdonald3 Sep 10, 2024
601069c
m
lucasmcdonald3 Sep 10, 2024
58cc574
m
lucasmcdonald3 Sep 10, 2024
228d486
m
lucasmcdonald3 Sep 10, 2024
6383c26
Merge branch 'python-subproject-release' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 11, 2024
aa3baeb
override
lucasmcdonald3 Sep 11, 2024
83713fa
override
lucasmcdonald3 Sep 11, 2024
be6c70e
good dafny fix
lucasmcdonald3 Sep 11, 2024
94607f8
m
lucasmcdonald3 Sep 11, 2024
ed65ef3
m
lucasmcdonald3 Sep 11, 2024
c352f9f
fix
lucasmcdonald3 Sep 11, 2024
f45985a
fix
lucasmcdonald3 Sep 11, 2024
cae0cfb
fix
lucasmcdonald3 Sep 11, 2024
7d9d6ed
tested locally
lucasmcdonald3 Sep 12, 2024
376e9f3
standardlibrary tested locally
lucasmcdonald3 Sep 12, 2024
ba55dbc
Merge branch 'python-subproject-release' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 12, 2024
d4f20cd
download dafny; add IAM permission
lucasmcdonald3 Sep 12, 2024
5ec6f70
m
lucasmcdonald3 Sep 12, 2024
2ccf076
m
lucasmcdonald3 Sep 12, 2024
b88eba5
stdlib, primitives
lucasmcdonald3 Sep 12, 2024
167749d
stdlib, primitives
lucasmcdonald3 Sep 12, 2024
520e531
stdlib, primitives
lucasmcdonald3 Sep 12, 2024
d852be8
stdlib, primitives
lucasmcdonald3 Sep 12, 2024
4f9813d
m
lucasmcdonald3 Sep 12, 2024
4444189
m
lucasmcdonald3 Sep 12, 2024
730ffc4
m
lucasmcdonald3 Sep 12, 2024
97c2f8c
m
lucasmcdonald3 Sep 12, 2024
211fdbd
m
lucasmcdonald3 Sep 12, 2024
427d710
m
lucasmcdonald3 Sep 12, 2024
a375e05
m
lucasmcdonald3 Sep 12, 2024
fcda811
m
lucasmcdonald3 Sep 12, 2024
a33d697
m
lucasmcdonald3 Sep 12, 2024
d0a1887
m
lucasmcdonald3 Sep 12, 2024
ecd8883
m
lucasmcdonald3 Sep 12, 2024
c72093d
right validate
lucasmcdonald3 Sep 12, 2024
51a2519
m
lucasmcdonald3 Sep 12, 2024
f73a4d8
m
lucasmcdonald3 Sep 12, 2024
0604c9a
dafnyVersion
lucasmcdonald3 Sep 12, 2024
47132b4
primitives cb
lucasmcdonald3 Sep 13, 2024
5941b7c
debug python releaserc
lucasmcdonald3 Sep 13, 2024
870c7de
m
lucasmcdonald3 Sep 13, 2024
1a03d10
m
lucasmcdonald3 Sep 13, 2024
2d28250
m
lucasmcdonald3 Sep 13, 2024
97cde77
m
lucasmcdonald3 Sep 13, 2024
c02e3f8
m
lucasmcdonald3 Sep 13, 2024
47f0c54
m
lucasmcdonald3 Sep 13, 2024
696284c
fix tox
lucasmcdonald3 Sep 13, 2024
51ba618
m
lucasmcdonald3 Sep 13, 2024
905aa9b
m
lucasmcdonald3 Sep 13, 2024
b0b309c
m
lucasmcdonald3 Sep 13, 2024
02c4a95
m
lucasmcdonald3 Sep 13, 2024
deed948
m
lucasmcdonald3 Sep 13, 2024
4b1ef7b
m
lucasmcdonald3 Sep 13, 2024
fb3eb46
no poetry
lucasmcdonald3 Sep 13, 2024
35a3c6c
no poetry
lucasmcdonald3 Sep 13, 2024
78e20d6
m
lucasmcdonald3 Sep 13, 2024
11f2f63
m
lucasmcdonald3 Sep 13, 2024
aaf0d31
m
lucasmcdonald3 Sep 13, 2024
53cd19b
m
lucasmcdonald3 Sep 13, 2024
4528c05
m
lucasmcdonald3 Sep 13, 2024
00102fc
fix
lucasmcdonald3 Sep 13, 2024
3326fe4
m
lucasmcdonald3 Sep 13, 2024
7bc8104
m
lucasmcdonald3 Sep 13, 2024
5af18dd
readme
lucasmcdonald3 Sep 13, 2024
e5748c2
readme
lucasmcdonald3 Sep 13, 2024
f166fa4
m
lucasmcdonald3 Sep 13, 2024
455023c
m
lucasmcdonald3 Sep 13, 2024
05624f3
temp prod
lucasmcdonald3 Sep 13, 2024
a561f9b
m
lucasmcdonald3 Sep 13, 2024
c09932b
local files
lucasmcdonald3 Sep 13, 2024
6901f8d
m
lucasmcdonald3 Sep 13, 2024
bb481d3
m
lucasmcdonald3 Sep 13, 2024
a5fe0bf
m
lucasmcdonald3 Sep 13, 2024
b4826fa
m
lucasmcdonald3 Sep 13, 2024
24196a9
m
lucasmcdonald3 Sep 13, 2024
a30056d
m
lucasmcdonald3 Sep 13, 2024
b1bccef
m
lucasmcdonald3 Sep 13, 2024
32146e0
m
lucasmcdonald3 Sep 13, 2024
8799c01
m
lucasmcdonald3 Sep 13, 2024
9e70766
m
lucasmcdonald3 Sep 13, 2024
3ae0912
m
lucasmcdonald3 Sep 13, 2024
c592091
m
lucasmcdonald3 Sep 13, 2024
8dc2558
m
lucasmcdonald3 Sep 13, 2024
926b579
m
lucasmcdonald3 Sep 13, 2024
ce521a8
m
lucasmcdonald3 Sep 13, 2024
5176363
m
lucasmcdonald3 Sep 14, 2024
5af8b6a
m
lucasmcdonald3 Sep 14, 2024
8857056
m
lucasmcdonald3 Sep 14, 2024
dee64a3
m
lucasmcdonald3 Sep 14, 2024
fd8d445
m
lucasmcdonald3 Sep 14, 2024
78242bf
m
lucasmcdonald3 Sep 14, 2024
7aed9e0
m
lucasmcdonald3 Sep 14, 2024
f421cc2
m
lucasmcdonald3 Sep 14, 2024
e77ec14
m
lucasmcdonald3 Sep 16, 2024
246f49d
m
lucasmcdonald3 Sep 16, 2024
c70a2d7
m
lucasmcdonald3 Sep 16, 2024
471a438
m
lucasmcdonald3 Sep 16, 2024
fff9d15
m
lucasmcdonald3 Sep 16, 2024
7aea5ba
m
lucasmcdonald3 Sep 16, 2024
0801e9f
m
lucasmcdonald3 Sep 16, 2024
bafa5af
m
lucasmcdonald3 Sep 16, 2024
5d88600
m
lucasmcdonald3 Sep 16, 2024
b96d0eb
m
lucasmcdonald3 Sep 16, 2024
4c1dd05
m
lucasmcdonald3 Sep 16, 2024
1558b0b
m
lucasmcdonald3 Sep 16, 2024
ec999db
m
lucasmcdonald3 Sep 16, 2024
84215fe
m
lucasmcdonald3 Sep 16, 2024
af24af5
m
lucasmcdonald3 Sep 16, 2024
0d4be75
m
lucasmcdonald3 Sep 16, 2024
8a761ed
m
lucasmcdonald3 Sep 16, 2024
9e87f2c
m
lucasmcdonald3 Sep 16, 2024
05b7349
m
lucasmcdonald3 Sep 16, 2024
598ff76
m
lucasmcdonald3 Sep 16, 2024
b7ac5f4
m
lucasmcdonald3 Sep 16, 2024
173925a
m
lucasmcdonald3 Sep 16, 2024
006719d
m
lucasmcdonald3 Sep 16, 2024
82f40f2
m
lucasmcdonald3 Sep 16, 2024
f3aeb8f
m
lucasmcdonald3 Sep 16, 2024
c2dd63d
m
lucasmcdonald3 Sep 16, 2024
a8b33cb
docformatter
lucasmcdonald3 Sep 16, 2024
1bde3b5
m
lucasmcdonald3 Sep 16, 2024
7cefd77
m
lucasmcdonald3 Sep 16, 2024
b6c2650
wip
lucasmcdonald3 Sep 16, 2024
675803f
wip
lucasmcdonald3 Sep 16, 2024
e346e86
wip
lucasmcdonald3 Sep 16, 2024
e8aad81
wip
lucasmcdonald3 Sep 16, 2024
82b0104
wip
lucasmcdonald3 Sep 16, 2024
e97b063
wip
lucasmcdonald3 Sep 16, 2024
335c838
wip
lucasmcdonald3 Sep 16, 2024
98311f8
wip
lucasmcdonald3 Sep 16, 2024
45d4e85
wip
lucasmcdonald3 Sep 16, 2024
23fe236
wip
lucasmcdonald3 Sep 16, 2024
a40fe9d
wip
lucasmcdonald3 Sep 16, 2024
7619755
wip
lucasmcdonald3 Sep 16, 2024
67f89e4
wip
lucasmcdonald3 Sep 16, 2024
38b0f4a
wip
lucasmcdonald3 Sep 16, 2024
873b472
wip
lucasmcdonald3 Sep 16, 2024
34ee150
wip
lucasmcdonald3 Sep 16, 2024
0ac05ca
wip
lucasmcdonald3 Sep 16, 2024
57277d2
wip
lucasmcdonald3 Sep 16, 2024
3a2bebf
wip
lucasmcdonald3 Sep 16, 2024
14dca3d
wip
lucasmcdonald3 Sep 16, 2024
0fb511c
wip
lucasmcdonald3 Sep 16, 2024
5ba39b7
wip
lucasmcdonald3 Sep 16, 2024
5132efa
wip
lucasmcdonald3 Sep 16, 2024
fd81bca
wip
lucasmcdonald3 Sep 16, 2024
8cd1e5f
wip
lucasmcdonald3 Sep 16, 2024
cf53f20
wip
lucasmcdonald3 Sep 16, 2024
16d2a46
m
lucasmcdonald3 Sep 16, 2024
c9c88b1
m
lucasmcdonald3 Sep 16, 2024
55e0c8a
m
lucasmcdonald3 Sep 16, 2024
a7d2864
m
lucasmcdonald3 Sep 16, 2024
415ab13
m
lucasmcdonald3 Sep 16, 2024
50fc023
m
lucasmcdonald3 Sep 16, 2024
a1bbcd7
m
lucasmcdonald3 Sep 16, 2024
fd2f8d8
m
lucasmcdonald3 Sep 17, 2024
689a4c2
m
lucasmcdonald3 Sep 17, 2024
f12bc59
m
lucasmcdonald3 Sep 17, 2024
71492e1
m
lucasmcdonald3 Sep 17, 2024
cc58a53
merge
lucasmcdonald3 Sep 17, 2024
9519d29
format
lucasmcdonald3 Sep 18, 2024
71c79c9
repoly
lucasmcdonald3 Sep 18, 2024
bf30d61
m
lucasmcdonald3 Sep 18, 2024
bbe84be
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 18, 2024
35d9676
test
lucasmcdonald3 Sep 18, 2024
b61fbc2
wip
lucasmcdonald3 Sep 18, 2024
ddc462b
m
lucasmcdonald3 Sep 18, 2024
d947320
m
lucasmcdonald3 Sep 18, 2024
0c31ca9
commit dtr
lucasmcdonald3 Sep 18, 2024
4edda8c
commit dtr
lucasmcdonald3 Sep 18, 2024
52dbd3f
m
lucasmcdonald3 Sep 18, 2024
ff50c46
m
lucasmcdonald3 Sep 18, 2024
808feaf
m
lucasmcdonald3 Sep 19, 2024
72784ba
m
lucasmcdonald3 Sep 19, 2024
70465b1
merge
lucasmcdonald3 Sep 19, 2024
ca219dd
m
lucasmcdonald3 Sep 19, 2024
9a73fc6
m
lucasmcdonald3 Sep 19, 2024
7212f87
merge
lucasmcdonald3 Sep 19, 2024
ed977cf
Merge branch 'python-reviewed' into lucmcdon/python-mpl-v2
lucasmcdonald3 Sep 19, 2024
4793be7
merge
lucasmcdonald3 Sep 19, 2024
022856c
m
lucasmcdonald3 Sep 19, 2024
81fcee2
clean
lucasmcdonald3 Sep 19, 2024
3f8eb62
clean
lucasmcdonald3 Sep 19, 2024
5163a4c
m
lucasmcdonald3 Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/polymorph_codegen/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ runs:
run: |
make polymorph_dotnet
- name: Regenerate Python code using smithy-dafny
working-directory: ./${{ inputs.library }}
shell: bash
run: |
make polymorph_python
- name: Check regenerated code against commited code
# Composite action inputs seem to not actually support booleans properly for some reason
if: inputs.diff-generated-code == 'true'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/daily_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ jobs:
uses: ./.github/workflows/library_net_tests.yml
with:
dafny: ${{needs.getVersion.outputs.version}}
daily-ci-python:
needs: getVersion
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
uses: ./.github/workflows/library_python_tests.yml
with:
# TODO: Once minimum Dafny version is 4.7.0, point this at `getVersion` output
dafny: 4.7.0
daily-interop-test:
needs: getVersion
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/library_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
# Note dotnet is only used for formatting generated code
# in this workflow
dotnet-version: ["6.0.x"]
# Note dotnet is only used for formatting generated code
# in this workflow.
# The workflow installs black formatter and runs it on generated code.
python-version: [3.11]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
defaults:
Expand Down Expand Up @@ -66,6 +70,15 @@ jobs:
- name: Install Smithy-Dafny codegen dependencies
uses: ./.github/actions/install_smithy_dafny_codegen_dependencies

- name: Setup Python and black for code formatting
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: |
python -m pip install --upgrade pip
python -m pip install --upgrade black

- uses: ./.github/actions/polymorph_codegen
with:
dafny: ${{ env.DAFNY_VERSION }}
Expand Down
44 changes: 41 additions & 3 deletions .github/workflows/library_interop_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ubuntu-latest,
macos-12,
]
language: [java, net]
language: [java, net, python]
# https://taskei.amazon.dev/tasks/CrypTool-5284
dotnet-version: ["6.0.x"]
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -57,6 +57,16 @@ jobs:
distribution: "corretto"
java-version: 17

- name: Setup Python for running tests
uses: actions/setup-python@v4
with:
python-version: 3.11
architecture: x64
- run: |
python -m pip install --upgrade pip
pip install --upgrade tox
pip install poetry

- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
Expand Down Expand Up @@ -89,6 +99,15 @@ jobs:
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_net

- name: Build ${{ matrix.library }} implementation in Python
if: matrix.language == 'python'
shell: bash
working-directory: ./${{ matrix.library }}
run: |
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_python

- name: Setup gradle
if: matrix.language == 'java'
uses: gradle/gradle-build-action@v2
Expand Down Expand Up @@ -128,8 +147,8 @@ jobs:
ubuntu-latest,
macos-12,
]
encrypting_language: [java, net]
decrypting_language: [java, net]
encrypting_language: [java, net, python]
decrypting_language: [java, net, python]
dotnet-version: ["6.0.x"]
runs-on: ${{ matrix.os }}
permissions:
Expand Down Expand Up @@ -167,6 +186,16 @@ jobs:
distribution: "corretto"
java-version: 17

- name: Setup Python for running tests
uses: actions/setup-python@v4
with:
python-version: 3.11
architecture: x64
- run: |
python -m pip install --upgrade pip
pip install --upgrade tox
pip install poetry

- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
Expand Down Expand Up @@ -199,6 +228,15 @@ jobs:
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_net

- name: Build ${{ matrix.library }} implementation in Python
if: matrix.decrypting_language == 'python'
shell: bash
working-directory: ./${{ matrix.library }}
run: |
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_python

- name: Download Encrypt Manifest Artifact
uses: actions/download-artifact@v4
with:
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/library_python_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# This workflow performs tests in Python.
name: Library Python tests

on:
workflow_call:
inputs:
dafny:
description: "The Dafny version to run"
required: true
type: string
regenerate-code:
description: "Regenerate code using smithy-dafny"
required: false
default: false
type: boolean

jobs:
testPython:
strategy:
fail-fast: false
matrix:
library:
[
StandardLibrary,
AwsCryptographyPrimitives,
ComAmazonawsKms,
ComAmazonawsDynamodb,
AwsCryptographicMaterialProviders,
TestVectorsAwsCryptographicMaterialProviders,
]
python-version: ["3.11"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
permissions:
id-token: write
contents: read
steps:
- name: Support longpaths on Git checkout
run: |
git config --global core.longpaths true

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2
role-session-name: PythonTests

- uses: actions/checkout@v4
# The specification submodule is private so we don't have access, but we don't need
# it to verify the Dafny code. Instead we manually pull the submodules we DO need.
- run: git submodule update --init libraries
- run: git submodule update --init smithy-dafny

- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: ${{ inputs.dafny }}

- name: Setup Python ${{ matrix.python-version }} for running tests
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: |
python -m pip install --upgrade pip
pip install --upgrade tox
pip install poetry

- name: Build ${{ matrix.library }} implementation
working-directory: ./${{ matrix.library }}
run: |
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_python CORES=$CORES

- name: Test ${{ matrix.library }}
working-directory: ./${{ matrix.library }}
shell: bash
run: |
make test_python
6 changes: 6 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
with:
dafny: ${{ inputs.dafny }}
regenerate-code: ${{ inputs.regenerate-code }}
manual-ci-python:
uses: ./.github/workflows/library_python_tests.yml
with:
# TODO: Once minimum Dafny version is 4.7.0, point this at `getVersion` output
dafny: 4.7.0
regenerate-code: ${{ inputs.regenerate-code }}
manual-interop-test:
uses: ./.github/workflows/library_interop_tests.yml
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/nightly_dafny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
with:
dafny: "nightly-latest"
regenerate-code: true
dafny-nightly-python:
needs: getVersion
uses: ./.github/workflows/library_python_tests.yml
with:
# TODO: Once minimum Dafny version is 4.7.0, point this at `getVersion` output
dafny: 4.7.0

cut-issue-on-failure:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
uses: ./.github/workflows/library_net_tests.yml
with:
dafny: ${{needs.getVersion.outputs.version}}
pr-ci-python:
needs: getVersion
uses: ./.github/workflows/library_python_tests.yml
with:
# TODO: Once minimum Dafny version is 4.7.0, point this at `getVersion` output
dafny: 4.7.0
pr-interop-test:
needs: getVersion
uses: ./.github/workflows/library_interop_tests.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
uses: ./.github/workflows/library_net_tests.yml
with:
dafny: ${{needs.getVersion.outputs.version}}
push-ci-python:
needs: getVersion
uses: ./.github/workflows/library_python_tests.yml
with:
# TODO: Once minimum Dafny version is 4.7.0, point this at `getVersion` output
dafny: 4.7.0
pr-interop-test:
needs: getVersion
uses: ./.github/workflows/library_interop_tests.yml
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
.vscode/*
*.sln?*
**/.DS_Store
build/*
test/**/Output/*
/package-lock.json
/node_modules

# Build Artifacts
build
build/*
doc/build
AwsCryptographicMaterialProviders/runtimes/python/doc/generated/*

# Duvet output
specification_compliance_report.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
variables:
BRANCH: "main"
secrets-manager:
TWINE_USERNAME: PyPiAPIToken:username
TWINE_USERNAME: PyPiAPIToken:username
TWINE_PASSWORD: PyPiAPIToken:password

phases:
Expand All @@ -17,20 +17,18 @@ phases:
pre_build:
commands:
- git checkout $COMMIT_ID
# TODO (Ritvik) -- update version for mpl
# - FOUND_VERSION=$(sed -n 's/__version__ = "\(.*\)"/\1/p' src/aws_encryption_sdk/identifiers.py)
# - |
# if expr ${FOUND_VERSION} != ${VERSION}; then
# echo "identifiers.py version (${FOUND_VERSION}) does not match expected version (${VERSION}), stopping"
# exit 1;
# fi
- FOUND_VERSION=$(sed -n 's/version = "\(.*\)"/\1/p' AwsCryptographicMaterialProviders/runtimes/python/pyproject.toml)
- |
if expr ${FOUND_VERSION} != ${VERSION}; then
echo "pyproject.toml version (${FOUND_VERSION}) does not match expected version (${VERSION}), stopping"
exit 1;
fi
build:
commands:
- tox -e park
- tox -e release
- echo "Skipping prod release until we are ready to release the MPL"

batch:
fast-fail: true
fast-fail: true
build-graph:
- identifier: release_to_prod
- identifier: validate_prod_release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
variables:
BRANCH: "main"
secrets-manager:
TWINE_USERNAME: TestPyPiAPIToken:username
TWINE_USERNAME: TestPyPiAPIToken:username
TWINE_PASSWORD: TestPyPiAPIToken:password

phases:
Expand All @@ -17,20 +17,17 @@ phases:
pre_build:
commands:
- git checkout $COMMIT_ID
# TODO (Ritvik) -- update version for mpl
# - FOUND_VERSION=$(sed -n 's/__version__ = "\(.*\)"/\1/p' src/aws_encryption_sdk/identifiers.py)
# - |
# if expr ${FOUND_VERSION} != ${VERSION}; then
# echo "identifiers.py version (${FOUND_VERSION}) does not match expected version (${VERSION}), stopping"
# exit 1;
# fi
- FOUND_VERSION=$(sed -n 's/version = "\(.*\)"/\1/p' AwsCryptographicMaterialProviders/runtimes/python/pyproject.toml)
- |
if expr ${FOUND_VERSION} != ${VERSION}; then
echo "pyproject.toml version (${FOUND_VERSION}) does not match expected version (${VERSION}), stopping"
exit 1;
fi
build:
commands:
- cd AwsCryptographicMaterialProviders/runtimes/python/
- tox -e park
- tox -e test-release


batch:
fast-fail: true
build-graph:
Expand Down
Loading
Loading