Skip to content

Commit

Permalink
Merge pull request #12 from bento-platform/qa/v3.0.0
Browse files Browse the repository at this point in the history
qa/v3.0.0
  • Loading branch information
brouillette authored Oct 5, 2021
2 parents 3c6ccd4 + 10ec719 commit d797393
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 272 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ bin/*
*.vcf.gz

*/*/*.csv

# ignore .gtf files
*/*.gtf*
*/*/*.gtf*
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
# API
- GOHAN_DEBUG=${GOHAN_DEBUG}
- GOHAN_API_VCF_PATH=${GOHAN_API_CONTAINERIZED_VCF_PATH}
- GOHAN_API_GTF_PATH=${GOHAN_API_CONTAINERIZED_GTF_PATH}

# Elasticsearch
- GOHAN_ES_URL=${GOHAN_PRIVATE_ES_URL}
Expand All @@ -51,6 +52,7 @@ services:
- GOHAN_DRS_BASIC_AUTH_PASSWORD=${GOHAN_DRS_BASIC_AUTH_PASSWORD}
volumes:
- ${GOHAN_API_VCF_PATH}:${GOHAN_API_CONTAINERIZED_VCF_PATH}
- ${GOHAN_API_GTF_PATH}:${GOHAN_API_CONTAINERIZED_GTF_PATH}

elasticsearch:
image: ${GOHAN_ES_BASE_IMAGE}:${GOHAN_ES_BASE_VERSION}
Expand Down
3 changes: 3 additions & 0 deletions etc/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ GOHAN_API_INTERNAL_PORT=5000
GOHAN_API_VCF_PATH=/path/to/vcfs/on/host/machine
GOHAN_API_CONTAINERIZED_VCF_PATH=/app/vcfs

GOHAN_API_GTF_PATH=/path/to/gtfs/on/host/machine
GOHAN_API_CONTAINERIZED_GTF_PATH=/app/gtfs

GOHAN_API_ES_PI=variants
GOHAN_API_ES_PROTO=http
GOHAN_API_ES_HOST=elasticsearch
Expand Down
4 changes: 4 additions & 0 deletions src/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func main() {
"\tDebug : %t \n\n"+

"\tVCF Directory Path : %s \n"+
"\tGTF Directory Path : %s \n"+
"\tElasticsearch Url : %s \n"+
"\tElasticsearch Username : %s\n\n"+

Expand All @@ -48,6 +49,7 @@ func main() {

cfg.Debug,
cfg.Api.VcfPath,
cfg.Api.GtfPath,
cfg.Elasticsearch.Url, cfg.Elasticsearch.Username,
cfg.Drs.Url, cfg.Drs.Username,
cfg.AuthX.IsAuthorizationEnabled,
Expand Down Expand Up @@ -160,6 +162,8 @@ func main() {
e.GET("/genes/search", mvc.GenesGetByNomenclatureWildcard,
// middleware
gam.ValidateOptionalChromosomeAttribute)
e.GET("/genes/ingestion/requests", mvc.GetAllGeneIngestionRequests)
e.GET("/genes/ingestion/run", mvc.GenesIngest)

// Run
e.Logger.Fatal(e.Start(":" + cfg.Api.Port))
Expand Down
1 change: 1 addition & 0 deletions src/api/models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type Config struct {
Url string `yaml:"url" envconfig:"GOHAN_PUBLIC_URL"`
Port string `yaml:"port" envconfig:"GOHAN_API_INTERNAL_PORT"`
VcfPath string `yaml:"vcfPath" envconfig:"GOHAN_API_VCF_PATH"`
GtfPath string `yaml:"gtfPath" envconfig:"GOHAN_API_GTF_PATH"`
} `yaml:"api"`

Elasticsearch struct {
Expand Down
19 changes: 14 additions & 5 deletions src/api/models/ingest/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
type State string

const (
Queued State = "Queued"
Running = "Running"
Done = "Done"
Error = "Error"
Queued State = "Queued"
Downloading = "Downloading"
Running = "Running"
Done = "Done"
Error = "Error"
)

type IngestRequest struct {
type VariantIngestRequest struct {
Id uuid.UUID `json:"id"`
Filename string `json:"filename"`
State State `json:"state"`
Expand All @@ -22,6 +23,14 @@ type IngestRequest struct {
UpdatedAt string `json:"updatedAt"`
}

type GeneIngestRequest struct {
Filename string `json:"filename"`
State State `json:"state"`
Message string `json:"message"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}

type IngestResponseDTO struct {
Id uuid.UUID `json:"id"`
Filename string `json:"filename"`
Expand Down
Loading

0 comments on commit d797393

Please sign in to comment.