Skip to content

Commit

Permalink
refactor into viash components
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Jun 13, 2023
1 parent 2bcf996 commit 514d1d2
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 104 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: daily build

on:
schedule:
# build daily
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
# phase 1
list:
runs-on: ubuntu-latest

outputs:
component_matrix: ${{ steps.set_matrix.outputs.matrix }}
cache_key: ${{ steps.cache.outputs.cache_key }}

steps:
- uses: actions/checkout@v3

- uses: viash-io/viash-actions/setup@v3

- id: ns_list
uses: viash-io/viash-actions/ns-list@v3
with:
platform: docker
src: src
format: json

- id: set_matrix
run: |
echo "matrix=$(jq -c '[ .[] |
{
"name": (.functionality.namespace + "/" + .functionality.name),
"config": .info.config,
"dir": .info.config | capture("^(?<dir>.*\/)").dir
}
]' ${{ steps.ns_list.outputs.output_file }} )" >> $GITHUB_OUTPUT
# phase 2
build:
needs: list

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
component: ${{ fromJson(needs.list.outputs.component_matrix) }}

steps:
- uses: actions/checkout@v3

- uses: viash-io/viash-actions/setup@v3

- name: Login to container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GTHB_USER }}
password: ${{ secrets.GTHB_PAT }}

- name: Build container
uses: viash-io/viash-actions/ns-build@v3
with:
platform: docker
src: ${{ matrix.component.dir }}
setup: build

- name: Push container
uses: viash-io/viash-actions/ns-build@v3
with:
platform: docker
src: ${{ matrix.component.dir }}
setup: push
46 changes: 0 additions & 46 deletions .github/workflows/docker-publish.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 OpenPipelines
Copyright (c) 2021 OpenPipelines

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 9 additions & 0 deletions _viash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
viash_version: 0.7.3

source: src
target: target

config_mods: |
.functionality.version := '1.0.0'
.platforms[.type == 'docker'].target_registry := 'ghcr.io/openpipelines-bio/base'
.platforms[.type == 'docker'].target_image_source := 'https://github.com/openpipelines-bio/base-images'
11 changes: 0 additions & 11 deletions base-python-3.10/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions base-python-3.10/v1.0.0.Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions base-r2u-22.04/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions base-r2u-22.04/v1.0.0.Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `ghcr.io/openpipelines-bio/base-python-3.10:v1.0.0`
# `ghcr.io/openpipelines-bio/base/python_3_10:1.0.0`

* Initial release. An Python 3.10 image with the following packages installed:
- `anndata~=0.8.0`
Expand Down
15 changes: 15 additions & 0 deletions src/python_3_10/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
functionality:
name: python_3_10
description: A Python 3.10 slim with anndata and mudata preinstalled.
platforms:
- type: docker
image: python:3.10-slim
setup:
- type: apt
packages:
- procps
- type: python
packages:
- anndata~=0.8.0
- mudata~=0.2.0
- scanpy~=1.9.2
2 changes: 1 addition & 1 deletion base-r2u-22.04/CHANGELOG.md → src/r2u_22_04/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `ghcr.io/openpipelines-bio/base-r:v1.0.0`
# `ghcr.io/openpipelines-bio/base/r2u_22_04:1.0.0`

* Initial release. An R2U 22.04 image with the following packages installed:
- R release
Expand Down
24 changes: 24 additions & 0 deletions src/r2u_22_04/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
functionality:
name: r2u_22_04
description: An R2U 22.04 with anndata and mudata preinstalled.
platforms:
- type: docker
image: eddelbuettel/r2u:22.04
setup:
- type: apt
packages:
- procps
- libhdf5-dev
- libgeos-dev
- python3
- python3-pip
- python3-dev
- python-is-python3
- type: python
packages:
- anndata~=0.8.0
- mudata~=0.2.0
- scanpy~=1.9.2
- type: r
packages:
- anndata

0 comments on commit 514d1d2

Please sign in to comment.