Skip to content

Commit

Permalink
Merge pull request #115 from refgenie/staging
Browse files Browse the repository at this point in the history
v0.7.0
  • Loading branch information
stolarczyk authored Apr 27, 2021
2 parents de8ba87 + ddf6202 commit 2f554de
Show file tree
Hide file tree
Showing 24 changed files with 761 additions and 335 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
- uses: psf/black@20.8b1
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/PyCQA/isort
rev: 5.7.0
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[![Build Status](https://travis-ci.org/databio/refgenieserver.svg?branch=master)](https://travis-ci.org/databio/refgenieserver)
[![Deploy to Dockerhub on release](https://github.com/refgenie/refgenieserver/actions/workflows/deploy_release_software.yml/badge.svg)](https://github.com/refgenie/refgenieserver/actions/workflows/deploy_release_software.yml)
[![Deploy to Amazon ECS - software-staging](https://github.com/refgenie/refgenieserver/actions/workflows/deploy_staging_software.yml/badge.svg)](https://github.com/refgenie/refgenieserver/actions/workflows/deploy_staging_software.yml)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# refgenieserver

This folder contains code for an API to provide reference genomes. `refgenieserver` can do 2 things: `archive` an existing refgenie folder, and then `serve` it.
This folder contains code for an API to provide reference genomes. `refgenieserver` can do 2 things: `archive` an existing refgenie folder, and then `serve` it.

## How to `serve`

Expand All @@ -27,7 +30,7 @@ Better, though, is to use the container. Mount a directory of files to serve at
```
docker run --rm -p 80:80 --name refgenieservercon \
-v $(pwd)/files:/genomes \
refgenieserverim refgenieserver serve -c refgenie.yaml
refgenieserverim refgenieserver serve -c refgenie.yaml
```

### Running container for production:
Expand All @@ -37,7 +40,7 @@ Run the container from the image you just built:
docker run --rm -d -p 80:80 \
-v /path/to/genomes_archive:/genomes \
--name refgenieservercon \
refgenieserverim refgenieserver serve -c /genomes/genome_config.yaml
refgenieserverim refgenieserver serve -c /genomes/genome_config.yaml
```

Make sure the `genome_config.yaml` filename matches what you've named your configuration file! We use `-d` to detach so it's in background. You shouldn't need to mount the app (`-v /path/to/refgenieserver:/app`) because in this case we're running it directly. Terminate container when finished:
Expand Down Expand Up @@ -88,15 +91,15 @@ First, make sure the config has a `genome_archive_folder` key that points to the

Secondly, if you wish to store the refgenieserver configuration file separately from the `genome_archive_folder`, specify a `genome_archive_config` key. The path that this key points to will be considered relative to the refgenie configuration file, unless it's absolute.

Then run:
Then run:
```
refgenieserver archive -c CONFIG
````
It just requires a `-c` argument or `$REFGENIE` environment variable.

This command will:
- create the `genome_archive` directory and structure that can be used to serve the assets
- create a server config file in that directory, which includes a couple of extra asset attributes, like `archive_digest` and `archive_size`.
- create a server config file in that directory, which includes a couple of extra asset attributes, like `archive_digest` and `archive_size`.

In case you already have some of the assets archived and just want to add a new one, use:

Expand Down
27 changes: 19 additions & 8 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# Changelog

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.
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.6.1] -- 2021-03-18
## [0.7.0] -- 2021-04-27
### Added
- private endpoint serving genomes dict to openAPI schema; [#105](https://github.com/refgenie/refgenieserver/issues/105)
- `remotes` section in the refgenieserver config, which supersedes `remote_url_base`. It can be used to define multiple remote data providers.
- new endpoints:
- `/remotes/dict` to get `remotes` dictionary
- `/assets/dir_contents/{genome}/{asset}` to get a JSON object (array of strings) listing all files in the asset directory
- `/assets/file_path/{genome}/{asset}/{seek_key}` to get a *remote* path to the specified file
- direct *unarchived* asset file downloads from asset splash page, both for seek_keys and other asset files

### Changed
- endpoints that return digests return plain text instead of JSON objects for easier parsing; [#67](https://github.com/refgenie/refgenieserver/issues/67)

## [0.6.1] -- 2021-03-18
### Added
- private endpoint serving genomes dict to openAPI schema; [#105](https://github.com/refgenie/refgenieserver/issues/105)

## [0.6.0] -- 2021-03-11
### Added
Expand All @@ -32,7 +43,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Changed
- path specified in `genome_archive_config` is considered relative to the refgenie genome config file, unless absolute.
- non-servable assets purging is now performed prior to serving rather than after each archive job completion
- dropped Python 2 support
- dropped Python 2 support
### Removed
- support for old `genome_archive` key; use `genome_archive_folder` and `genome_archive_config` from now on.

Expand All @@ -44,7 +55,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [0.4.3] -- 2020-01-16
### Added
- a possibility to decouple genome archive directory and genome archive config file. `refgenieserver archive` uses new key (`genome_archive_config`) from `refgenconf`
- a genome archive config file writability check
- a genome archive config file writability check

### Changed
- key `genome_archive` to `genome_archive_folder`. Backwards compatiblity is preserved (both are currently supported)
Expand All @@ -55,10 +66,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [0.4.1] -- 2019-12-13
### Fixed
- relationship info not being updated during specific asset archivization; [#70](https://github.com/refgenie/refgenieserver/issues/70)
- relationship info not being updated during specific asset archivization; [#70](https://github.com/refgenie/refgenieserver/issues/70)

### Changed
- order of the assets adn tags in the table in the index page: sorted alphabetically instead of oldest to newest
- order of the assets adn tags in the table in the index page: sorted alphabetically instead of oldest to newest

## [0.4.0] -- 2019-12-06
### Added
Expand Down Expand Up @@ -113,7 +124,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- config manipulation support in multi-process contexts, it's racefree, uses file locks
- archive removal support (added `-r` option in `refgenieserver archive`)
- asset registry path support in `refgenieserver archive`

### Changed
- command order from `refgenieserver -c CONFIG -d archive/serve` to `refgenieserver archive/serve -c CONFIG -d`
- the genome tarballs are not produced
Expand Down
100 changes: 0 additions & 100 deletions dir2cfg_template.py

This file was deleted.

Loading

0 comments on commit 2f554de

Please sign in to comment.