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 python image to v3.8 as v3.7 is broken and un supported since… #253

Open
wants to merge 29 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
22256af
migrated: FOCA v0.6.0 -> v0.10.0
kushagra189 Nov 9, 2022
f6c3470
migrated: FOCA v0.6.0 -> v0.10.0
kushagra189 Nov 9, 2022
37ce855
revert wflow definitions
kushagra189 Nov 9, 2022
8767dc3
fix: revert changes
kushagra189 Nov 9, 2022
21b717e
fix: config
kushagra189 Nov 10, 2022
84770fd
fix: migration issues
kushagra189 Nov 10, 2022
6c21420
fix server runs
kushagra189 Nov 10, 2022
a24b555
fix: collection
kushagra189 Nov 10, 2022
00068bf
fix: files
kushagra189 Nov 10, 2022
c97f9eb
update: requirements
kushagra189 Nov 10, 2022
e645141
fix: requirements.txt
kushagra189 Nov 10, 2022
574f62a
fix: requirements
kushagra189 Nov 10, 2022
8b138a0
Removed task monitor and enabled background data save flow (#251)
kushagra189 Dec 31, 2022
4f35e48
some cleaning up
uniqueg Dec 31, 2022
ddb29d0
pylint & mypy pass
uniqueg Jan 1, 2023
04d0b31
fix Dockerfile
uniqueg Jan 1, 2023
3d4b950
testing build
uniqueg Jan 2, 2023
9cc40f0
app should be staring now
uniqueg Jan 2, 2023
9774f31
run GH Actions on PR
uniqueg Jan 2, 2023
3e099bc
fix GH Actions workflow
uniqueg Jan 2, 2023
d9c99da
fix GH Actions workflow
uniqueg Jan 2, 2023
7b8aca2
fix app
uniqueg Jan 2, 2023
2c468b5
fix accidental docker compose changes
uniqueg Jan 2, 2023
9cca437
fix app; fix service info bug; more tests
uniqueg Jan 2, 2023
f2ca8f5
fix tests
uniqueg Jan 2, 2023
4b44b17
fix tests
uniqueg Jan 2, 2023
2e4be97
fix GitHub Actions publish
uniqueg Jan 3, 2023
08efbbc
Upgrade to v3.8
lvarin Dec 22, 2023
cd3bcfc
Upgrade python setup in actions
lvarin Dec 22, 2023
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
75 changes: 75 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: cwl-WES checks

on:
push:
branches: [dev]
pull_request:
branches: [dev]

jobs:
lint:
name: Run linting
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install requirements
run: |
pip install .
pip install -r requirements_dev.txt
- name: Lint with Flake8
run: flake8 cwl_wes/ setup.py
- name: Lint with Pylint
run: pylint cwl_wes/ setup.py
test:
name: Run tests
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Deploy app
run: docker-compose up -d --build
- name: Wait for app startup
shell: bash
run: sleep 20
- name: Run integration tests
shell: bash
run: bash tests/integration_tests.sh
- name: Tear down app
run: docker-compose down
publish:
name: Build and publish app image
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: [lint, test]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Generate tag
run: |
echo "TAG=$(date '+%Y%m%d')" >> $GITHUB_ENV
- name: Build and publish image
id: docker
uses: philips-software/[email protected]
with:
dockerfile: .
image-name: "cwl-wes"
tags: "latest ${{ env.TAG }}"
push-branches: "${{ github.event.repository.default_branch }}"
env:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_LOGIN }}
REGISTRY_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"
DOCKER_ORGANIZATION: ${{ secrets.DOCKERHUB_ORG }}
GITHUB_ORGANIZATION: ${{ github.repository_owner }}
- name: Verify that image was pushed
run: |
echo "Push indicator: ${{ steps.docker.outputs.push-indicator }}"
echo "# Set to 'true' if image was pushed, empty string otherwise"
test "${{ steps.docker.outputs.push-indicator }}" == "true"
56 changes: 0 additions & 56 deletions .github/workflows/docker-image.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pr-test.yaml

This file was deleted.

49 changes: 11 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,51 +1,24 @@
##### BASE IMAGE #####
FROM python:3.7-slim-stretch
FROM docker.io/elixircloud/foca:20231219-py3.11

##### METADATA #####
LABEL base.image="python:3.6-slim-stretch"
LABEL version="1.1"
LABEL software="cwl-WES"
LABEL software.version="1.0"
LABEL software.description="Flask microservice implementing the Global Alliance for Genomics and Health (GA4GH) Workflow Execution Service (WES) API specification."
LABEL software.description="Trigger CWL workflows via GA4GH WES and TES"
LABEL software.website="https://github.com/elixir-cloud-aai/cwl-WES"
LABEL software.documentation="https://github.com/elixir-cloud-aai/cwl-WES"
LABEL software.license="https://github.com/elixir-cloud-aai/cwl-WES/blob/master/LICENSE"
LABEL software.tags="General"
LABEL maintainer="[email protected]"
LABEL maintainer.organisation="Biozentrum, University of Basel"
LABEL maintainer.location="Klingelbergstrasse 50/70, CH-4056 Basel, Switzerland"
LABEL maintainer.lab="ELIXIR Cloud & AAI"
LABEL maintainer.license="https://spdx.org/licenses/Apache-2.0"
LABEL software.license="https://spdx.org/licenses/Apache-2.0"
LABEL maintainer="[email protected]"
LABEL maintainer.organisation="ELIXIR Cloud & AAI"

# Python UserID workaround for OpenShift/K8S
ENV LOGNAME=ipython
ENV USER=ipython
ENV HOME=/tmp/user

# Install general dependencies
RUN apt-get update && apt-get install -y nodejs openssl git build-essential python3-dev curl jq

## Set working directory
WORKDIR /app

## Copy Python requirements
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY ./ .
RUN pip install -e .

## Install Python dependencies
RUN cd /app \
&& pip install -r requirements.txt \
&& cd /app/src/cwl-tes \
&& python setup.py develop \
&& cd / \
&& mkdir -p /tmp/user

## Copy remaining app files
COPY ./ /app

## Install app & set write permissions for specs directory
RUN cd /app \
&& python setup.py develop \
&& cd / \
&& chmod g+w /app/cwl_wes/api/ \
&& chmod g+w -R /tmp/user

## Add permissions for storing updated API specification
## (required by FOCA)
RUN chmod -R a+rwx /app/cwl_wes/api
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ cd app
* Via the **app configuration file**

```bash
vi cwl_wes/config/app_config.yaml
vi cwl_wes/config.yaml
```

* Via **environment variables**
Expand Down Expand Up @@ -253,7 +253,7 @@ question etc.
[badge-url-ci]: <https://travis-ci.com/elixir-cloud-aai/cwl-WES>
[badge-url-health]: <https://csc-wes.rahtiapp.fi/ga4gh/wes/v1/ui/>
[badge-url-license]: <http://www.apache.org/licenses/LICENSE-2.0>
[config-app]: cwl_wes/config/app_config.yaml
[config-app]: cwl_wes/config.yaml
[docs-kubernetes]: deployment/README.md
[elixir-aai]: https://perun.elixir-czech.cz/
[elixir-user-group-apply]: https://perun.elixir-czech.cz/fed/registrar/?vo=elixir&group=ECP_CLN:OSS
Expand Down
2 changes: 1 addition & 1 deletion cwl_wes/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.15.0'
"""cwl-WES package."""
Empty file removed cwl_wes/api/__init__.py
Empty file.
96 changes: 0 additions & 96 deletions cwl_wes/api/register_openapi.py

This file was deleted.

Loading
Loading