-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes major edits to the notebooks code to work with the data service.
- Loading branch information
Showing
68 changed files
with
6,413 additions
and
1,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Create cache from commits on main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- chore-add-kind | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
save-poetry-cache: | ||
runs-on: ubuntu-latest | ||
env: | ||
CACHE_KEY: main-branch-poetry-cache-ubuntu | ||
CACHE_PATH: .devcontainer/.poetry_cache | ||
DEVCONTAINER_IMAGE_CACHE: ghcr.io/swissdatasciencecenter/renku-data-services/devcontainer | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install python deps | ||
uses: devcontainers/[email protected] | ||
with: | ||
runCmd: poetry install --with dev | ||
push: always | ||
skipContainerUserIdUpdate: false | ||
imageName: ${{ env.DEVCONTAINER_IMAGE_CACHE }} | ||
cacheFrom: ${{ env.DEVCONTAINER_IMAGE_CACHE }} | ||
- uses: actions/cache/save@v3 | ||
name: Create cache | ||
with: | ||
path: ${{ env.CACHE_PATH }} | ||
key: ${{ env.CACHE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,58 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Docker image metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.DEVCONTAINER_REGISTRY }}/${{ env.DEVCONTAINER_IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=pr,prefix=cache-pr-,priority=600 | ||
type=ref,event=branch,prefix=cache-,priority=500 | ||
type=ref,event=tag,prefix=cache-,priority=500 | ||
flavor: | | ||
latest=false | ||
- name: Extract Docker image name | ||
id: docker_image | ||
env: | ||
IMAGE_TAGS: ${{ steps.meta.outputs.tags }} | ||
run: | | ||
IMAGE=$(echo "$IMAGE_TAGS" | cut -d" " -f1) | ||
IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -d":" -f1) | ||
IMAGE_TAG=$(echo "$IMAGE" | cut -d":" -f2) | ||
echo "image=$IMAGE" >> "$GITHUB_OUTPUT" | ||
echo "image_repository=$IMAGE_REPOSITORY" >> "$GITHUB_OUTPUT" | ||
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT" | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Pre-build devcontainer | ||
uses: devcontainers/[email protected] | ||
continue-on-error: true | ||
with: | ||
push: always | ||
skipContainerUserIdUpdate: false | ||
imageName: ${{ steps.docker_image.outputs.image_repository }} | ||
imageTag: ${{ steps.docker_image.outputs.image_tag }} | ||
cacheFrom: | | ||
${{ steps.docker_image.outputs.image_repository }}:${{ steps.docker_image.outputs.image_tag }} | ||
${{ steps.docker_image.outputs.image_repository }}:${{ env.DEVCONTAINER_IMAGE_TAG_MAIN }} | ||
style-checks: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-devcontainer | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache/restore@v3 | ||
name: Restore cache | ||
with: | ||
path: ${{ env.CACHE_PATH }} | ||
key: ${{ env.CACHE_KEY }} | ||
- name: Set Git config | ||
shell: bash | ||
run: | | ||
|
@@ -99,6 +151,11 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache/restore@v3 | ||
name: Restore cache | ||
with: | ||
path: ${{ env.CACHE_PATH }} | ||
key: ${{ env.CACHE_KEY }} | ||
- name: Set Git config | ||
shell: bash | ||
run: | | ||
|
@@ -143,6 +200,11 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache/restore@v3 | ||
name: Restore cache | ||
with: | ||
path: ${{ env.CACHE_PATH }} | ||
key: ${{ env.CACHE_KEY }} | ||
- name: Set Git config | ||
shell: bash | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,11 +57,12 @@ async def authenticate(access_token: str, request: Request) -> base_models.APIUs | |
) | ||
|
||
return base_models.APIUser( | ||
is_admin=user_props.get("is_admin", False), | ||
is_admin_init=user_props.get("is_admin", False), | ||
id=user_props.get("id", "some-id") if is_set else None, | ||
access_token=access_token, | ||
first_name=user_props.get("first_name", "John") if is_set else None, | ||
last_name=user_props.get("last_name", "Doe") if is_set else None, | ||
email=user_props.get("email", "[email protected]") if is_set else None, | ||
full_name=user_props.get("full_name", "John Doe") if is_set else None, | ||
refresh_token=request.headers.get("Renku-Auth-Refresh-Token"), | ||
) |
Oops, something went wrong.