-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2161 from AlexsLemonade/revert-2157-revert-2151-dev
Revert "Revert "[DEPLOY] Fix for microbes and GSE75083""
- Loading branch information
Showing
119 changed files
with
447,901 additions
and
29,549 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ else | |
echo "Running all tests.."; | ||
./workers/run_tests.sh "$@" | ||
fi | ||
|
||
./.circleci/upload_test_coverage.sh workers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Script to upload code coverage to circleci | ||
|
||
project=$1 | ||
if [[ $project == "" ]] | ||
then | ||
echo "No project specified" | ||
exit 1 | ||
fi | ||
|
||
if [[ $project == "workers" ]] | ||
then | ||
# the workers project uses it's own test_volume directory | ||
test_volume="workers/test_volume" | ||
else | ||
test_volume="test_volume" | ||
fi | ||
|
||
coverage_file="${test_volume}/coverage.xml" | ||
|
||
if [[ ! -f $coverage_file ]] | ||
then | ||
echo "Coverage file wasn't found, were the tests run before?" | ||
exit 0 # exit this script but don't fail the tests for this. | ||
fi | ||
|
||
output_file="${test_volume}/${project}_coverage.xml" | ||
|
||
# In the test coverage report, all file paths are relative to each project | ||
# folder. We need to be relative to the repo's root directory. That's why we | ||
# append the project folder name to each file path in coverage.xml | ||
sed "s/filename=\"/filename=\"$project\//g" $coverage_file > $output_file | ||
|
||
# codecov.sh is located at https://codecov.io/bash | ||
# we downloaded it for convenience | ||
./.circleci/codecov.sh -f "$output_file" -Z -F $project | ||
|
||
rm -f $coverage_file $output_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
coverage | ||
django==2.2.9 | ||
django==2.2.10 | ||
psycopg2-binary | ||
boto3 | ||
requests>=2.20.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from data_refinery_common.utils import get_env_variable | ||
|
||
LOCAL_ROOT_DIR = get_env_variable("LOCAL_ROOT_DIR", "/home/user/data_store") | ||
# We store what salmon ouptuts as its version, therefore for | ||
# comparisions or defaults we shouldn't just store the version string, | ||
# we need something with the pattern: 'salmon X.X.X' | ||
CURRENT_SALMON_VERSION = "salmon " + get_env_variable("SALMON_VERSION", "0.13.1") | ||
CHUNK_SIZE = 1024 * 256 # chunk_size is in bytes | ||
# Let this fail if SYSTEM_VERSION is unset. | ||
SYSTEM_VERSION = get_env_variable("SYSTEM_VERSION") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,55 @@ | ||
from data_refinery_common.models.command_progress import ( # noqa | ||
CdfCorrectedAccession, | ||
SurveyedAccession, | ||
) | ||
from data_refinery_common.models.jobs import ( # noqa | ||
DownloaderJob, | ||
ProcessorJob, | ||
SurveyJob, | ||
SurveyJobKeyValue, | ||
) | ||
from data_refinery_common.models.models import ( # noqa | ||
APIToken, | ||
CompendiumResult, | ||
from data_refinery_common.models.api_token import APIToken # noqa | ||
from data_refinery_common.models.associations.compendium_result_organism_association import ( # noqa | ||
CompendiumResultOrganismAssociation, | ||
ComputationalResult, | ||
ComputationalResultAnnotation, | ||
ComputedFile, | ||
Dataset, | ||
) | ||
from data_refinery_common.models.associations.downloaderjob_originalfile_association import ( # noqa | ||
DownloaderJobOriginalFileAssociation, | ||
Experiment, | ||
ExperimentAnnotation, | ||
) | ||
from data_refinery_common.models.associations.experiment_organism_association import ( # noqa | ||
ExperimentOrganismAssociation, | ||
) | ||
from data_refinery_common.models.associations.experiment_result_association import ( # noqa | ||
ExperimentResultAssociation, | ||
) | ||
from data_refinery_common.models.associations.experiment_sample_association import ( # noqa | ||
ExperimentSampleAssociation, | ||
OrganismIndex, | ||
OriginalFile, | ||
) | ||
from data_refinery_common.models.associations.original_file_sample_association import ( # noqa | ||
OriginalFileSampleAssociation, | ||
Pipeline, | ||
Processor, | ||
) | ||
from data_refinery_common.models.associations.processorjob_dataset_association import ( # noqa | ||
ProcessorJobDatasetAssociation, | ||
) | ||
from data_refinery_common.models.associations.processorjob_originalfile_association import ( # noqa | ||
ProcessorJobOriginalFileAssociation, | ||
Sample, | ||
SampleAnnotation, | ||
) | ||
from data_refinery_common.models.associations.sample_computed_file_association import ( # noqa | ||
SampleComputedFileAssociation, | ||
) | ||
from data_refinery_common.models.associations.sample_result_association import ( # noqa | ||
SampleResultAssociation, | ||
) | ||
from data_refinery_common.models.command_progress import ( # noqa | ||
CdfCorrectedAccession, | ||
SurveyedAccession, | ||
) | ||
from data_refinery_common.models.compendium_result import CompendiumResult # noqa | ||
from data_refinery_common.models.computational_result import ComputationalResult # noqa | ||
from data_refinery_common.models.computational_result_annotation import ( # noqa | ||
ComputationalResultAnnotation, | ||
) | ||
from data_refinery_common.models.computed_file import ComputedFile # noqa | ||
from data_refinery_common.models.dataset import Dataset # noqa | ||
from data_refinery_common.models.experiment import Experiment # noqa | ||
from data_refinery_common.models.experiment_annotation import ExperimentAnnotation # noqa | ||
from data_refinery_common.models.jobs.downloader_job import DownloaderJob # noqa | ||
from data_refinery_common.models.jobs.processor_job import ProcessorJob # noqa | ||
from data_refinery_common.models.jobs.survey_job import SurveyJob # noqa | ||
from data_refinery_common.models.jobs.survey_job_key_value import SurveyJobKeyValue # noqa | ||
from data_refinery_common.models.organism import Organism # noqa | ||
from data_refinery_common.models.organism_index import OrganismIndex # noqa | ||
from data_refinery_common.models.original_file import OriginalFile # noqa | ||
from data_refinery_common.models.pipeline import Pipeline # noqa | ||
from data_refinery_common.models.processor import Processor # noqa | ||
from data_refinery_common.models.sample import Sample # noqa | ||
from data_refinery_common.models.sample_annotation import SampleAnnotation # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import uuid | ||
|
||
from django.conf import settings | ||
from django.db import models | ||
from django.utils import timezone | ||
|
||
|
||
class APIToken(models.Model): | ||
""" Required for starting a smash job """ | ||
|
||
# ID | ||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) | ||
|
||
# Activation | ||
is_activated = models.BooleanField(default=False) | ||
|
||
# Common Properties | ||
created_at = models.DateTimeField(editable=False, default=timezone.now) | ||
last_modified = models.DateTimeField(default=timezone.now) | ||
|
||
def save(self, *args, **kwargs): | ||
""" On save, update timestamps """ | ||
current_time = timezone.now() | ||
if not self.id: | ||
self.created_at = current_time | ||
self.last_modified = current_time | ||
return super(APIToken, self).save(*args, **kwargs) | ||
|
||
@property | ||
def terms_and_conditions(self): | ||
""" """ | ||
return settings.TERMS_AND_CONDITIONS |
Empty file.
16 changes: 16 additions & 0 deletions
16
common/data_refinery_common/models/associations/compendium_result_organism_association.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from django.db import models | ||
|
||
from data_refinery_common.models.compendium_result import CompendiumResult | ||
from data_refinery_common.models.organism import Organism | ||
|
||
|
||
class CompendiumResultOrganismAssociation(models.Model): | ||
|
||
compendium_result = models.ForeignKey( | ||
CompendiumResult, blank=False, null=False, on_delete=models.CASCADE | ||
) | ||
organism = models.ForeignKey(Organism, blank=False, null=False, on_delete=models.CASCADE) | ||
|
||
class Meta: | ||
db_table = "compendium_result_organism_associations" | ||
unique_together = ("compendium_result", "organism") |
18 changes: 18 additions & 0 deletions
18
common/data_refinery_common/models/associations/downloaderjob_originalfile_association.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from django.db import models | ||
|
||
from data_refinery_common.models.jobs.downloader_job import DownloaderJob | ||
from data_refinery_common.models.original_file import OriginalFile | ||
|
||
|
||
class DownloaderJobOriginalFileAssociation(models.Model): | ||
|
||
downloader_job = models.ForeignKey( | ||
DownloaderJob, blank=False, null=False, on_delete=models.CASCADE | ||
) | ||
original_file = models.ForeignKey( | ||
OriginalFile, blank=False, null=False, on_delete=models.CASCADE | ||
) | ||
|
||
class Meta: | ||
db_table = "downloaderjob_originalfile_associations" | ||
unique_together = ("downloader_job", "original_file") |
14 changes: 14 additions & 0 deletions
14
common/data_refinery_common/models/associations/experiment_organism_association.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.db import models | ||
|
||
from data_refinery_common.models.experiment import Experiment | ||
from data_refinery_common.models.organism import Organism | ||
|
||
|
||
class ExperimentOrganismAssociation(models.Model): | ||
|
||
experiment = models.ForeignKey(Experiment, blank=False, null=False, on_delete=models.CASCADE) | ||
organism = models.ForeignKey(Organism, blank=False, null=False, on_delete=models.CASCADE) | ||
|
||
class Meta: | ||
db_table = "experiment_organism_associations" | ||
unique_together = ("experiment", "organism") |
16 changes: 16 additions & 0 deletions
16
common/data_refinery_common/models/associations/experiment_result_association.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from django.db import models | ||
|
||
from data_refinery_common.models.computational_result import ComputationalResult | ||
from data_refinery_common.models.experiment import Experiment | ||
|
||
|
||
class ExperimentResultAssociation(models.Model): | ||
|
||
experiment = models.ForeignKey(Experiment, blank=False, null=False, on_delete=models.CASCADE) | ||
result = models.ForeignKey( | ||
ComputationalResult, blank=False, null=False, on_delete=models.CASCADE | ||
) | ||
|
||
class Meta: | ||
db_table = "experiment_result_associations" | ||
unique_together = ("result", "experiment") |
Oops, something went wrong.