Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVA-3316 - Detect ELOAD status #159

Merged
merged 7 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/retrieve_archives_from_lts.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def main():
# Load the config_file from default location
load_config()

with ELOADRetrieval() as eload_retrieval:
eload_retrieval.retrieve_eloads_and_projects(args.eload, args.retrieve_associated_project, args.update_path,
args.eload_dirs_files, args.project, args.project_dirs_files,
args.eload_lts_dir, args.project_lts_dir, args.eload_retrieval_dir,
args.project_retrieval_dir)
eload_retrieval = ELOADRetrieval()
eload_retrieval.retrieve_eloads_and_projects(args.eload, args.retrieve_associated_project, args.update_path,
args.eload_dirs_files, args.project, args.project_dirs_files,
args.eload_lts_dir, args.project_lts_dir, args.eload_retrieval_dir,
args.project_retrieval_dir)


if __name__ == "__main__":
Expand Down
49 changes: 49 additions & 0 deletions bin/submission_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python

# Copyright 2020 EMBL - European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
from argparse import ArgumentParser

from ebi_eva_common_pyutils.logger import logging_config as log_cfg

from eva_submission.eload_status import EloadStatus
from eva_submission.eload_validation import EloadValidation
from eva_submission.submission_config import load_config

logger = log_cfg.get_logger(__name__)


def main():
argparse = ArgumentParser(description='Provide a submission status for any ELOAD based on what has been accessioned and loaded.')
argparse.add_argument('--eload', required=True, type=int, help='The ELOAD number for this submission')
argparse.add_argument('--debug', action='store_true', default=False,
help='Set the script to output logging information at debug level')

args = argparse.parse_args()

log_cfg.add_stdout_handler()
if args.debug:
log_cfg.set_log_level(logging.DEBUG)

# Load the config_file from default location
load_config()

with EloadStatus(args.eload) as eload:
eload.status()


if __name__ == "__main__":
main()
Loading