Skip to content

Commit

Permalink
Merge branch 'dev' into irina/readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham3121 authored Aug 1, 2024
2 parents 8c558af + c523547 commit 0d9e554
Show file tree
Hide file tree
Showing 50 changed files with 1,350 additions and 241 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.9.0-beta.3
current_version = 0.9.0-beta.5
tag = False
tag_name = {new_version}
commit = True
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ jobs:

- name: Copy helm repo files from Syft Repo
run: |
cp packages/grid/helm/repo/index.yaml ghpages/helm/
cp packages/grid/helm/repo/syft-${{ needs.merge-docker-images.outputs.server_version }}.tgz ghpages/helm/
cd ghpages/helm && helm repo index . --url https://openmined.github.io/PySyft/helm
- name: Commit changes to gh-pages
uses: EndBug/add-and-commit@v9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ jobs:

- name: Copy helm repo files from Syft Repo
run: |
cp packages/grid/helm/repo/index.yaml ghpages/helm/
cp packages/grid/helm/repo/syft-${{ steps.release_checks.outputs.syft_version }}.tgz ghpages/helm/
cd ghpages/helm && helm repo index . --url https://openmined.github.io/PySyft/helm
- name: Commit changes to gh-pages
uses: EndBug/add-and-commit@v9
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pr-tests-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ jobs:
- name: Run syft backend base image building test
if: steps.changes.outputs.stack == 'true'
timeout-minutes: 60
run: |
echo "Skipping pr image test"
# run: |
# tox -e backend.test.basecpu
# echo "Skipping pr image test"
run: |
tox -e backend.test.basecpu
pr-tests-syft-integration:
strategy:
Expand Down Expand Up @@ -419,7 +419,6 @@ jobs:
k3d registry delete k3d-registry.localhost || true
pr-tests-migrations:
if: false
strategy:
max-parallel: 99
matrix:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.9.0-beta.3"
__version__ = "0.9.0-beta.5"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
6 changes: 2 additions & 4 deletions notebooks/api/0.8/10-container-images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@
" \"local-dev\"\n",
" if (bool(os.environ[\"DEV_MODE\"]) and running_as_container)\n",
" else sy.__version__\n",
")\n",
"# TODO: Remove this once the stable syft version is released\n",
"syft_base_worker_tag = \"0.8.8-beta.4\""
")"
]
},
{
Expand Down Expand Up @@ -1484,7 +1482,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
181 changes: 181 additions & 0 deletions notebooks/api/0.8/13-forgot-user-password.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "0",
"metadata": {},
"source": [
"# Forgot User Password"
]
},
{
"cell_type": "markdown",
"id": "1",
"metadata": {},
"source": [
"## Initialize the server"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"metadata": {},
"outputs": [],
"source": [
"# stdlib\n",
"\n",
"# syft absolute\n",
"import syft as sy\n",
"from syft import SyftError\n",
"from syft import SyftSuccess\n",
"\n",
"server = sy.orchestra.launch(\n",
" name=\"test-datasite-1\",\n",
" dev_mode=True,\n",
" create_producer=True,\n",
" n_consumers=3,\n",
" reset=True,\n",
" port=8081,\n",
")"
]
},
{
"cell_type": "markdown",
"id": "3",
"metadata": {},
"source": [
"## Register a new user"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4",
"metadata": {},
"outputs": [],
"source": [
"datasite_client = server.login(email=\"[email protected]\", password=\"changethis\")\n",
"res = datasite_client.register(\n",
" email=\"[email protected]\",\n",
" password=\"verysecurepassword\",\n",
" password_verify=\"verysecurepassword\",\n",
" name=\"New User\",\n",
")\n",
"\n",
"if not isinstance(res, SyftSuccess):\n",
" raise Exception(f\"Res isn't SyftSuccess, its {res}\")"
]
},
{
"cell_type": "markdown",
"id": "5",
"metadata": {},
"source": [
"### Ask for a password reset - Notifier disabled Workflow"
]
},
{
"cell_type": "markdown",
"id": "6",
"metadata": {},
"source": [
"### Call for users.forgot_password"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7",
"metadata": {},
"outputs": [],
"source": [
"guest_client = server.login_as_guest()\n",
"res = guest_client.users.forgot_password(email=\"[email protected]\")\n",
"\n",
"if not isinstance(res, SyftSuccess):\n",
" raise Exception(f\"Res isn't SyftSuccess, its {res}\")"
]
},
{
"cell_type": "markdown",
"id": "8",
"metadata": {},
"source": [
"### Admin generates a temp token"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9",
"metadata": {},
"outputs": [],
"source": [
"temp_token = datasite_client.users.request_password_reset(\n",
" datasite_client.notifications[-1].linked_obj.resolve.id\n",
")\n",
"\n",
"if not isinstance(temp_token, str):\n",
" raise Exception(f\"temp_token isn't a string, its {temp_token}\")"
]
},
{
"cell_type": "markdown",
"id": "10",
"metadata": {},
"source": [
"### User use this token to reset password"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "11",
"metadata": {},
"outputs": [],
"source": [
"res = guest_client.users.reset_password(token=temp_token, new_password=\"Password123\")\n",
"\n",
"if not isinstance(res, SyftSuccess):\n",
" raise Exception(f\"Res isn't SyftSuccess, its {res}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "12",
"metadata": {},
"outputs": [],
"source": [
"new_user_session = server.login(\n",
" email=\"[email protected]\", password=\"Password123\"\n",
")\n",
"\n",
"if isinstance(new_user_session, SyftError):\n",
" raise Exception(f\"Res isn't SyftSuccess, its {new_user_session}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
2 changes: 1 addition & 1 deletion packages/grid/VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.9.0-beta.3"
__version__ = "0.9.0-beta.5"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/backend/grid/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def get_emails_enabled(self) -> Self:
ASSOCIATION_REQUEST_AUTO_APPROVAL: bool = str_to_bool(
os.getenv("ASSOCIATION_REQUEST_AUTO_APPROVAL", "False")
)
MIN_SIZE_BLOB_STORAGE_MB: int = int(os.getenv("MIN_SIZE_BLOB_STORAGE_MB", 16))
MIN_SIZE_BLOB_STORAGE_MB: int = int(os.getenv("MIN_SIZE_BLOB_STORAGE_MB", 1))
REVERSE_TUNNEL_ENABLED: bool = str_to_bool(
os.getenv("REVERSE_TUNNEL_ENABLED", "false")
)
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/backend/grid/images/worker_cpu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# NOTE: This dockerfile will be built inside a syft-backend container in PROD
# Hence COPY will not work the same way in DEV vs. PROD

ARG SYFT_VERSION_TAG="0.9.0-beta.3"
ARG SYFT_VERSION_TAG="0.9.0-beta.5"
FROM openmined/syft-backend:${SYFT_VERSION_TAG}

# should match base image python version
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ vars:
DOCKER_IMAGE_RATHOLE: openmined/syft-rathole
DOCKER_IMAGE_ENCLAVE_ATTESTATION: openmined/syft-enclave-attestation
CONTAINER_REGISTRY: "docker.io"
VERSION: "0.9.0-beta.3"
VERSION: "0.9.0-beta.5"
PLATFORM: $(uname -m | grep -q 'arm64' && echo "arm64" || echo "amd64")

# This is a list of `images` that DevSpace can build for this project
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "syft-ui",
"version": "0.9.0-beta.3",
"version": "0.9.0-beta.5",
"private": true,
"scripts": {
"dev": "pnpm i && vite dev --host --port 80",
Expand Down
Loading

0 comments on commit 0d9e554

Please sign in to comment.