Skip to content

Commit

Permalink
Move executable to bin folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tcezard committed Oct 14, 2023
1 parent 999ac61 commit 2901870
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 2 additions & 0 deletions eva_sub_cli/eva_sub_cli.py → bin/eva_sub_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def get_docker_validator(vcf_files_mapping, output_dir, metadata_json, metadata_
return DockerValidator(vcf_files_mapping, validation_output_dir, metadata_json, metadata_xlsx,
container, docker, sub_config)


def get_vcf_files(mapping_file):
vcf_files = []
with open(mapping_file) as open_file:
Expand All @@ -35,6 +36,7 @@ def get_vcf_files(mapping_file):
vcf_files.append(row['vcf'])
return vcf_files


if __name__ == "__main__":
argparser = ArgumentParser(description='EVA Submission CLI - validate and submit data to EVA')
argparser.add_argument('--task', required=True, choices=[VALIDATE, SUBMIT, RESUME_SUBMISSION],
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ RUN curl -L "https://github.com/nextflow-io/nextflow/releases/download/v${NXF_VE

COPY . /opt/

RUN python setup.py install
RUN pip install .
5 changes: 3 additions & 2 deletions eva_sub_cli/docker_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
logger = logging_config.get_logger(__name__)

docker_path = 'docker'
container_image = 'ebivariation/eva-sub-eva_sub_cli'
container_tag = 'v0.0.1.dev0'
container_image = 'ebivariation/eva-sub-cli'
container_tag = 'v0.0.1.dev1'
container_validation_dir = '/opt/vcf_validation'
container_validation_output_dir = '/opt/vcf_validation/vcf_validation_output'
container_etc_dir = '/opt/eva_sub_cli/etc'
Expand Down Expand Up @@ -92,6 +92,7 @@ def run_docker_validator(self):

docker_cmd = self.get_docker_validation_cmd()
# start validation
print(docker_cmd)
# FIXME: If nextflow fails in the docker exec still exit with error code 0
run_command_with_output("Run Validation using Nextflow", docker_cmd)
# copy validation result to user host
Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3'
],
scripts=[
join(dirname(__file__), 'eva_sub_cli', s)
for s in ('xlsx2json.py', 'samples_checker.py', 'eva_sub_cli.py')
]
scripts=glob.glob(join(dirname(__file__), 'bin', '*.py'))
)
4 changes: 2 additions & 2 deletions tests/test_docker_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def setUp(self):
mapping_file=self.mapping_file,
output_dir=self.output_dir,
metadata_json=self.metadata_json,
container_name='eva-sub-eva_sub_cli-test'
container_name='eva-sub-cli-test'
)
shutil.copyfile(
os.path.join(self.resources_folder, 'EVA_Submission_template.V1.1.4.xlsx'),
Expand All @@ -69,7 +69,7 @@ def setUp(self):
mapping_file=self.mapping_file,
output_dir=self.output_dir,
metadata_xlsx=self.metadata_xlsx,
container_name='eva-sub-eva_sub_cli-test'
container_name='eva-sub-cli-test'
)

def tearDown(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_samples_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import yaml

from eva_sub_cli.samples_checker import check_sample_name_concordance
from bin.samples_checker import check_sample_name_concordance


class TestSampleChecker(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import yaml
from ebi_eva_common_pyutils.config import WritableConfig

from eva_sub_cli.eva_sub_cli import SUB_CLI_CONFIG_FILE
from eva_sub_cli import SUB_CLI_CONFIG_FILE
from eva_sub_cli.reporter import READY_FOR_SUBMISSION_TO_EVA
from eva_sub_cli.submit import StudySubmitter, SUB_CLI_CONFIG_KEY_SUBMISSION_ID, SUB_CLI_CONFIG_KEY_SUBMISSION_UPLOAD_URL

Expand Down
2 changes: 1 addition & 1 deletion tests/test_xlsx2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import jsonschema

from eva_sub_cli import ETC_DIR
from eva_sub_cli.xlsx2json import XlsxParser, create_xls_template_from_yaml
from bin.xlsx2json import XlsxParser, create_xls_template_from_yaml


class TestXlsReader(TestCase):
Expand Down

0 comments on commit 2901870

Please sign in to comment.