From cf2bd88478dab971d45af41b423d90b51c97c118 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 13:52:08 -0600 Subject: [PATCH 01/15] update docs --- docs/guide/login.rst | 29 +--------------- docs/guide/restapi.rst | 52 ++++++++++++++++++++++++++--- docs/server/rest_api/auth.rst | 2 +- docs/server/rest_api/config.rst | 2 +- docs/server/rest_api/datasets.rst | 2 +- docs/server/rest_api/grids.rst | 2 +- docs/server/rest_api/jobs.rst | 2 +- docs/server/rest_api/logs.rst | 2 +- docs/server/rest_api/pilots.rst | 2 +- docs/server/rest_api/task_stats.rst | 2 +- docs/server/rest_api/tasks.rst | 2 +- 11 files changed, 57 insertions(+), 42 deletions(-) diff --git a/docs/guide/login.rst b/docs/guide/login.rst index c14480558..b9cfa692d 100644 --- a/docs/guide/login.rst +++ b/docs/guide/login.rst @@ -3,31 +3,4 @@ Login Users can log in to IceProd like any other web application. -Authentication is handled by an external plugin -such as `LDAP`_. - -.. _LDAP: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol - -.. note:: - :class: icecube - - LDAP authentication is set up for IceCube users. - - -Two Factor Authentication -------------------------- - -Certain pages and actions require additional authentication. When a new -account is registered with IceProd, two-factor authentication must be -set up. - -IceProd uses time-based one-time passwords (`RFC 6238`_), as used by -Google, GitHub, and others. Using a phone app such as Google Authenticator, -a barcode image specific to each user can be scanned and registered. The -app will then generate short codes valid for 30 seconds each. - -Example barcode image: - -.. image:: ../static/2fa_barcode.png - -.. _RFC 6238: https://tools.ietf.org/html/rfc6238 \ No newline at end of file +Authentication is handled by IceCube SSO. diff --git a/docs/guide/restapi.rst b/docs/guide/restapi.rst index a9e9d572f..63aaad23b 100644 --- a/docs/guide/restapi.rst +++ b/docs/guide/restapi.rst @@ -14,16 +14,58 @@ Authentication To view datasets, call actions on datasets, or submit new datasets, authentication with a token is required. -An authentication token can be obtained within the account settings -in the website. This can be added to requests as the `Authorization` header. +An authentication token can be obtained using the python package +`wipac-rest-tools`. For example:: + + python3 -m venv venv + . venv/bin/activate + pip install wipac-rest-tools + curl -o get_token.py https://raw.githubusercontent.com/WIPACrepo/rest-tools/master/examples/get_device_credentials_token.py + python get_device_credentials_token.py iceprod-public + +The access token will be valid for 1 hour. + +This can be added to requests as the `Authorization` header. As an example, here is a query to get the list of all datasets:: curl -XGET -H 'Authorization: bearer XXXXXXXX-your-token-here-XXXXX' https://iceprod2-api.icecube.wisc.edu/datasets .. danger:: - Anyone with the authentication token is basically you. It is valid - for any action that does not require :ref:`Two Factor Authentication`. - Be careful with the token! + Anyone with the authentication token is basically you. Be careful with the token! + + +Scripting +^^^^^^^^^ + +When writing a python script, you can use our rest client to automatically +manage tokens for you. Just install `wipac-rest-tools` as shown above. +There are also sync and async code options: + +Sync:: + + from rest_tools.client import SavedDeviceGrantAuth + api = SavedDeviceGrantAuth( + address='https://api.iceprod.wisc.edu', + token_url='https://keycloak.icecube.wisc.edu/auth/realms/IceCube', + filename='.iceprod-auth', + client_id'iceprod-public' + ) + # get a list of datasets + result = api.request_seq('GET', '/datasets', {}) + for dataset, metadata in result.items(): + # do something with the dataset +Async:: + from rest_tools.client import SavedDeviceGrantAuth + api = SavedDeviceGrantAuth( + address='https://api.iceprod.wisc.edu', + token_url='https://keycloak.icecube.wisc.edu/auth/realms/IceCube', + filename='.iceprod-auth', + client_id'iceprod-public' + ) + # get a list of datasets + result = await api.request('GET', '/datasets', {}) + for dataset, metadata in result.items(): + # do something with the dataset diff --git a/docs/server/rest_api/auth.rst b/docs/server/rest_api/auth.rst index a7aa259b5..0b533d00b 100644 --- a/docs/server/rest_api/auth.rst +++ b/docs/server/rest_api/auth.rst @@ -1,4 +1,4 @@ REST API - Auth =============== -.. automodule:: iceprod.server.rest.auth +.. automodule:: iceprod.rest.handlers.auth diff --git a/docs/server/rest_api/config.rst b/docs/server/rest_api/config.rst index 076ddd9a4..b63248182 100644 --- a/docs/server/rest_api/config.rst +++ b/docs/server/rest_api/config.rst @@ -1,4 +1,4 @@ REST API - Config ================= -.. automodule:: iceprod.server.rest.config +.. automodule:: iceprod.rest.handlers.config diff --git a/docs/server/rest_api/datasets.rst b/docs/server/rest_api/datasets.rst index c21989898..a5ce62832 100644 --- a/docs/server/rest_api/datasets.rst +++ b/docs/server/rest_api/datasets.rst @@ -1,4 +1,4 @@ REST API - Datasets =================== -.. automodule:: iceprod.server.rest.datasets +.. automodule:: iceprod.rest.handlers.datasets diff --git a/docs/server/rest_api/grids.rst b/docs/server/rest_api/grids.rst index 1b1b795e7..f4313cae4 100644 --- a/docs/server/rest_api/grids.rst +++ b/docs/server/rest_api/grids.rst @@ -1,4 +1,4 @@ REST API - Grids ================ -.. automodule:: iceprod.server.rest.grids +.. automodule:: iceprod.rest.handlers.grids diff --git a/docs/server/rest_api/jobs.rst b/docs/server/rest_api/jobs.rst index 7281dcd07..6decca5fd 100644 --- a/docs/server/rest_api/jobs.rst +++ b/docs/server/rest_api/jobs.rst @@ -1,4 +1,4 @@ REST API - Jobs =============== -.. automodule:: iceprod.server.rest.jobs +.. automodule:: iceprod.rest.handlers.jobs diff --git a/docs/server/rest_api/logs.rst b/docs/server/rest_api/logs.rst index 8198193f6..9aa2d3769 100644 --- a/docs/server/rest_api/logs.rst +++ b/docs/server/rest_api/logs.rst @@ -1,4 +1,4 @@ REST API - Logs =============== -.. automodule:: iceprod.server.rest.logs +.. automodule:: iceprod.rest.handlers.logs diff --git a/docs/server/rest_api/pilots.rst b/docs/server/rest_api/pilots.rst index b0737c0ec..ecb6f6e65 100644 --- a/docs/server/rest_api/pilots.rst +++ b/docs/server/rest_api/pilots.rst @@ -1,4 +1,4 @@ REST API - Pilots ================= -.. automodule:: iceprod.server.rest.pilots +.. automodule:: iceprod.rest.handlers.pilots diff --git a/docs/server/rest_api/task_stats.rst b/docs/server/rest_api/task_stats.rst index 3fbf95a62..51e64d7c7 100644 --- a/docs/server/rest_api/task_stats.rst +++ b/docs/server/rest_api/task_stats.rst @@ -1,4 +1,4 @@ REST API - Task Stats ===================== -.. automodule:: iceprod.server.rest.task_stats +.. automodule:: iceprod.rest.handlers.task_stats diff --git a/docs/server/rest_api/tasks.rst b/docs/server/rest_api/tasks.rst index 5f3b7e9a7..b4bcbd1d7 100644 --- a/docs/server/rest_api/tasks.rst +++ b/docs/server/rest_api/tasks.rst @@ -1,4 +1,4 @@ REST API - Tasks ================ -.. automodule:: iceprod.server.rest.tasks +.. automodule:: iceprod.rest.handlers.tasks From 17fabb95f5bdb3d1521fba13c75be1a65157dfe4 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 19:52:46 +0000 Subject: [PATCH 02/15] update requirements-docs.txt --- requirements-docs.txt | 69 ++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index 24fd1a1b2..b0d458e14 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -4,17 +4,17 @@ # # pip-compile --extra=docs --output-file=requirements-docs.txt # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx -anyio==4.0.0 +anyio==4.2.0 # via httpx asyncache==0.3.1 # via iceprod (setup.py) -babel==2.13.1 +babel==2.14.0 # via sphinx -boto3==1.28.81 +boto3==1.34.30 # via iceprod (setup.py) -botocore==1.31.81 +botocore==1.34.30 # via # boto3 # s3transfer @@ -23,7 +23,7 @@ cachetools==5.3.2 # asyncache # iceprod (setup.py) # wipac-rest-tools -certifi==2023.7.22 +certifi==2023.11.17 # via # httpcore # httpx @@ -33,31 +33,31 @@ cffi==1.16.0 # via cryptography charset-normalizer==3.3.2 # via requests -cryptography==41.0.5 +cryptography==42.0.2 # via # iceprod (setup.py) # pyjwt # pyopenssl -dnspython==2.4.2 +dnspython==2.5.0 # via pymongo docutils==0.20.1 # via sphinx -exceptiongroup==1.1.3 +exceptiongroup==1.2.0 # via anyio h11==0.14.0 # via httpcore -httpcore==1.0.1 +httpcore==1.0.2 # via httpx -httpx==0.25.1 +httpx==0.26.0 # via iceprod (setup.py) -idna==3.4 +idna==3.6 # via # anyio # httpx # requests imagesize==1.4.1 # via sphinx -jinja2==3.1.2 +jinja2==3.1.3 # via sphinx jmespath==1.0.1 # via @@ -65,29 +65,29 @@ jmespath==1.0.1 # botocore ldap3==2.9.1 # via iceprod (setup.py) -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 -motor==3.3.1 +motor==3.3.2 # via iceprod (setup.py) packaging==23.2 # via sphinx -psutil==5.9.6 +psutil==5.9.8 # via iceprod (setup.py) -pyasn1==0.5.0 +pyasn1==0.5.1 # via ldap3 pycparser==2.21 # via cffi -pygments==2.16.1 +pygments==2.17.2 # via sphinx pyjwt[crypto]==2.8.0 # via # pyjwt # wipac-rest-tools -pymongo==4.6.0 +pymongo==4.6.1 # via # iceprod (setup.py) # motor -pyopenssl==23.3.0 +pyopenssl==24.0.0 # via iceprod (setup.py) pypng==0.20220715.0 # via qrcode @@ -113,7 +113,7 @@ requests-futures==1.0.1 # wipac-rest-tools requests-toolbelt==1.0.0 # via iceprod (setup.py) -s3transfer==0.7.0 +s3transfer==0.10.0 # via boto3 setproctitle==1.3.3 # via iceprod (setup.py) @@ -126,43 +126,38 @@ sniffio==1.3.0 snowballstemmer==2.2.0 # via sphinx sphinx==7.2.6 - # via - # iceprod (setup.py) - # sphinxcontrib-applehelp - # sphinxcontrib-devhelp - # sphinxcontrib-htmlhelp - # sphinxcontrib-qthelp - # sphinxcontrib-serializinghtml -sphinxcontrib-applehelp==1.0.7 + # via iceprod (setup.py) +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx statsd==4.0.1 # via iceprod (setup.py) -tornado==6.3.3 +tornado==6.4 # via # iceprod (setup.py) # wipac-rest-tools -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via + # anyio # qrcode # wipac-dev-tools -unidecode==1.3.7 +unidecode==1.3.8 # via iceprod (setup.py) urllib3==2.0.7 # via # botocore # requests # wipac-rest-tools -wipac-dev-tools==1.7.1 +wipac-dev-tools==1.8.2 # via # iceprod (setup.py) # wipac-rest-tools From 8be9ad0f6013ed6e4a8cf5154329867298973236 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 19:52:46 +0000 Subject: [PATCH 03/15] update requirements-tests.txt --- requirements-tests.txt | 63 +++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/requirements-tests.txt b/requirements-tests.txt index 26f7f80c7..acb8a5a7d 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -4,17 +4,17 @@ # # pip-compile --extra=tests --output-file=requirements-tests.txt # -anyio==4.0.0 +anyio==4.2.0 # via httpx asyncache==0.3.1 # via iceprod (setup.py) -beautifulsoup4==4.12.2 +beautifulsoup4==4.12.3 # via iceprod (setup.py) -boto3==1.28.81 +boto3==1.34.30 # via # iceprod (setup.py) # moto -botocore==1.31.81 +botocore==1.34.30 # via # boto3 # moto @@ -24,7 +24,7 @@ cachetools==5.3.2 # asyncache # iceprod (setup.py) # wipac-rest-tools -certifi==2023.7.22 +certifi==2023.11.17 # via # httpcore # httpx @@ -34,42 +34,42 @@ cffi==1.16.0 # via cryptography charset-normalizer==3.3.2 # via requests -coverage[toml]==7.3.2 +coverage[toml]==7.4.1 # via # iceprod (setup.py) # pytest-cov -cryptography==41.0.5 +cryptography==42.0.2 # via # iceprod (setup.py) # moto # pyjwt # pyopenssl -dnspython==2.4.2 +dnspython==2.5.0 # via pymongo -exceptiongroup==1.1.3 +exceptiongroup==1.2.0 # via # anyio # pytest -flake8==6.1.0 +flake8==7.0.0 # via iceprod (setup.py) flexmock==0.11.3 # via iceprod (setup.py) h11==0.14.0 # via httpcore -httpcore==1.0.1 +httpcore==1.0.2 # via httpx -httpx==0.25.1 +httpx==0.26.0 # via # iceprod (setup.py) # respx -idna==3.4 +idna==3.6 # via # anyio # httpx # requests iniconfig==2.0.0 # via pytest -jinja2==3.1.2 +jinja2==3.1.3 # via moto jmespath==1.0.1 # via @@ -77,7 +77,7 @@ jmespath==1.0.1 # botocore ldap3==2.9.1 # via iceprod (setup.py) -markupsafe==2.1.3 +markupsafe==2.1.4 # via # jinja2 # werkzeug @@ -85,43 +85,43 @@ mccabe==0.7.0 # via flake8 mock==5.1.0 # via iceprod (setup.py) -moto==4.2.7 +moto==5.0.0 # via iceprod (setup.py) -motor==3.3.1 +motor==3.3.2 # via iceprod (setup.py) packaging==23.2 # via pytest -pluggy==1.3.0 +pluggy==1.4.0 # via pytest -psutil==5.9.6 +psutil==5.9.8 # via iceprod (setup.py) -pyasn1==0.5.0 +pyasn1==0.5.1 # via ldap3 pycodestyle==2.11.1 # via flake8 pycparser==2.21 # via cffi -pyflakes==3.1.0 +pyflakes==3.2.0 # via flake8 pyjwt[crypto]==2.8.0 # via # pyjwt # wipac-rest-tools -pymongo==4.6.0 +pymongo==4.6.1 # via # iceprod (setup.py) # motor -pyopenssl==23.3.0 +pyopenssl==24.0.0 # via iceprod (setup.py) pypng==0.20220715.0 # via qrcode -pytest==7.4.3 +pytest==7.4.4 # via # iceprod (setup.py) # pytest-asyncio # pytest-cov # pytest-mock -pytest-asyncio==0.21.1 +pytest-asyncio==0.23.4 # via iceprod (setup.py) pytest-cov==4.1.0 # via iceprod (setup.py) @@ -156,11 +156,11 @@ requests-mock==1.11.0 # via iceprod (setup.py) requests-toolbelt==1.0.0 # via iceprod (setup.py) -responses==0.24.0 +responses==0.24.1 # via moto respx==0.20.2 # via iceprod (setup.py) -s3transfer==0.7.0 +s3transfer==0.10.0 # via boto3 setproctitle==1.3.3 # via iceprod (setup.py) @@ -180,15 +180,16 @@ tomli==2.0.1 # via # coverage # pytest -tornado==6.3.3 +tornado==6.4 # via # iceprod (setup.py) # wipac-rest-tools -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via + # anyio # qrcode # wipac-dev-tools -unidecode==1.3.7 +unidecode==1.3.8 # via iceprod (setup.py) urllib3==2.0.7 # via @@ -198,7 +199,7 @@ urllib3==2.0.7 # wipac-rest-tools werkzeug==3.0.1 # via moto -wipac-dev-tools==1.7.1 +wipac-dev-tools==1.8.2 # via # iceprod (setup.py) # wipac-rest-tools From 5338f3f1cc028265576c923e7f4f75a474284831 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 19:52:46 +0000 Subject: [PATCH 04/15] update requirements.txt --- requirements.txt | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3ae21b0cc..4656980a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,13 +4,13 @@ # # pip-compile --output-file=requirements.txt # -anyio==4.0.0 +anyio==4.2.0 # via httpx asyncache==0.3.1 # via iceprod (setup.py) -boto3==1.28.81 +boto3==1.34.30 # via iceprod (setup.py) -botocore==1.31.81 +botocore==1.34.30 # via # boto3 # s3transfer @@ -19,7 +19,7 @@ cachetools==5.3.2 # asyncache # iceprod (setup.py) # wipac-rest-tools -certifi==2023.7.22 +certifi==2023.11.17 # via # httpcore # httpx @@ -29,22 +29,22 @@ cffi==1.16.0 # via cryptography charset-normalizer==3.3.2 # via requests -cryptography==41.0.5 +cryptography==42.0.2 # via # iceprod (setup.py) # pyjwt # pyopenssl -dnspython==2.4.2 +dnspython==2.5.0 # via pymongo -exceptiongroup==1.1.3 +exceptiongroup==1.2.0 # via anyio h11==0.14.0 # via httpcore -httpcore==1.0.1 +httpcore==1.0.2 # via httpx -httpx==0.25.1 +httpx==0.26.0 # via iceprod (setup.py) -idna==3.4 +idna==3.6 # via # anyio # httpx @@ -55,11 +55,11 @@ jmespath==1.0.1 # botocore ldap3==2.9.1 # via iceprod (setup.py) -motor==3.3.1 +motor==3.3.2 # via iceprod (setup.py) -psutil==5.9.6 +psutil==5.9.8 # via iceprod (setup.py) -pyasn1==0.5.0 +pyasn1==0.5.1 # via ldap3 pycparser==2.21 # via cffi @@ -67,11 +67,11 @@ pyjwt[crypto]==2.8.0 # via # pyjwt # wipac-rest-tools -pymongo==4.6.0 +pymongo==4.6.1 # via # iceprod (setup.py) # motor -pyopenssl==23.3.0 +pyopenssl==24.0.0 # via iceprod (setup.py) pypng==0.20220715.0 # via qrcode @@ -96,7 +96,7 @@ requests-futures==1.0.1 # wipac-rest-tools requests-toolbelt==1.0.0 # via iceprod (setup.py) -s3transfer==0.7.0 +s3transfer==0.10.0 # via boto3 setproctitle==1.3.3 # via iceprod (setup.py) @@ -108,22 +108,23 @@ sniffio==1.3.0 # httpx statsd==4.0.1 # via iceprod (setup.py) -tornado==6.3.3 +tornado==6.4 # via # iceprod (setup.py) # wipac-rest-tools -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via + # anyio # qrcode # wipac-dev-tools -unidecode==1.3.7 +unidecode==1.3.8 # via iceprod (setup.py) urllib3==2.0.7 # via # botocore # requests # wipac-rest-tools -wipac-dev-tools==1.7.1 +wipac-dev-tools==1.8.2 # via # iceprod (setup.py) # wipac-rest-tools From a244b01c0a05a2e51948a0ae1705381d43060892 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 13:57:23 -0600 Subject: [PATCH 05/15] new moto needs [s3] --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index bcb5a2103..6d6fe7b97 100644 --- a/setup.cfg +++ b/setup.cfg @@ -76,7 +76,7 @@ tests = flake8 flexmock mock - moto + moto[s3] pytest pytest-asyncio pytest-cov From dcc5efe3f1e3125437fbec4bc17f100c9aa9a92c Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 19:58:01 +0000 Subject: [PATCH 06/15] update requirements-tests.txt --- requirements-tests.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/requirements-tests.txt b/requirements-tests.txt index acb8a5a7d..3f1452eb1 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -85,7 +85,7 @@ mccabe==0.7.0 # via flake8 mock==5.1.0 # via iceprod (setup.py) -moto==5.0.0 +moto[s3]==5.0.0 # via iceprod (setup.py) motor==3.3.2 # via iceprod (setup.py) @@ -95,6 +95,8 @@ pluggy==1.4.0 # via pytest psutil==5.9.8 # via iceprod (setup.py) +py-partiql-parser==0.5.0 + # via moto pyasn1==0.5.1 # via ldap3 pycodestyle==2.11.1 @@ -135,6 +137,7 @@ python-dateutil==2.8.2 pyyaml==6.0.1 # via # iceprod (setup.py) + # moto # responses qrcode==7.4.2 # via wipac-rest-tools From 25aaff6d26e4ce904e3755e77e241da917a551a8 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 14:08:05 -0600 Subject: [PATCH 07/15] convert to moto 5 syntax --- tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index fe1512fd5..ce7fa5d27 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import socket import boto3 -from moto import mock_s3 +from moto import mock_aws import motor.motor_asyncio import pytest import pytest_asyncio @@ -62,7 +62,7 @@ def s3conn(monkeypatch): monkeypatch.setenv('S3_ACCESS_KEY', 'XXXX') monkeypatch.setenv('S3_SECRET_KEY', 'XXXX') - with mock_s3(): + with mock_aws(): conn = boto3.client('s3', region_name='us-east-1') conn.create_bucket(Bucket='iceprod2-logs') yield conn \ No newline at end of file From 62257b9234d2395c139f1c175fcf3280ef85af5a Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 14:08:36 -0600 Subject: [PATCH 08/15] make sure we use moto >= 5 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6d6fe7b97..e155c582e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -76,7 +76,7 @@ tests = flake8 flexmock mock - moto[s3] + moto[s3]>=5 pytest pytest-asyncio pytest-cov From 0530718a311e11a040d8397ed709eda26a8de253 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 14:12:45 -0600 Subject: [PATCH 09/15] bump to py 3.10 for docs build --- .github/workflows/docs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5a74ff991..abefbeaf8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,10 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.10 - name: Install deps run: | python -m pip install --upgrade pip From 6c2bbe579a6dded8cb3e541ad34208f920dea00a Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 20:13:28 +0000 Subject: [PATCH 10/15] update requirements-tests.txt --- requirements-tests.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements-tests.txt b/requirements-tests.txt index 3f1452eb1..6e2b328c9 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -86,7 +86,9 @@ mccabe==0.7.0 mock==5.1.0 # via iceprod (setup.py) moto[s3]==5.0.0 - # via iceprod (setup.py) + # via + # iceprod (setup.py) + # moto motor==3.3.2 # via iceprod (setup.py) packaging==23.2 From 0593296fdb2db647ba469e6e1388701a2fbf6b35 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 14:27:29 -0600 Subject: [PATCH 11/15] python version needs to be a string --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index abefbeaf8..0c2678b36 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: "3.10" - name: Install deps run: | python -m pip install --upgrade pip From e0ddfff6018687b8010a8a40a537ca4c9c27a095 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 20:28:10 +0000 Subject: [PATCH 12/15] update requirements-docs.txt --- requirements-docs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index b0d458e14..e9a32b57e 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -12,9 +12,9 @@ asyncache==0.3.1 # via iceprod (setup.py) babel==2.14.0 # via sphinx -boto3==1.34.30 +boto3==1.34.31 # via iceprod (setup.py) -botocore==1.34.30 +botocore==1.34.31 # via # boto3 # s3transfer From 2972e16b5f5ecd5b34670073617f6c200d878f55 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 20:28:10 +0000 Subject: [PATCH 13/15] update requirements-tests.txt --- requirements-tests.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-tests.txt b/requirements-tests.txt index 6e2b328c9..635d3893f 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -10,11 +10,11 @@ asyncache==0.3.1 # via iceprod (setup.py) beautifulsoup4==4.12.3 # via iceprod (setup.py) -boto3==1.34.30 +boto3==1.34.31 # via # iceprod (setup.py) # moto -botocore==1.34.30 +botocore==1.34.31 # via # boto3 # moto From 702e3e6fd81fd900b6eabca78bcbe4b75b9eeeca Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 30 Jan 2024 20:28:10 +0000 Subject: [PATCH 14/15] update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4656980a0..e5bc1594d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,9 +8,9 @@ anyio==4.2.0 # via httpx asyncache==0.3.1 # via iceprod (setup.py) -boto3==1.34.30 +boto3==1.34.31 # via iceprod (setup.py) -botocore==1.34.30 +botocore==1.34.31 # via # boto3 # s3transfer From f7919ebb08e061bccb92346ce8c6359fffffded0 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 30 Jan 2024 14:32:40 -0600 Subject: [PATCH 15/15] fix import --- tests/rest/logs_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rest/logs_test.py b/tests/rest/logs_test.py index 06565341a..faad1f2c2 100644 --- a/tests/rest/logs_test.py +++ b/tests/rest/logs_test.py @@ -4,7 +4,7 @@ import string import boto3 -from moto import mock_s3 +from moto import mock_aws import pytest import requests.exceptions from rest_tools.utils.json_util import json_decode