Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 15 additions & 15 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- cron: "30 23 * * 1" # 2330 UTC Every Monday

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: "3.11"

jobs:
code_analysis:
Expand All @@ -27,13 +27,13 @@ jobs:
language: ["python"]
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -43,26 +43,26 @@ jobs:
- name: Lint
run: make lint
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: "${{ matrix.language }}"
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4

linux_check:
name: Linux Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Build
run: make build validate
- name: Full Test Suite & Coverage
uses: nick-fields/retry@v2
uses: nick-fields/retry@v4
with:
timeout_minutes: 10
max_attempts: 1
Expand All @@ -84,13 +84,13 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Build
run: make build validate
- name: Integration Tests
uses: nick-fields/retry@v2
uses: nick-fields/retry@v4
with:
timeout_minutes: 3
max_attempts: 1
Expand Down
62 changes: 25 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ on:
types: [closed]

env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: "3.11"

jobs:
code_analysis:
name: Code Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -29,26 +29,26 @@ jobs:
- name: Lint
run: make lint
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: python
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4

linux_check:
name: Linux Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -65,13 +65,13 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -89,13 +89,13 @@ jobs:
needs: [code_analysis, mac_check, linux_check]
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
Expand All @@ -108,27 +108,17 @@ jobs:
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV
- name: Generate release notes
run: make release-notes
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: Release ${{ env.PACKAGE_VERSION }}
draft: false
prerelease: false
- name: Dependency Graph
run: make dependency-graph-ci
- name: Upload Dependency Graph as Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: dependency-graph
path: dependency-graph.svg
- name: Build
run: make build
- name: Upload Package as Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v7
with:
name: package
path: dist/
Expand All @@ -139,15 +129,13 @@ jobs:
run: make publish-ci
- name: Zip Artifacts
run: make release-zip-ci
- name: Add Artifacts to Release
id: upload-release-asset_1
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v3
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./electionguard.zip
asset_name: electionguard.zip
asset_content_type: application/zip
tag_name: ${{ env.PACKAGE_VERSION }}
name: Release ${{ env.PACKAGE_VERSION }}
draft: false
prerelease: false
files: ./electionguard.zip
- name: Deploy Github Pages
run: make docs-deploy-ci
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ElectionGuard supports a variety of use cases. The Primary use case is to genera

## 💻 Requirements

- [Python 3.9+](https://www.python.org/downloads/) is <ins>**required**</ins> to develop this SDK. If developer uses multiple versions of python, [pyenv](https://github.com/pyenv/pyenv) is suggested to assist version management.
- [Python 3.11+](https://www.python.org/downloads/) is <ins>**required**</ins> to develop this SDK. If developer uses multiple versions of python, [pyenv](https://github.com/pyenv/pyenv) is suggested to assist version management.
- [GNU Make](https://www.gnu.org/software/make/manual/make.html) is used to simplify the commands and GitHub Actions. This approach is recommended to simplify the command line experience. This is built in for MacOS and Linux. For Windows, setup is simpler with [Chocolatey](https://chocolatey.org/install) and installing the provided [make package](https://chocolatey.org/packages/make). The other Windows option is [manually installing make](http://gnuwin32.sourceforge.net/packages/make.htm).
- [Gmpy2](https://gmpy2.readthedocs.io/en/latest/) is used for [Arbitrary-precision arithmetic](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic) which
has its own [installation requirements (native C libraries)](https://gmpy2.readthedocs.io/en/latest/intro.html#installation) on Linux and MacOS. **⚠️ Note:** _This is not required for Windows since the gmpy2 precompiled libraries are provided._
Expand Down
2 changes: 1 addition & 1 deletion docs/0_Configure_Election.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"\n",
"# get an `InternalElectionDescription` and `CiphertextElectionContext`\n",
"# that are used for the remainder of the election.\n",
"(internal_manifest, context) = builder.build()"
"internal_manifest, context = builder.build()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ElectionGuard supports a variety of use cases. The Primary use case is to genera

## 💻 Requirements

- [Python 3.9+](https://www.python.org/downloads/) is <ins>**required**</ins> to develop this SDK. If developer uses multiple versions of python, [pyenv](https://github.com/pyenv/pyenv) is suggested to assist version management.
- [Python 3.11+](https://www.python.org/downloads/) is <ins>**required**</ins> to develop this SDK. If developer uses multiple versions of python, [pyenv](https://github.com/pyenv/pyenv) is suggested to assist version management.
- [GNU Make](https://www.gnu.org/software/make/manual/make.html) is used to simplify the commands and GitHub Actions. This approach is recommended to simplify the command line experience. This is built in for MacOS and Linux. For Windows, setup is simpler with [Chocolatey](https://chocolatey.org/install) and installing the provided [make package](https://chocolatey.org/packages/make). The other Windows option is [manually installing make](http://gnuwin32.sourceforge.net/packages/make.htm).
- [Gmpy2](https://gmpy2.readthedocs.io/en/latest/) is used for [Arbitrary-precision arithmetic](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic) which
has its own [installation requirements (native C libraries)](https://gmpy2.readthedocs.io/en/latest/intro.html#installation) on Linux and MacOS. **⚠️ Note:** _This is not required for Windows since the gmpy2 precompiled libraries are provided._
Expand Down
53 changes: 28 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "electionguard"
version = "1.4.0"
requires-python = ">=3.9.5,<4.0.0"
requires-python = ">=3.11,<4.0.0"
description = "ElectionGuard: Support for e2e verified elections."
license = "MIT"
authors = [{"name" = "Microsoft", "email" = "electionguard@microsoft.com"}]
Expand All @@ -19,17 +19,15 @@ classifiers = [
"Topic :: Utilities"
]
dependencies = [
"gmpy2>=2.0.8,<3.0.0",
"psutil>=5.7.2",
"pydantic==2.13.0",
"click>=8.1.0,<9.0.0",
"dacite>=1.6.0,<2.0.0",
"python-dateutil>=2.8.2,<3.0.0",
"types-python-dateutil>=2.8.14,<3.0.0",
"Eel[jinja2]>=0.14.0,<1.0.0",
"pymongo>=4.1.1,<5.0.0",
"dependency-injector>=4.39.1,<5.0.0",
"pytest-mock>=3.8.2,<4.0.0",
"gmpy2>=2.3.2,<3.0.0",
"psutil>=7.2.2",
"pydantic>=2.14.1,<3.0.0",
"click>=8.5.0,<9.0.0",
"dacite>=1.9.2,<2.0.0",
"python-dateutil>=2.9.0.post0,<3.0.0",
"Eel[jinja2]>=0.18.2,<1.0.0",
"pymongo>=4.19.0,<5.0.0",
"dependency-injector>=4.49.1,<5.0.0",
]

[project.urls]
Expand All @@ -45,21 +43,23 @@ documentation = "https://Election-Tech-Initiative.github.io/electionguard-python
[dependency-groups]
dev = [
"atomicwrites",
"black==25.11.0",
"coverage",
"black==26.10.1",
"coverage>=7.16.2",
"docutils",
"hypothesis>=5.15.1",
"ipykernel>=6.4.1,<7.0.0",
"ipython>=7.31.1,<8.0.0",
"hypothesis>=6.170.5",
"ipykernel>=7.4.0,<8.0.0",
"ipython>=9.17.1,<10.0.0",
"jeepney",
"jupyter-black>=0.3.1,<0.4.0",
"jupyter-black>=0.4.0,<0.5.0",
"mkdocs>=1.6.1,<2.0.0",
"mkdocs-jupyter>=0.26.2,<0.27.0",
"mkdocs-jupyter>=0.26.3,<0.27.0",
"mkinit",
"mypy==1.19.1",
"mypy==2.4.0",
"pydeps",
"pylint",
"pytest",
"pylint>=4.1.3",
"pytest>=9.1.1",
"pytest-mock>=3.15.1",
"types-python-dateutil>=2.9.0",
"secretstorage",
"twine",
"typish",
Expand All @@ -70,14 +70,14 @@ eg = 'electionguard_cli.start:cli'
egui = 'electionguard_gui.start:run'

[build-system]
requires = ["uv_build>=0.11.14,<0.12"]
requires = ["uv_build>=0.13.4,<0.14"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = ["electionguard", "electionguard_cli", "electionguard_gui", "electionguard_tools"]

[tool.black]
target-version = ['py39']
target-version = ['py311']

[tool.pylint.basic]
extension-pkg-whitelist = "pydantic"
Expand All @@ -86,10 +86,13 @@ extension-pkg-whitelist = "pydantic"
max-line-length = 120

# FIXME: Pylint should not require this many exceptions
# cyclic-import, import-self: pylint 4.1 false positives on mkinit __init__ files whose submodule names start with the package name
[tool.pylint.messages_control]
disable = '''
cyclic-import,
duplicate-code,
fixme,
import-self,
invalid-name,
missing-module-docstring,
missing-function-docstring,
Expand All @@ -115,7 +118,7 @@ source = ["src/electionguard"]
directory = "coverage_html_report"

[tool.mypy]
python_version = "3.9"
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
Expand Down
2 changes: 2 additions & 0 deletions src/electionguard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
)
from electionguard.scheduler import (
Scheduler,
use_scheduler,
)
from electionguard.schnorr import (
SchnorrProof,
Expand Down Expand Up @@ -742,6 +743,7 @@
"to_raw",
"to_ticks",
"type",
"use_scheduler",
"utils",
"verify_election_partial_key_backup",
"verify_election_partial_key_challenge",
Expand Down
Loading
Loading