electionguard-python/pyproject.toml

124 строки
3.1 KiB
TOML
Исходник Обычный вид История

[tool.poetry]
name = "electionguard"
2021-10-13 17:22:16 +03:00
version = "1.4.0"
description = "ElectionGuard: Support for e2e verified elections."
license = "MIT"
authors = ["Microsoft <electionguard@microsoft.com>"]
maintainers = []
readme = "README.md"
homepage = "https://microsoft.github.io/electionguard-python"
repository = "https://github.com/microsoft/electionguard-python"
documentation = "https://microsoft.github.io/electionguard-python"
keywords = []
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Topic :: Utilities"]
💻 CLI V1 (#562) * Hello world cli * poetry add click, to help with CLI work * Pull manifest, display its data * Convert to setuptools, add documentation * Add output formatting and colors * Rename cli alias to eg and add support for multiple commands * Delete start * Extract hello command to its own file * Extract e2e to its own file * Run key ceremony, build election * Build election, encrypt votes, cast, spoil, decrypt tally * Refactor to smaller methods * Refactored key ceremony into its own step * Refactor key ceremony step into smaller self-documenting methods * Refactoring to fix linting issues * Refactor extract the election building step * Refactor vote submission into its own class/file * Refactor extract decrypt tally to a dedicated class/file * Refactor extract printing results to a separate step * Refactor extract input retrieval to its own step * Refactor extract outputs and inputs to models * Refactor rename commands to commands folder * Refactor decryption results into dedicated class * make auto-lint * Fix bug identified during demo * Removing todo's per PR * Delete readme per PR * Misc PR feedback * Refactored the decrypt_step to be more readable per PR * ♻️ Refactor CLI code (#571) * 🔒. Resolve poetry lock * 📦 Use poetry scripts Lead with poetry scripts instead of directly having setup.py Include electionguard_cli in project * ♻️. Refactor init and relative links * ♻️ Preferred Recursive MkInit (Optional) * ♻️ Incorrect nonrelative link * Replace custom code with electionguard_tools per PR Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-04-05 23:38:52 +03:00
packages = [
{ include = "electionguard", from = "src" },
{ include = "electionguard_tools", from = "src" },
💻 CLI V1 (#562) * Hello world cli * poetry add click, to help with CLI work * Pull manifest, display its data * Convert to setuptools, add documentation * Add output formatting and colors * Rename cli alias to eg and add support for multiple commands * Delete start * Extract hello command to its own file * Extract e2e to its own file * Run key ceremony, build election * Build election, encrypt votes, cast, spoil, decrypt tally * Refactor to smaller methods * Refactored key ceremony into its own step * Refactor key ceremony step into smaller self-documenting methods * Refactoring to fix linting issues * Refactor extract the election building step * Refactor vote submission into its own class/file * Refactor extract decrypt tally to a dedicated class/file * Refactor extract printing results to a separate step * Refactor extract input retrieval to its own step * Refactor extract outputs and inputs to models * Refactor rename commands to commands folder * Refactor decryption results into dedicated class * make auto-lint * Fix bug identified during demo * Removing todo's per PR * Delete readme per PR * Misc PR feedback * Refactored the decrypt_step to be more readable per PR * ♻️ Refactor CLI code (#571) * 🔒. Resolve poetry lock * 📦 Use poetry scripts Lead with poetry scripts instead of directly having setup.py Include electionguard_cli in project * ♻️. Refactor init and relative links * ♻️ Preferred Recursive MkInit (Optional) * ♻️ Incorrect nonrelative link * Replace custom code with electionguard_tools per PR Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-04-05 23:38:52 +03:00
{ include = "electionguard_cli", from = "src" },
{ include = "electionguard_gui", from = "src" },
💻 CLI V1 (#562) * Hello world cli * poetry add click, to help with CLI work * Pull manifest, display its data * Convert to setuptools, add documentation * Add output formatting and colors * Rename cli alias to eg and add support for multiple commands * Delete start * Extract hello command to its own file * Extract e2e to its own file * Run key ceremony, build election * Build election, encrypt votes, cast, spoil, decrypt tally * Refactor to smaller methods * Refactored key ceremony into its own step * Refactor key ceremony step into smaller self-documenting methods * Refactoring to fix linting issues * Refactor extract the election building step * Refactor vote submission into its own class/file * Refactor extract decrypt tally to a dedicated class/file * Refactor extract printing results to a separate step * Refactor extract input retrieval to its own step * Refactor extract outputs and inputs to models * Refactor rename commands to commands folder * Refactor decryption results into dedicated class * make auto-lint * Fix bug identified during demo * Removing todo's per PR * Delete readme per PR * Misc PR feedback * Refactored the decrypt_step to be more readable per PR * ♻️ Refactor CLI code (#571) * 🔒. Resolve poetry lock * 📦 Use poetry scripts Lead with poetry scripts instead of directly having setup.py Include electionguard_cli in project * ♻️. Refactor init and relative links * ♻️ Preferred Recursive MkInit (Optional) * ♻️ Incorrect nonrelative link * Replace custom code with electionguard_tools per PR Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-04-05 23:38:52 +03:00
]
[tool.poetry.urls]
"GitHub Pages" = "https://microsoft.github.io/electionguard-python"
"Read the Docs" = "https://electionguard-python.readthedocs.io"
"Releases" = "https://github.com/microsoft/electionguard-python/releases"
"Milestones" = "https://github.com/microsoft/electionguard-python/milestones"
"Issue Tracker" = "https://github.com/microsoft/electionguard-python/issues"
[tool.poetry.dependencies]
python = "^3.9.5"
gmpy2 = "^2.0.8"
psutil = ">=5.7.2"
pydantic = "1.9.0"
💻 CLI V1 (#562) * Hello world cli * poetry add click, to help with CLI work * Pull manifest, display its data * Convert to setuptools, add documentation * Add output formatting and colors * Rename cli alias to eg and add support for multiple commands * Delete start * Extract hello command to its own file * Extract e2e to its own file * Run key ceremony, build election * Build election, encrypt votes, cast, spoil, decrypt tally * Refactor to smaller methods * Refactored key ceremony into its own step * Refactor key ceremony step into smaller self-documenting methods * Refactoring to fix linting issues * Refactor extract the election building step * Refactor vote submission into its own class/file * Refactor extract decrypt tally to a dedicated class/file * Refactor extract printing results to a separate step * Refactor extract input retrieval to its own step * Refactor extract outputs and inputs to models * Refactor rename commands to commands folder * Refactor decryption results into dedicated class * make auto-lint * Fix bug identified during demo * Removing todo's per PR * Delete readme per PR * Misc PR feedback * Refactored the decrypt_step to be more readable per PR * ♻️ Refactor CLI code (#571) * 🔒. Resolve poetry lock * 📦 Use poetry scripts Lead with poetry scripts instead of directly having setup.py Include electionguard_cli in project * ♻️. Refactor init and relative links * ♻️ Preferred Recursive MkInit (Optional) * ♻️ Incorrect nonrelative link * Replace custom code with electionguard_tools per PR Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-04-05 23:38:52 +03:00
click = "^8.1.0"
dacite = "^1.6.0"
python-dateutil = "^2.8.2"
types-python-dateutil = "^2.8.14"
🖥️ #683 Initial GUI (#684) * Initial eel proof of concept that works * Bootstrap, simple UI, second page * UI to setup election, validation * Pass manifest contents to server * Ability to setup election through GUI w/out output * Save file output * Fix merge conflict * Docker files for DB * Rewrite app with vue and components * Ability to navigate to the setup election page * Ability to stop the database * More pages * ui cleanup * Use routing * html strings * Key ceremony creation * Insert new keys into mongo * "Push" joinable keys from admin to guardian (via polling to db) * Loading icon and better alert * Ability for guardians to join keys (via console) * Breakout logic in start to individual files per component * DB key retrieval * Ability to join key ceremonies * Refactor components into appropriate folders * Setup guardian and setup admin pages * Guardian setup page * Switch to each page determining if it needs user authentication * login page validation * Login page done right that remembers where to go * Display username in navbar * fix links * Support multiple simultaneous connections * On create key navigate to view key page and pass new id param * Refactor routes into separate file * Refactor more nav logic into the router service * Better validation for guardian count * Parameterize db password in gui * Parameterize the database password * Refactor rename key to key ceremony * Fix linting issues * Add url to election setup and fix out of date poc code * Fix minor bugs * Parameterize database host per PR * Tidy up buttons per PR
2022-07-11 18:05:23 +03:00
Eel = {extras = ["jinja2"], version = "^0.14.0"}
pymongo = "^4.1.1"
dependency-injector = "^4.39.1"
pytest-mock = "^3.8.2"
[tool.poetry.dev-dependencies]
atomicwrites = "*"
black = "22.3.0"
coverage = "*"
docutils = "*"
hypothesis = ">=5.15.1"
ipython = "^7.31.1"
ipykernel = "^6.4.1"
jeepney = "*"
jupyter-black = "^0.3.1"
mkdocs = "^1.3.0"
mkdocs-jupyter = "^0.20.1"
mkinit = "^0.3.3"
mypy = "^0.910"
pydeps = "*"
pylint = "*"
pytest = "*"
secretstorage = "*"
twine = "*"
typish = '*'
💻 CLI V1 (#562) * Hello world cli * poetry add click, to help with CLI work * Pull manifest, display its data * Convert to setuptools, add documentation * Add output formatting and colors * Rename cli alias to eg and add support for multiple commands * Delete start * Extract hello command to its own file * Extract e2e to its own file * Run key ceremony, build election * Build election, encrypt votes, cast, spoil, decrypt tally * Refactor to smaller methods * Refactored key ceremony into its own step * Refactor key ceremony step into smaller self-documenting methods * Refactoring to fix linting issues * Refactor extract the election building step * Refactor vote submission into its own class/file * Refactor extract decrypt tally to a dedicated class/file * Refactor extract printing results to a separate step * Refactor extract input retrieval to its own step * Refactor extract outputs and inputs to models * Refactor rename commands to commands folder * Refactor decryption results into dedicated class * make auto-lint * Fix bug identified during demo * Removing todo's per PR * Delete readme per PR * Misc PR feedback * Refactored the decrypt_step to be more readable per PR * ♻️ Refactor CLI code (#571) * 🔒. Resolve poetry lock * 📦 Use poetry scripts Lead with poetry scripts instead of directly having setup.py Include electionguard_cli in project * ♻️. Refactor init and relative links * ♻️ Preferred Recursive MkInit (Optional) * ♻️ Incorrect nonrelative link * Replace custom code with electionguard_tools per PR Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-04-05 23:38:52 +03:00
[tool.poetry.scripts]
eg = 'electionguard_cli.start:cli'
🖥️ #683 Initial GUI (#684) * Initial eel proof of concept that works * Bootstrap, simple UI, second page * UI to setup election, validation * Pass manifest contents to server * Ability to setup election through GUI w/out output * Save file output * Fix merge conflict * Docker files for DB * Rewrite app with vue and components * Ability to navigate to the setup election page * Ability to stop the database * More pages * ui cleanup * Use routing * html strings * Key ceremony creation * Insert new keys into mongo * "Push" joinable keys from admin to guardian (via polling to db) * Loading icon and better alert * Ability for guardians to join keys (via console) * Breakout logic in start to individual files per component * DB key retrieval * Ability to join key ceremonies * Refactor components into appropriate folders * Setup guardian and setup admin pages * Guardian setup page * Switch to each page determining if it needs user authentication * login page validation * Login page done right that remembers where to go * Display username in navbar * fix links * Support multiple simultaneous connections * On create key navigate to view key page and pass new id param * Refactor routes into separate file * Refactor more nav logic into the router service * Better validation for guardian count * Parameterize db password in gui * Parameterize the database password * Refactor rename key to key ceremony * Fix linting issues * Add url to election setup and fix out of date poc code * Fix minor bugs * Parameterize database host per PR * Tidy up buttons per PR
2022-07-11 18:05:23 +03:00
egui = 'electionguard_gui.start:run'
💻 CLI V1 (#562) * Hello world cli * poetry add click, to help with CLI work * Pull manifest, display its data * Convert to setuptools, add documentation * Add output formatting and colors * Rename cli alias to eg and add support for multiple commands * Delete start * Extract hello command to its own file * Extract e2e to its own file * Run key ceremony, build election * Build election, encrypt votes, cast, spoil, decrypt tally * Refactor to smaller methods * Refactored key ceremony into its own step * Refactor key ceremony step into smaller self-documenting methods * Refactoring to fix linting issues * Refactor extract the election building step * Refactor vote submission into its own class/file * Refactor extract decrypt tally to a dedicated class/file * Refactor extract printing results to a separate step * Refactor extract input retrieval to its own step * Refactor extract outputs and inputs to models * Refactor rename commands to commands folder * Refactor decryption results into dedicated class * make auto-lint * Fix bug identified during demo * Removing todo's per PR * Delete readme per PR * Misc PR feedback * Refactored the decrypt_step to be more readable per PR * ♻️ Refactor CLI code (#571) * 🔒. Resolve poetry lock * 📦 Use poetry scripts Lead with poetry scripts instead of directly having setup.py Include electionguard_cli in project * ♻️. Refactor init and relative links * ♻️ Preferred Recursive MkInit (Optional) * ♻️ Incorrect nonrelative link * Replace custom code with electionguard_tools per PR Co-authored-by: Keith Fung <keithrfung@users.noreply.github.com>
2022-04-05 23:38:52 +03:00
[tool.black]
target-version = ['py39']
♻️ Simplify Serialization (#394) * 📄 Design and Architecture Shifts - Remove focus on NamedTuple's in favor of dataclasses since serializers tend to handle these better - Change name of section to * ♻️. Prefer dataclass to NamedTuple Using the built in constructor for dataclasses helps focus on plain constructable objects that are easy to serialize as opposed to immutable objects. * 🚧 Remove Serializable Squishy squash * 📄. Update publish and verify documentation - Publish and verify should be moved to spec documentation. Simplify wording for the python documentation. * 📦 Remove jsons + Update dependencies * 🔥. Remove publish Publish functionally creates this idea that this method should be used when in reality the files should be handled individually by the system using it. This gives more flexibility on the output and less scaling problems with large ballot amounts. It also forces the use of serialization in the base electionguard. * 🔥 Remove serialization test * 🔨 Fix incorrect JSON data format * 🐛 Fix nonce test bug This doesn't happen all the time but is frustrating. Due to the setup of this test, it is possible for it to fail randomly. With a lower value of Q, it is more likely to happen more frequently. The issue arises due to sequencing. The separate random sequence CAN include the same number. It is random so sometimes there is a chance they align. Once this happens hypothesis keeps checking the case. * 📦 Add pydantic to dev dependencies * ♻️ Rename enum numbers to string - This assists with typical serialization without specifying the output. This can also be accomplished with a dictionary in other languages Revert "Squish thing" This reverts commit e97efb6435520148328d757c0460a1ad68657df8. * 🔥 Remove unnecessary prints in test_encrypt * 🔨Have strategies rely on enum Strategy can actual rely on the enum itself instead of a number * 🐛 Fix extended data changes * ♻️ Convert EncryptionDevice to dataclass * ✨ Implement serialize Add construct path to serialize * ✅ Modify End to End Test * ⚠️ Massive changes to group and q and p * ✅ Documentation and Cleanup as per review
2021-08-04 22:29:25 +03:00
[tool.pylint.basic]
extension-pkg-whitelist = "pydantic"
[tool.pylint.format]
max-line-length = 120
# FIXME: Pylint should not require this many exceptions
[tool.pylint.messages_control]
disable = '''
duplicate-code,
fixme,
invalid-name,
missing-module-docstring,
missing-function-docstring,
no-value-for-parameter,
redefined-builtin,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-function-args,
too-many-lines,
too-many-locals,
too-many-nested-blocks,
unnecessary-lambda,
'''
[tool.coverage.run]
branch = true
source = ["src/electionguard"]
[tool.coverage.html]
directory = "coverage_html_report"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
python_version = 3.9
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
show_column_numbers = true