diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93151d9..44b2d6d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ name: CI-CD on: push: # push to any branch * - branches: [ "*" ] + branches: [ main ] pull_request: branches: [ main , development] @@ -105,6 +105,11 @@ jobs: # Set up operating system runs-on: ubuntu-latest + outputs: + released: ${{ steps.release.outputs.released }} + version: ${{ steps.release.outputs.version }} + tag: ${{ steps.release.outputs.tag }} + # Define job steps steps: - name: Set up Python 3.12 @@ -243,7 +248,7 @@ jobs: run: | # test image with latest tag docker run --rm \ - ${{ secrets.DOCKERHUB_USERNAME }}/nbiatoolkit:${{ steps.release.outputs.tag }} \ + ${{ secrets.DOCKERHUB_USERNAME }}/nbiatoolkit:${{ needs.Continuous-Deployment.outputs.tag }} \ NBIAToolkit diff --git a/README.md b/README.md index 77c0ed2..95c1844 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # *NBIA Toolkit* + ## A python package that provides programmatic access to query and download images from the National Biomedical Imaging Archive (**NBIA**) and The Cancer Imaging Archive (**TCIA**) databases. + [![PyTests](https://github.com/jjjermiah/nbia-toolkit/actions/workflows/main.yml/badge.svg)](https://github.com/jjjermiah/nbia-toolkit/actions/workflows/main.yml) [![Documentation Status](https://readthedocs.org/projects/nbia-toolkit/badge/?version=latest)](https://nbia-toolkit.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/jjjermiah/nbia-toolkit/graph/badge.svg?token=JKREY71D0R)](https://codecov.io/gh/jjjermiah/nbia-toolkit) @@ -7,7 +9,6 @@ [![Python version](https://img.shields.io/pypi/pyversions/nbiatoolkit.svg)](https://img.shields.io/pypi/pyversions/nbiatoolkit.svg) [![CodeFactor](https://www.codefactor.io/repository/github/jjjermiah/nbia-toolkit/badge)](https://www.codefactor.io/repository/github/jjjermiah/nbia-toolkit) - ![GitHub release (latest by date)](https://img.shields.io/github/v/release/jjjermiah/nbia-toolkit) [![PyPI version](https://badge.fury.io/py/nbiatoolkit.svg)](https://badge.fury.io/py/nbiatoolkit) [![Downloads](https://static.pepy.tech/badge/nbiatoolkit)](https://pepy.tech/project/nbiatoolkit) @@ -15,16 +16,21 @@ ![GitHub repo size](https://img.shields.io/github/repo-size/jjjermiah/nbia-toolkit) [![Docker Pulls](https://img.shields.io/docker/pulls/jjjermiah/nbiatoolkit)](https://hub.docker.com/r/jjjermiah/nbiatoolkit) - - - ![GitHub milestone details](https://img.shields.io/github/milestones/progress-percent/jjjermiah/nbia-toolkit/1?style=flat-square&label=1.0.0%20Stable%20Release%20Milestone&link=https%3A%2F%2Fgithub.com%2Fjjjermiah%2Fnbia-toolkit%2Fmilestone%2F1)![GitHub milestone details](https://img.shields.io/github/milestones/progress/jjjermiah/nbia-toolkit/1?style=flat-square&label=%20&link=https%3A%2F%2Fgithub.com%2Fjjjermiah%2Fnbia-toolkit%2Fmilestone%2F1) [![GitHub issues](https://img.shields.io/github/issues/jjjermiah/nbia-toolkit)](https://github.com/jjjermiah/nbia-toolkit/issues) ![GitHub last commit](https://img.shields.io/github/last-commit/jjjermiah/nbia-toolkit) - +## Table of Contents +- [Features](#features) +- [Installation](#installation) +- [Python Usage](#python-usage) +- [CLI Usage](#cli-usage) +- [Contributing](#contributing) +- [License](#license) +- [User Agreements and Disclaimers](#user-agreements-and-disclaimers) ## Features + > [!TIP] > For a thorough description of the package and its available features, please refer to the Documentation at [NBIA-Toolkit Read The Docs](https://nbia-toolkit.readthedocs.io/en/latest/) @@ -45,12 +51,13 @@ > `nbiatoolkit` is currently under development and is not guaranteed to be stable. It is made available via PyPI and can be installed using pip: -**** -```bash + +``` bash pip install nbiatoolkit ``` ## Python Usage + Using a context manager, you can easily access the NBIA database and query for metadata on collections, patients, studies, and series. ``` python @@ -75,6 +82,7 @@ with NBIAClient() as client: ``` ## CLI Usage + For quick access to the NBIA, the toolkit also provides a command line interface (CLI) ``` bash NBIAToolkit-Output @@ -85,10 +93,10 @@ For quick access to the NBIA, the toolkit also provides a command line interface / |/ / __ |/ // /| | / / / __ \/ __ \/ / //_/ / __/ / /| / /_/ // // ___ |/ / / /_/ / /_/ / / ,< / / /_ /_/ |_/_____/___/_/ |_/_/ \____/\____/_/_/|_/_/\__/ - + Version: 1.0.0 -Available CLI tools: +Available CLI tools: getCollections [-h] [-u USERNAME] [-pw PASSWORD] [-p PREFIX] [-o OUTPUTFILE] [--version] @@ -124,9 +132,11 @@ getNewSeries [-h] [-u USERNAME] [-pw PASSWORD] -d DATE [-o OUTPUTFILE] Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms. ## License + `nbiatoolkit` was created by Jermiah Joseph. It is licensed under the terms of the MIT license. ## User Agreements and Disclaimers + > [!IMPORTANT] >The NBIA-toolkit is NOT a product of the National Cancer Institute (NCI) and is not endorsed by the NCI. > Users of the NBIA-toolkit are required to abide by the NBIA REST API Terms of Service and the [NBIA Data Usage Policies and Restrictions](https://www.cancerimagingarchive.net/data-usage-policies-and-restrictions/) diff --git a/src/nbiatoolkit/nbia_cli.py b/src/nbiatoolkit/nbia_cli.py index 92091e4..946977b 100644 --- a/src/nbiatoolkit/nbia_cli.py +++ b/src/nbiatoolkit/nbia_cli.py @@ -193,23 +193,10 @@ def cli_wrapper(func, **kwargs) -> List[str] | None: The result of the function call. """ - global done_event - global query - - # # Start the loading animation in a separate thread - # loading_thread = threading.Thread(target=loading_animation) - - # # daemon threads are killed when the main thread exits - # loading_thread.daemon = True - # loading_thread.start() # Perform the database query in the main thread result = func(**kwargs) - # # Stop the loading animation - # done_event.set() - # loading_thread.join() - return result