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

Serve Flask Prometheus Metrics; Relock Dependencies #46

Merged
merged 8 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .github/workflows/darker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
- uses: akaihola/darker@1.7.2
with:
version: "1.7.2" # defaults to same version, but can be modified
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.10"]
KPrasch marked this conversation as resolved.
Show resolved Hide resolved

steps:
- uses: actions/checkout@v3
Expand All @@ -32,7 +32,7 @@ jobs:
python -m pytest tests

- name: Upload test coverage to Codecov
if: matrix.python-version == '3.8'
if: matrix.python-version == '3.9'
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ name = "pypi"
python_version = "3"

[packages]
nucypher = {git = "https://github.com/nucypher/nucypher.git", ref = "v7.0.0-rc.1"}
nucypher-core = "==0.12.0" # must be the same as nucypher
nucypher = {git = "https://github.com/nucypher/nucypher.git", ref = "v7.0.0-rc.3"}
nucypher-core = "==0.13.0" # must be the same as nucypher
flask-cors = "*"
prometheus-flask-exporter = "*"

[dev-packages]
nucypher = {git = "https://github.com/nucypher/nucypher.git", editable = true, ref = "v7.0.0-rc.1", extras = ["dev"]} # needed for testerchain, and must be editable
nucypher = {git = "https://github.com/nucypher/nucypher.git", editable = true, ref = "v7.0.0-rc.3", extras = ["dev"]} # needed for testerchain, and must be editable
pytest = "<7" # match with nucypher/nucypher
pytest-cov = "*"
pytest-mock = "*"
Expand All @@ -21,7 +22,6 @@ pre-commit = "2.12.1"
coverage = "<=6.5.0"
maya = "*"


[pipenv]
allow_prereleases = true

Expand Down
4,078 changes: 2,018 additions & 2,060 deletions Pipfile.lock

Large diffs are not rendered by default.

270 changes: 132 additions & 138 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,178 +1,172 @@
-i https://pypi.python.org/simple
aiohttp==3.8.2 ; python_version >= '3.6'
aiosignal==1.3.1 ; python_version >= '3.7'
ape-solidity==0.6.8 ; python_version >= '3.8' and python_version < '4'
aiohttp==3.8.2; python_version >= '3.6'
aiosignal==1.3.1; python_version >= '3.7'
ape-solidity==0.6.9
appdirs==1.4.4
appnope==0.1.3
asttokens==2.2.1
async-timeout==4.0.3 ; python_version >= '3.7'
attrs==23.1.0 ; python_version >= '3.7'
autobahn==23.1.2 ; python_version >= '3.7'
asttokens==2.4.0
async-timeout==4.0.3; python_version >= '3.7'
attrs==23.1.0; python_version >= '3.7'
autobahn==23.6.2; python_version >= '3.9'
automat==22.10.0
backcall==0.2.0
backports.zoneinfo==0.2.1 ; python_version >= '3.6' and python_version < '3.9'
base58==1.0.3
bitarray==2.8.1
bitarray==2.8.2
bytestring-splitter==2.4.1
cached-property==1.5.2
certifi==2023.7.22 ; python_version >= '3.6'
cffi==1.15.1
cfgv==3.4.0 ; python_version >= '3.8'
charset-normalizer==2.1.1 ; python_full_version >= '3.6.0'
click==8.1.7 ; python_version >= '3.7'
colorama==0.4.6 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
certifi==2023.7.22; python_version >= '3.6'
cffi==1.16.0; python_version >= '3.8'
cfgv==3.4.0; python_version >= '3.8'
charset-normalizer==2.1.1; python_full_version >= '3.6.0'
click==8.1.7; python_version >= '3.7'
colorama==0.4.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
commonmark==0.9.1
constant-sorrow==0.1.0a9 ; python_version >= '3'
constant-sorrow==0.1.0a9; python_version >= '3'
constantly==15.1.0
coverage==6.5.0
cryptography==41.0.3 ; python_version >= '3.7'
cytoolz==0.12.2 ; python_version >= '3.6'
dataclassy==0.11.1 ; python_version >= '3.6'
dateparser==1.1.8 ; python_version >= '3.7'
decorator==5.1.1 ; python_version >= '3.5'
deprecated==1.2.14 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
coverage[toml]==6.5.0; python_version >= '3.7'
cryptography==41.0.5; python_version >= '3.7'
cytoolz==0.12.2; implementation_name == 'cpython'
dataclassy==0.11.1
dateparser==1.1.8; python_version >= '3.7'
decorator==5.1.1
deprecated==1.2.14
distlib==0.3.7
eip712==0.2.1 ; python_version >= '3.8' and python_version < '4'
eth-abi==4.2.0 ; python_full_version >= '3.7.2' and python_version < '4'
eth-account==0.8.0 ; python_version >= '3.6' and python_version < '4'
eth-ape==0.6.19 ; python_version >= '3.8' and python_version < '4'
eth-bloom==2.0.0 ; python_version >= '3.7' and python_version < '4'
eth-hash==0.5.2 ; python_version >= '3.7' and python_version < '4'
eip712==0.2.1
eth-abi==4.2.1; python_version < '4' and python_full_version >= '3.7.2'
eth-account==0.8.0; python_version >= '3.6' and python_version < '4'
eth-ape==0.6.19
eth-bloom==2.0.0; python_version >= '3.7' and python_version < '4'
eth-hash[pycryptodome]==0.5.2; python_version >= '3.7' and python_version < '4'
eth-keyfile==0.6.1
eth-keys==0.4.0
eth-rlp==0.3.0 ; python_version >= '3.7' and python_version < '4'
eth-tester==0.9.1b1 ; python_full_version >= '3.6.8' and python_version < '4'
eth-typing==3.4.0 ; python_full_version >= '3.7.2' and python_version < '4'
eth-utils==2.2.0 ; python_version >= '3.7' and python_version < '4'
ethpm-types==0.5.4 ; python_version >= '3.8' and python_version < '4'
evm-trace==0.1.0a24 ; python_version >= '3.8' and python_version < '4'
exceptiongroup==1.1.3 ; python_version >= '3.7'
executing==1.2.0
filelock==3.12.3 ; python_version >= '3.8'
flask==2.2.5 ; python_version >= '3.7'
frozenlist==1.4.0 ; python_version >= '3.8'
greenlet==3.0.0a1 ; python_version >= '3.7'
eth-rlp==0.3.0; python_version >= '3.7' and python_version < '4'
eth-tester==0.9.1b1; python_version < '4' and python_full_version >= '3.6.8'
eth-typing==3.5.1; python_version < '4' and python_full_version >= '3.7.2'
eth-utils==2.3.0; python_version >= '3.7' and python_version < '4'
ethpm-types==0.5.8
evm-trace==0.1.0a25
executing==2.0.0
filelock==3.12.4
flask==2.2.5; python_version >= '3.7'
frozenlist==1.4.0; python_version >= '3.8'
greenlet==3.0.0
hendrix==4.0.0
hexbytes==0.3.1 ; python_version >= '3.7' and python_version < '4'
humanize==4.8.0 ; python_version >= '3.8'
hexbytes==0.3.1; python_version >= '3.7' and python_version < '4'
humanize==4.8.0; python_version >= '3.8'
hyperlink==21.0.0
hypothesis==6.83.0 ; python_version >= '3.8'
identify==2.5.27 ; python_version >= '3.8'
idna==3.4 ; python_version >= '3.5'
hypothesis==6.88.1
identify==2.5.30; python_version >= '3.8'
idna==3.4; python_version >= '3.5'
ijson==3.2.3
importlib-metadata==6.8.0 ; python_version >= '3.8'
importlib-resources==5.13.0 ; python_version >= '3.8'
importlib-metadata==6.8.0
incremental==22.10.0
iniconfig==2.0.0 ; python_version >= '3.7'
ipython==8.12.2 ; python_version >= '3.8'
itsdangerous==2.1.2 ; python_version >= '3.7'
jedi==0.19.0 ; python_version >= '3.6'
jinja2==3.0.3 ; python_version >= '3.6'
jsonschema==4.19.0 ; python_version >= '3.8'
jsonschema-specifications==2023.7.1 ; python_version >= '3.8'
iniconfig==2.0.0
ipython==8.16.1
itsdangerous==2.1.2; python_version >= '3.7'
jedi==0.19.1
jinja2==3.0.3; python_version >= '3.6'
jsonschema==4.19.1; python_version >= '3.8'
jsonschema-specifications==2023.7.1; python_version >= '3.8'
lazyasd==0.1.4
lru-dict==1.2.0
mako==1.2.4 ; python_version >= '3.7'
markupsafe==2.1.3 ; python_version >= '3.7'
marshmallow==3.20.1 ; python_version >= '3.8'
matplotlib-inline==0.1.6 ; python_version >= '3.5'
mako==1.2.4; python_version >= '3.7'
markupsafe==2.1.3; python_version >= '3.7'
marshmallow==3.20.1; python_version >= '3.8'
matplotlib-inline==0.1.6
maya==0.6.1
mnemonic==0.20 ; python_version >= '3.5'
mnemonic==0.20; python_version >= '3.5'
morphys==1.0
msgpack==1.0.5
msgpack==1.0.7; python_version >= '3.8'
msgpack-python==0.5.6
msgspec==0.18.2 ; python_version >= '3.8'
multidict==5.2.0 ; python_version >= '3.6'
mypy-extensions==1.0.0 ; python_version >= '3.5'
nodeenv==1.8.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
git+https://github.com/nucypher/nucypher.git@2b1c7d6df207ecd239db4331f452332dbcd6a8a9#egg=nucypher
nucypher-core==0.12.0
numpy==1.24.4 ; python_version >= '3.8'
packaging==23.1 ; python_version >= '3.7'
pandas==1.5.3 ; python_version >= '3.8'
msgspec==0.18.4
multidict==5.2.0; python_version >= '3.6'
mypy-extensions==1.0.0; python_version >= '3.5'
nodeenv==1.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
nucypher@ git+https://github.com/nucypher/nucypher.git@f893a7388e5ab91d7df340f89e449d37030607c7
nucypher-core==0.13.0
numpy==1.26.1
packaging==23.2; python_version >= '3.7'
pandas==1.5.3
parsimonious==0.9.0
parso==0.8.3 ; python_version >= '3.6'
pendulum==3.0.0a1 ; python_version >= '3.7' and python_version < '4.0'
parso==0.8.3
pendulum==3.0.0b1; python_version >= '3.8'
pexpect==4.8.0
pickleshare==0.7.5
pkgutil-resolve-name==1.3.10 ; python_version >= '3.6'
platformdirs==3.10.0 ; python_version >= '3.7'
pluggy==1.3.0 ; python_version >= '3.8'
pre-commit==3.3.3
prometheus-client==0.17.1 ; python_version >= '3.6'
prompt-toolkit==3.0.39 ; python_full_version >= '3.7.0'
protobuf==4.24.2 ; python_version >= '3.7'
platformdirs==3.11.0
pluggy==1.3.0
pre-commit==2.12.1; python_full_version >= '3.6.1'
prometheus-client==0.17.1; python_version >= '3.6'
prompt-toolkit==3.0.39
protobuf==4.25.0rc2; python_version >= '3.8'
ptyprocess==0.7.0
pure-eval==0.2.2
py==1.11.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
py==1.11.0
py-cid==0.3.0
py-ecc==6.0.0 ; python_version >= '3.6' and python_version < '4'
py-ecc==6.0.0; python_version >= '3.6' and python_version < '4'
py-evm==0.7.0a4
py-geth==3.13.0 ; python_version >= '3.7' and python_version < '4'
py-geth==3.13.0
py-multibase==1.0.3
py-multicodec==0.2.1
py-multihash==0.2.3
py-solc-x==1.1.1 ; python_version >= '3.6' and python_version < '4'
pyasn1==0.5.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
pyasn1-modules==0.3.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
py-solc-x==1.1.1
pyasn1==0.5.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
pyasn1-modules==0.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
pychalk==2.0.1
pycparser==2.21
pycryptodome==3.18.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pydantic==1.10.12 ; python_version >= '3.7'
pycryptodome==3.19.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pydantic==1.10.13
pyethash==0.1.27
pygithub==1.59.1 ; python_version >= '3.7'
pygments==2.16.1 ; python_version >= '3.7'
pyjwt[crypto]==2.8.0 ; python_version >= '3.7'
pynacl==1.5.0 ; python_version >= '3.6'
pyopenssl==23.2.0 ; python_version >= '3.6'
pysha3==1.0.2
pytest==6.2.5
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-timeout==2.1.0 ; python_version >= '3.6'
pytest-twisted==1.14.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pygithub==1.59.1
pygments==2.16.1
pyjwt[crypto]==2.8.0
pynacl==1.5.0; python_version >= '3.6'
pyopenssl==23.2.0; python_version >= '3.6'
pytest==6.2.5; python_version >= '3.6'
pytest-cov==4.1.0; python_version >= '3.7'
pytest-mock==3.12.0; python_version >= '3.8'
pytest-timeout==2.2.0
pytest-twisted==1.14.0
python-baseconv==1.2.2
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
pytz==2023.3
pyunormalize==15.0.0 ; python_version >= '3.6'
pyyaml==6.0.1 ; python_version >= '3.6'
referencing==0.30.2 ; python_version >= '3.8'
regex==2023.8.8 ; python_version >= '3.6'
requests==2.31.0 ; python_version >= '3.7'
rich==12.6.0 ; python_full_version >= '3.6.3' and python_full_version < '4.0.0'
python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pytz==2023.3.post1
pyunormalize==15.0.0; python_version >= '3.6'
pyyaml==6.0.1; python_version >= '3.6'
referencing==0.30.2; python_version >= '3.8'
regex==2023.10.3; python_version >= '3.7'
requests==2.31.0; python_version >= '3.7'
rich==12.6.0
rlp==3.0.0
rpds-py==0.10.0 ; python_version >= '3.8'
semantic-version==2.10.0 ; python_version >= '2.7'
rpds-py==0.10.6; python_version >= '3.8'
safe-pysha3==1.0.4
semantic-version==2.10.0; python_version >= '2.7'
sentry-sdk==1.32.0
service-identity==23.1.0 ; python_version >= '3.8'
setuptools==68.1.2 ; python_version >= '3.8'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
service-identity==23.1.0; python_version >= '3.8'
setuptools==68.2.2; python_version >= '3.8'
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
snaptime==0.2.4
sortedcontainers==2.4.0
sqlalchemy==2.0.20 ; python_version >= '3.7'
stack-data==0.6.2
tabulate==0.9.0 ; python_version >= '3.7'
time-machine==2.12.0 ; python_version >= '3.8'
toml==0.10.2 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
tomli==2.0.1 ; python_version >= '3.7'
toolz==0.12.0 ; python_version >= '3.5'
tqdm==4.66.1 ; python_version >= '3.7'
traitlets==5.9.0 ; python_version >= '3.7'
trie==2.1.1 ; python_version >= '3.7' and python_version < '4'
twisted==23.8.0 ; python_full_version >= '3.7.1'
txaio==23.1.1 ; python_version >= '3.7'
typing-extensions==4.7.1 ; python_version >= '3.7'
tzdata==2023.3 ; python_version >= '2'
tzlocal==5.0.1 ; python_version >= '3.7'
urllib3==2.0.4 ; python_version >= '3.7'
sqlalchemy==2.0.22
stack-data==0.6.3
tabulate==0.9.0; python_version >= '3.7'
time-machine==2.13.0; implementation_name != 'pypy'
toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
toolz==0.12.0; python_version >= '3.5'
tqdm==4.66.1
traitlets==5.11.2
trie==2.1.1; python_version >= '3.7' and python_version < '4'
twisted==23.8.0; python_full_version >= '3.7.1'
txaio==23.1.1; python_version >= '3.7'
typing-extensions==4.8.0; python_version >= '3.8'
tzdata==2023.3; python_version >= '2'
tzlocal==5.2; python_version >= '3.8'
urllib3==2.0.7; python_version >= '3.7'
varint==1.0.2
virtualenv==20.24.4 ; python_version >= '3.7'
watchdog==3.0.0 ; python_version >= '3.7'
wcwidth==0.2.6
web3==6.9.0 ; python_full_version >= '3.7.2'
websockets==11.0.3 ; python_version >= '3.7'
werkzeug==2.3.7 ; python_version >= '3.8'
wrapt==1.15.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
yarl==1.9.2 ; python_version >= '3.7'
zipp==3.16.2 ; python_version >= '3.8'
zope-interface==6.1a2 ; python_version >= '3.7'
virtualenv==20.24.6; python_version >= '3.7'
watchdog==3.0.0; python_version >= '3.7'
wcwidth==0.2.8
web3==6.11.1; python_full_version >= '3.7.2'
websockets==12.0; python_version >= '3.8'
werkzeug==3.0.0; python_version >= '3.8'
wrapt==1.16.0rc1
yarl==1.9.2; python_version >= '3.7'
zipp==3.17.0
zope-interface==6.1; python_version >= '3.7'
6 changes: 4 additions & 2 deletions porter/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ def run(
allow_origins_list = allow_origins.split(",") # split into list of origins to allow
emitter.message(PORTER_CORS_ALLOWED_ORIGINS.format(allow_origins=allow_origins_list), color='green')

controller = PORTER.make_web_controller(crash_on_error=False,
cors_allow_origins_list=allow_origins_list)
controller = PORTER.make_web_controller(
crash_on_error=False,
cors_allow_origins_list=allow_origins_list
)
message = PORTER_RUN_MESSAGE.format(http_port=http_port)
emitter.message(message, color='green', bold=True)
return controller.start(port=http_port,
Expand Down
Loading
Loading