Skip to content

Commit

Permalink
Merge pull request #94 from refgenie/dev
Browse files Browse the repository at this point in the history
v0.8.0
  • Loading branch information
stolarczyk authored Jun 25, 2020
2 parents 0d9908d + 709693c commit 8c9903e
Show file tree
Hide file tree
Showing 15 changed files with 276 additions and 95 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
os:
- linux
install:
- pip install .
- pip install -r requirements/requirements-dev.txt
- pip install -r requirements/requirements-test.txt
script: pytest --remote-data --cov=refgenconf
after_success:
- coveralls
branches:
only:
- dev
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# refgenconf

[![Build Status](https://travis-ci.org/databio/refgenconf.svg?branch=master)](https://travis-ci.org/databio/refgenconf)
[![Coverage Status](https://coveralls.io/repos/github/vreuter/refgenconf/badge.svg?branch=master)](https://coveralls.io/github/vreuter/refgenconf?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/refgenie/refgenconf/badge.svg?branch=master)](https://coveralls.io/github/refgenie/refgenconf?branch=master)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/refgenconf/README.html)

Configuration object for refgenie *et al.*
Expand Down
11 changes: 11 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.

## [0.8.0] - 2020-06-25

### Added
- plugins functionality

### Changed
- dropped Python 2 support

### Removed
- preciously deprecated `get_asset` method. Use `seek` instead

## [0.7.0] - 2020-03-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion refgenconf/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.0"
__version__ = "0.8.0"
23 changes: 19 additions & 4 deletions refgenconf/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
CFG_ARCHIVE_KEY = "genome_archive_folder"
CFG_ARCHIVE_KEY_OLD = "genome_archive"
CFG_ARCHIVE_CONFIG_KEY = "genome_archive_config"
CFG_REMOTE_URL_BASE_KEY = "remote_url_base"
CFG_VERSION_KEY = "config_version"
CFG_GENOMES_KEY = "genomes"

Expand All @@ -78,7 +79,7 @@

CFG_TOP_LEVEL_KEYS = [
CFG_FOLDER_KEY, CFG_SERVER_KEY, CFG_SERVERS_KEY, CFG_ARCHIVE_KEY, CFG_GENOMES_KEY,
CFG_VERSION_KEY, CFG_ARCHIVE_CONFIG_KEY, CFG_ARCHIVE_KEY_OLD]
CFG_VERSION_KEY, CFG_ARCHIVE_CONFIG_KEY, CFG_ARCHIVE_KEY_OLD, CFG_REMOTE_URL_BASE_KEY]
CFG_GENOME_KEYS = [
CFG_GENOME_DESC_KEY, CFG_ASSETS_KEY, CFG_CHECKSUM_KEY]
CFG_GENOME_ATTRS_KEYS = [CFG_GENOME_DESC_KEY, CFG_CHECKSUM_KEY]
Expand All @@ -92,8 +93,22 @@
"CFG_ASSET_PATH_KEY", "CFG_ASSET_DESC_KEY", "CFG_ARCHIVE_KEY", "CFG_ARCHIVE_SIZE_KEY", "CFG_SEEK_KEYS_KEY",
"CFG_ASSET_SIZE_KEY", "CFG_CHECKSUM_KEY", "CFG_ARCHIVE_CHECKSUM_KEY", "CFG_VERSION_KEY", "CFG_ASSET_PARENTS_KEY",
"CFG_ASSET_CHILDREN_KEY", "CFG_TAG_DESC_KEY", "CFG_ASSET_CHECKSUM_KEY", "CFG_ASSET_TAGS_KEY",
"CFG_ASSET_RELATIVES_KEYS", "CFG_ARCHIVE_CONFIG_KEY", "CFG_ARCHIVE_KEY_OLD"]

"CFG_ASSET_RELATIVES_KEYS", "CFG_ARCHIVE_CONFIG_KEY", "CFG_ARCHIVE_KEY_OLD", "CFG_REMOTE_URL_BASE_KEY"]

# hook identifiers
PRE_UPDATE_HOOK = "pre_update"
POST_UPDATE_HOOK = "post_update"
PRE_PULL_HOOK = "pre_pull"
POST_PULL_HOOK = "post_pull"
PRE_TAG_HOOK = "pre_tag"
POST_TAG_HOOK = "post_tag"
PRE_LIST_HOOK = "pre_list"
POST_LIST_HOOK = "post_list"
# HOOKS is a list of all available plugin entry points
HOOK_NAMES = [
"PRE_LIST_HOOK", "PRE_PULL_HOOK", "PRE_TAG_HOOK", "PRE_UPDATE_HOOK",
"POST_TAG_HOOK", "POST_LIST_HOOK", "POST_PULL_HOOK", "POST_UPDATE_HOOK"]
HOOKS = [eval(x) for x in HOOK_NAMES]

# other consts
REQ_CFG_VERSION = 0.3
Expand All @@ -106,7 +121,7 @@
__all__ = ["DEFAULT_SERVER", "CFG_ASSET_DEFAULT_TAG_KEY", "CFG_KEY_NAMES", "CFG_GENOME_DESC_KEY", "REQ_CFG_VERSION",
"CFG_ASSETS_KEY", "CFG_GENOME_ATTRS_KEYS", "REFGENIE_BY_CFG", "DEFAULT_TAG", "ATTRS_COPY_PULL",
"RGC_REQ_KEYS", "REQ_TAG_ATTRS", "CUSTOM_BAR_FMT", "API_VERSION", "CONF_STRUCTURE", "OPERATION_IDS",
"CUSTOM_PFX"] + FILE_DIR_NAMES + CFG_CONST + CFG_KEY_NAMES + API_IDS
"CUSTOM_PFX", "HOOKS"] + FILE_DIR_NAMES + CFG_CONST + CFG_KEY_NAMES + API_IDS + HOOK_NAMES

CONF_STRUCTURE = """
# example genome configuration structure
Expand Down
7 changes: 6 additions & 1 deletion refgenconf/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
__all__ = ["DownloadJsonError", "GenomeConfigFormatError", "MissingAssetError", "MissingRecipeError",
"MissingConfigDataError", "MissingGenomeError", "MissingSeekKeyError", "MissingTagError",
"RefgenconfError", "UnboundEnvironmentVariablesError", "ConfigNotCompliantError",
"RemoteDigestMismatchError"]
"RemoteDigestMismatchError", "UndefinedAliasError"]

DOC_URL = "http://refgenie.databio.org/en/latest/genome_config/"

Expand Down Expand Up @@ -80,3 +80,8 @@ def __init__(self, asset, local_digest, remote_digest):
"because the remote version was not built from the same parent asset you have locally." \
.format(asset, local_digest, remote_digest)
super(RemoteDigestMismatchError, self).__init__(msg)


class UndefinedAliasError(RefgenconfError):
""" Alias is is not defined. """
pass
Loading

0 comments on commit 8c9903e

Please sign in to comment.