Skip to content

Commit 2f92faf

Browse files
Bug/binary serialization (#375)
* remove numpy dependency * serialize bignums as hex * rename election context description hash to manifest hash * fix linter errors * poetry update
1 parent 9e11da3 commit 2f92faf

File tree

8 files changed

+473
-486
lines changed

8 files changed

+473
-486
lines changed

Makefile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all openssl-fix install install-gmp install-gmp-mac install-gmp-linux install-gmp-windows install-poetry install-mkdocs auto-lint validate test test-example bench coverage coverage-html coverage-xml coverage-erase generate-sample-data
1+
.PHONY: all openssl-fix install install-gmp install-gmp-mac install-gmp-linux install-gmp-windows install-mkdocs auto-lint validate test test-example bench coverage coverage-html coverage-xml coverage-erase generate-sample-data
22

33
CODE_COVERAGE ?= 90
44
OS ?= $(shell python -c 'import platform; print(platform.system())')
@@ -11,7 +11,8 @@ all: environment install build validate auto-lint coverage
1111
environment:
1212
@echo 🔧 ENVIRONMENT SETUP
1313
make install-gmp
14-
pip install 'poetry==1.1.6'
14+
pip3 install 'poetry==1.1.6'
15+
poetry config virtualenvs.in-project true
1516
poetry install
1617
@echo 🚨 Be sure to add poetry to PATH
1718

@@ -67,10 +68,6 @@ ifeq ($(IS_64_BIT), False)
6768
@echo 32 bit system detected
6869
endif
6970

70-
install-poetry:
71-
@echo 📦 Install poetry
72-
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
73-
7471
lint:
7572
@echo 💚 LINT
7673
@echo 1.Pylint
@@ -116,7 +113,7 @@ test:
116113

117114
test-example:
118115
@echo ✅ TEST Example
119-
poetry run python -m pytest -s tests/integration/test_end_to_end_election.py
116+
poetry run python3 -m pytest -s tests/integration/test_end_to_end_election.py
120117

121118
test-integration:
122119
@echo ✅ INTEGRATION TESTS
@@ -140,7 +137,7 @@ coverage-erase:
140137
# Benchmark
141138
bench:
142139
@echo 📊 BENCHMARKS
143-
poetry run python -s tests/bench/bench_chaum_pedersen.py
140+
poetry run python3 -s tests/bench/bench_chaum_pedersen.py
144141

145142
# Documentation
146143
install-mkdocs:
@@ -171,7 +168,7 @@ dependency-graph-ci:
171168

172169
# Sample Data
173170
generate-sample-data:
174-
poetry run python src/electionguardtest/sample_generator.py -n $(SAMPLE_BALLOT_COUNT) -s $(SAMPLE_BALLOT_SPOIL_RATE)
171+
poetry run python3 src/electionguardtest/sample_generator.py -n $(SAMPLE_BALLOT_COUNT) -s $(SAMPLE_BALLOT_SPOIL_RATE)
175172

176173
# Publish
177174
publish:
@@ -190,13 +187,13 @@ publish-test-ci:
190187

191188
publish-validate:
192189
@echo ✅ VALIDATE
193-
python -m pip install --no-deps electionguard
194-
python -c 'import electionguard'
190+
python3 -m pip install --no-deps electionguard
191+
python3 -c 'import electionguard'
195192

196193
publish-validate-test:
197194
@echo ✅ VALIDATE
198-
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps electionguard
199-
python -c 'import electionguard'
195+
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps electionguard
196+
python3 -c 'import electionguard'
200197

201198
# Release
202199
release-zip-ci:

0 commit comments

Comments
 (0)