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

Upgrade dependencies #89

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
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
34 changes: 17 additions & 17 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: psf/black@stable
pylint:
runs-on: ubuntu-latest
name: "pylint"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: "Set up Python 3"
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: "Install dependencies"
run: |
pip install --upgrade pip
Expand All @@ -34,11 +34,11 @@ jobs:
runs-on: ubuntu-latest
name: "flake8"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: "Set up Python 3"
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: "Install dependencies"
run: "pip install flake8"
- name: "Run flake8!"
Expand All @@ -52,11 +52,11 @@ jobs:
with:
username: ${{ secrets.TEST_DOCKER_USERNAME }}
password: ${{ secrets.TEST_DOCKER_PASSWORD }}
- uses: actions/checkout@v2
- name: "Set up Python 3.8"
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: "Set up Python 3.11"
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"
- name: "Install dependencies"
run: |
pip install --upgrade pip
Expand All @@ -79,16 +79,16 @@ jobs:
needs: [black, pylint, flake8, pytest-manager]
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, 3.11]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TEST_DOCKER_USERNAME }}
password: ${{ secrets.TEST_DOCKER_PASSWORD }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
Expand All @@ -114,11 +114,11 @@ jobs:
runs-on: ubuntu-latest
needs: [pytest-sdk]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: "Set up Python 3"
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: "Install dependencies"
run: |
pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_image_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
name: Build and push docs to GH pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Set up Python 3"
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: "Install dependencies"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Push examples to another repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Copy start_manager script to examples directory
run: |
cp start_manager examples/start_manager
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Copy BASH script via ssh
uses: appleboy/scp-action@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
1 change: 0 additions & 1 deletion daeploy/_service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def timed_task_decorator(func: Callable) -> Callable:
is_coroutine = asyncio.iscoroutinefunction(func)

async def timer():

# Sleep before first call if required
if wait_first:
await asyncio.sleep(seconds)
Expand Down
1 change: 0 additions & 1 deletion examples/status_code_example/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

@service.entrypoint(status_code=201)
def create_new_dict(dict_name: str, content: dict):

if STORAGE_DICTS.get(dict_name, False):
raise HTTPException(status_code=409, detail=f"{dict_name} already exists")

Expand Down
1 change: 0 additions & 1 deletion manager/routers/dashboard_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def build_tabs():
)
# pylint: disable=unused-argument
def update_content(tab_switch, interval, n_clicks):

# Clearing notifications
changed_id = [p["prop_id"] for p in dash.callback_context.triggered][0]
if "clear-notifications-button" in changed_id:
Expand Down
1 change: 0 additions & 1 deletion manager/routers/service_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def kill_service(service: BaseService, remove_image: bool = True):
@ROUTER.put("/~assign")
@check_service_exists_json_body
def assign_main_service(service: BaseService):

try:
service_db.assign_main_version(service.name, service.version)
except DatabaseNoMatchException as exc:
Expand Down
16 changes: 8 additions & 8 deletions requirements_manager.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
fastapi==0.78.0
uvicorn==0.16.0
fastapi==0.109.0
uvicorn==0.26.0
docker==5.0.3
aiodocker==0.21.0
semver==2.13.0
python-multipart==0.0.5
toml==0.10.2
sqlalchemy==1.3.22
sqlalchemy==2.0.25
dash==2.4.1
pyjwt==2.4.0
bcrypt==3.2.0
jinja2==3.0.3
cookiecutter==1.7.3
cryptography==3.3.2
pyjwt==2.8.0
bcrypt==4.1.2
jinja2==3.1.3
cookiecutter==2.5.0
cryptography==41.0.7
3 changes: 2 additions & 1 deletion requirements_sdk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ sqlalchemy
aiofiles
pytest
pandas
docker
docker
ipython
1 change: 0 additions & 1 deletion tests/e2e_test/e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def test_version_command_cli(dummy_manager, cli_auth_login):


def test_manager_restart_ok(dummy_manager, headers):

assert requests.get("http://localhost", headers=headers).status_code == 200

dummy_manager.restart()
Expand Down
4 changes: 0 additions & 4 deletions tests/manager_test/auth_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ def test_login_page(exclude_middleware):


def test_verification_without_auth(database):

response = client.get("/auth/verify", allow_redirects=False)
assert response.status_code == 200


def test_failed_login(database, auth_enabled):

# Login
response = client.post(
"/auth/login",
Expand All @@ -53,7 +51,6 @@ def test_failed_login(database, auth_enabled):


def test_cookie_token(database, auth_enabled):

# No access from beginning
response = client.get("/auth/verify", allow_redirects=False)
assert response.status_code == 303
Expand All @@ -80,7 +77,6 @@ def test_cookie_token(database, auth_enabled):


def test_API_token(clear_cookies, database, auth_enabled):

# No access from beginning
response = client.get(
"/auth/verify",
Expand Down
1 change: 0 additions & 1 deletion tests/manager_test/endpoint_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ async def test_service_logs_no_streaming(
f"/services/~logs?name={service_name}&version={service_version}&follow=False",
stream=False,
) as response:

assert response.status_code == 200
assert response.text == "Log1 Log2 Log3 "
mocked_docker_connection.service_logs.assert_called_with(
Expand Down
5 changes: 0 additions & 5 deletions tests/manager_test/local_docker_connection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def local_docker_connection():


def test_starting_new_service(local_docker_connection):

url = local_docker_connection.create_service(
image="traefik/whoami:latest",
name="test",
Expand All @@ -56,7 +55,6 @@ def test_starting_new_service(local_docker_connection):


def test_start_image_service_with_run_args(local_docker_connection):

local_docker_connection.create_service(
image="traefik/whoami:latest",
name="test",
Expand Down Expand Up @@ -85,7 +83,6 @@ def test_start_image_service_with_run_args(local_docker_connection):


def test_starting_two_service_different_version(local_docker_connection):

first_url = local_docker_connection.create_service(
image="traefik/whoami:latest",
name="test",
Expand Down Expand Up @@ -162,7 +159,6 @@ def test_with_failing_services_port_allocation(local_docker_connection):


def test_with_failing_services_restart(local_docker_connection):

client = docker.from_env()

local_docker_connection.create_service(
Expand Down Expand Up @@ -196,7 +192,6 @@ def test_with_failing_services_restart(local_docker_connection):

@pytest.mark.asyncio
async def test_service_logs(local_docker_connection):

local_docker_connection.create_service(
image="traefik/whoami:latest",
name="test",
Expand Down
8 changes: 0 additions & 8 deletions tests/sdk_test/daeploy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def test_get_paramter_by_api():
service.add_parameter("myparameter", 10)

with TestClient(service.app) as client:

response = client.get(
"/~parameters/myparameter", headers={"accept": "application/json"}
)
Expand Down Expand Up @@ -256,7 +255,6 @@ def test_update_parameter():
service.add_parameter("myparameter", 10)

with TestClient(service.app) as client:

req = {"value": 1000}

response = client.post(
Expand All @@ -271,7 +269,6 @@ def test_internal_parameter():
service.add_parameter("myparameter", 10, expose=False)

with TestClient(service.app) as client:

req = {"value": 1000}

response = client.post(
Expand All @@ -287,7 +284,6 @@ def test_set_parameter():
service.set_parameter("myparameter", 20)

with TestClient(service.app) as client:

response = client.get(
"/~parameters/myparameter", headers={"accept": "application/json"}
)
Expand Down Expand Up @@ -677,7 +673,6 @@ def long_running_func():


def test_database_table_creation(database):

timestamp = datetime.datetime.utcnow()
db.write_to_ts("float", 1.0, timestamp)
db.write_to_ts("text", "1", timestamp)
Expand All @@ -694,7 +689,6 @@ def test_database_table_creation(database):


def test_jsonable_type_db(database):

timestamp = datetime.datetime.utcnow()
db.write_to_ts("dict", {"a": 4}, timestamp)
await_database_queue()
Expand All @@ -703,7 +697,6 @@ def test_jsonable_type_db(database):


def test_continuous_storing_of_and_reading_of_variables(database):

for i in range(200):
timestamp = datetime.datetime.utcnow()
db.write_to_ts("float", float(i), timestamp)
Expand Down Expand Up @@ -735,7 +728,6 @@ def test_edge_case_type_storing(database):


def test_read_timerange(database):

before = datetime.datetime.utcnow()
mid = None

Expand Down
Loading