Skip to content

Commit

Permalink
Merge pull request #110 from jjjermiah/development
Browse files Browse the repository at this point in the history
add return_types and new abstraction for requests to be made
  • Loading branch information
jjjermiah committed Feb 18, 2024
2 parents c7d69ec + 6874a3d commit f943a05
Show file tree
Hide file tree
Showing 37 changed files with 1,800 additions and 771 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: CI-CD

# only run on pushes to main or pull requests
on:
push:
# push to any branch
branches: [ main , docs]
# push to any branch *
branches: [ "*"]
pull_request:
branches: [ main , development]
jobs:

jobs:
Unit-Tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14]
python-version: ["3.12", "3.11"] # "3.10",

steps:
- uses: actions/checkout@v3

Expand All @@ -33,7 +33,7 @@ jobs:
- name: Test with pytest
run: |
# Github action runners now have 4 cores
poetry run pytest -n 4 --cov --cov-report xml:coverage-report/coverage.xml
poetry run pytest -s -v -n 4 --cov --cov-report xml:coverage-report/coverage.xml
- name: Upload coverage report artifact to be used by Codecov
# only upload if matrix.os is ubuntu-latest and matrix.python-version is 3.12
Expand Down Expand Up @@ -228,15 +228,15 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, macos-14]
python-version: ["3.12", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install using PyPi
run: |
pip install nbiatoolkit;
Expand Down Expand Up @@ -392,4 +392,3 @@ jobs:
# # No changes
# echo "No changes found. Nothing to commit or push."
# fi

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,6 @@ src/nbiatoolkit/.DS_Store

NBIA-Download
src/nbiatoolkit/.DS_Store
.vscode
download.ipynb
driver*.py
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: check-toml

- repo: https://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ RUN NBIAToolkit --help
CMD ["/bin/bash"]

# to run this container in terminal mode, use the following command:
# docker run -it --rm nbiatoolkit
# docker run -it --rm nbiatoolkit
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![PyPI - Downloads](https://img.shields.io/pypi/dm/nbiatoolkit.svg?label=pypi%20downloads)](https://pypi.org/project/nbiatoolkit/)
![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)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)



Expand Down Expand Up @@ -44,20 +45,20 @@ pip install nbiatoolkit
```

## CLI Usage
For quick access to the NBIA, the toolkit also provides a command line interface (CLI)
For quick access to the NBIA, the toolkit also provides a command line interface (CLI)

``` bash NBIAToolkit-Output
> NBIAToolkit --version
_ ______ _______ ______ ____ _ __
_ ______ _______ ______ ____ _ __
/ | / / __ )/ _/ |/_ __/___ ____ / / /__(_) /_
/ |/ / __ |/ // /| | / / / __ \/ __ \/ / //_/ / __/
/ /| / /_/ // // ___ |/ / / /_/ / /_/ / / ,< / / /_
/_/ |_/_____/___/_/ |_/_/ \____/\____/_/_/|_/_/\__/
/ /| / /_/ // // ___ |/ / / /_/ / /_/ / / ,< / / /_
/_/ |_/_____/___/_/ |_/_/ \____/\____/_/_/|_/_/\__/


Version: 0.29.2

Available CLI tools:
Available CLI tools:

getCollections [-h] [-u USERNAME] [-pw PASSWORD] [-p PREFIX]
[-o OUTPUTFILE] [--version]
Expand Down Expand Up @@ -110,4 +111,3 @@ Interested in contributing? Check out the contributing guidelines. Please note t
> 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/)
> The NBIA-toolkit is provided as an open-source tool based on the [NBIA REST API](https://wiki.cancerimagingarchive.net/display/Public/NBIA+Advanced+REST+API+Guide) and is provided "AS IS" without warranty of any kind.
> In no event shall the authors or contributors be liable for any claim, damages or other liability, arising from, out of or in connection with the NBIA-toolkit or the use or other dealings in the NBIA-toolkit.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
sys.path.insert(0, os.path.abspath("../src"))
# -- Project information -----------------------------------------------------

project = u"nbiatoolkit"
copyright = u"2023, Jermiah Joseph"
author = u"Jermiah Joseph"
project = "nbiatoolkit"
copyright = "2023, Jermiah Joseph"
author = "Jermiah Joseph"

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ markdowns/CHANGELOG.md
markdowns/CONTRIBUTING.md
markdowns/CONDUCT.md
autoapi/index
```
```
2 changes: 0 additions & 2 deletions docs/markdowns/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ Then activate the virtual environment and install the package using the commands
source /path/to/new/virtual/environment/bin/activate
pip install nbiatoolkit
```


6 changes: 3 additions & 3 deletions docs/markdowns/NBIA.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# National Biomedical Imaging Archive (NBIA)

The National Biomedical Imaging Archive (NBIA) is a free and open-source platform that provides the biomedical research community with access to biomedical images, annotations, and related data.
The National Biomedical Imaging Archive (NBIA) is a free and open-source platform that provides the biomedical research community with access to biomedical images, annotations, and related data.
- It is developed by the [National Cancer Institue (NCI)](https://www.cancer.gov/) and aims to improve healthcare by fostering research in areas including cancer, lung diseases, and brain disorders.

The NBIA is primarily used in the fields of medical and health research.
The NBIA is primarily used in the fields of medical and health research.
- This includes areas such as radiology, oncology, neurology, pathology and more.

1. Radiology: Radiologists use this archive to access a variety of images such as CT scans, MRI scans that help them in the diagnosis and treatment of various diseases.
Expand All @@ -16,4 +16,4 @@ The NBIA is primarily used in the fields of medical and health research.

5. Clinical Trials: The NBIA is also used extensively in clinical trials where imaging plays a crucial role. Researchers can share their findings with others around the world which promotes collaborative studies.

6. Machine Learning/AI Research: The large collection of biomedical images also serves as a valuable resource for researchers working on developing machine learning algorithms for image recognition and diagnosis purposes.
6. Machine Learning/AI Research: The large collection of biomedical images also serves as a valuable resource for researchers working on developing machine learning algorithms for image recognition and diagnosis purposes.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
myst-nb
sphinx-autoapi
sphinx-rtd-theme
sphinx-tabs
sphinx-tabs

0 comments on commit f943a05

Please sign in to comment.