Skip to content

Commit

Permalink
BLD: set up conda packaging (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebolyen authored Mar 2, 2021
1 parent 324536e commit 822b44e
Show file tree
Hide file tree
Showing 15 changed files with 2,482 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
q2galaxy/_version.py export-subst
45 changes: 32 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
push:
branches: [master]
env:
rendered_dist: 'tests-template/core-dist/'
test_dist: 'tests/suite_qiime2_mystery-stew'
report_html: 'tests/tool_test_output.html'
report_json: 'tests/tool_test_output.json'
rendered_dist: 'rendered/tools/'
test_dist: 'rendered/tests/suite_qiime2_mystery-stew'
report_html: 'rendered/tests/tool_test_output.html'
report_json: 'rendered/tests/tool_test_output.json'

jobs:
lint:
Expand Down Expand Up @@ -42,8 +42,10 @@ jobs:

- uses: actions/cache@v2
with:
path: ~/.planemo/
key: days-since-accident-0
path: |
~/.planemo/
~/miniconda3/
key: days-since-accident-1

- name: install QIIME 2 core distro
run: |
Expand All @@ -67,8 +69,7 @@ jobs:
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate ../test-env
mkdir -p ${{ env.rendered_dist }}
q2galaxy template all ${{ env.rendered_dist }}
make tools
# IF template all
- name: publish template all
Expand All @@ -87,27 +88,45 @@ jobs:
conda activate ../test-env
make test
# IF make test
- name: rendered mystery-stew
uses: actions/upload-artifact@v2
if: steps.make_test.outcome == 'success'
with:
name: mystery-stew
path: ${{ env.test_dist }}

- name: html report
uses: actions/upload-artifact@v2
if: steps.make_test.outcome == 'success'
with:
name: html-report
path: ${{ env.report_html }}

- name: json report
uses: actions/upload-artifact@v2
if: steps.make_test.outcome == 'success'
with:
name: json-report
path: ${{ env.report_json }}
# END IF

- name: Check for failure
if: steps.template_all.outcome == 'failure'
run: exit 1

build-conda-package:
needs: test-against-galaxy
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: set up git repo for versioneer
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- uses: qiime2/action-library-packaging@alpha1
with:
package-name: q2galaxy
build-target: staging
library-token: ${{ secrets.LIBRARY_TOKEN }}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,7 @@ tags

# End of https://www.gitignore.io/api/vim,python

tests/**
!tests/README.md
rendered/tests/**
!rendered/tests/README.md
rendered/tools/**
!rendered/tools/README.md
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include q2galaxy/_version.py
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ lint:
q2lint

stew: all
q2galaxy template tests ./tests/
q2galaxy template tests ./rendered/tests/

tools: all
q2galaxy template all ./tests/
q2galaxy template all ./rendered/tools/

builtins: all
q2galaxy template builtins ./tests/
q2galaxy template builtins ./rendered/tools/

test: stew
planemo test --install_galaxy \
--galaxy_branch qiime2 \
--galaxy_source https://github.com/ebolyen/galaxy.git \
--no_conda_auto_install \
--test_output ./tests/tool_test_output.html \
--test_output_json ./tests/tool_test_output.json \
./tests/suite_qiime2_mystery-stew/
--test_output ./rendered/tests/tool_test_output.html \
--test_output_json ./rendered/tests/tool_test_output.json \
./rendered/tests/suite_qiime2_mystery-stew/

install: all
$(PYTHON) setup.py install
Expand All @@ -34,7 +34,8 @@ dev: all
pip install -e .

clean: distclean
rm -r ./tests/suite_*
rm -r ./rendered/tests/suite_*; \
rm -r ./rendered/tools/suite_*

distclean: ;

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# q2galaxy

![](https://github.com/qiime2/q2galaxy/workflows/ci/badge.svg)
[![](https://github.com/qiime2/q2galaxy/workflows/ci/badge.svg)](https://github.com/qiime2/q2galaxy/actions/workflows/ci.yml)

An interface for generating Galaxy tool descriptions automatically from
QIIME 2 actions.
Expand Down
2 changes: 2 additions & 0 deletions ci/recipe/conda_build_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python:
- 3.6
36 changes: 36 additions & 0 deletions ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% set data = load_setup_py_data() %}
{% set version = data.get('version') or 'placehold' %}
{% set release = '.'.join(version.split('.')[:2]) %}

package:
name: q2galaxy
version: {{ version }}

source:
path: ../..

build:
script: make install

requirements:
host:
- python {{ python }}
- setuptools

run:
- python {{ python }}
- qiime2 {{ release }}.*
- q2-mystery-stew {{ release }}.*
- lxml

test:
imports:
- q2galaxy
commands:
- q2galaxy template tests $(mktemp -d)


about:
home: https://qiime2.org
license: BSD-3-Clause
license_family: BSD
4 changes: 4 additions & 0 deletions q2galaxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
__version__ = '0.0.1' # TODO: use versioneer
__all__ = ['template_action', 'template_plugin', 'template_builtins',
'template_all']

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Loading

0 comments on commit 822b44e

Please sign in to comment.