Skip to content

Commit

Permalink
ierge remote-tracking branch 'origin' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Feb 12, 2024
2 parents 7625694 + d10a38d commit ad0ec3a
Show file tree
Hide file tree
Showing 11 changed files with 439 additions and 532 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
poetry run pytest -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
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: actions/upload-artifact@v2
with:
name: coverage-report
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ For quick access to the NBIA, the toolkit also provides a command line interface
/_/ |_/_____/___/_/ |_/_/ \____/\____/_/_/|_/_/\__/


Version: 0.28.0
Version: 0.29.0

Available CLI tools:

Expand Down
65 changes: 65 additions & 0 deletions docs/markdowns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,75 @@



## v0.29.0 (2024-02-12)

### Build

* build: Add conditional upload of coverage report artifact ([`972c785`](https://github.com/jjjermiah/nbia-toolkit/commit/972c785b9ffef735ab9544819917d0a23b0d909f))

### Chore

* chore: Update README: 0.28.0 ([`92ff4eb`](https://github.com/jjjermiah/nbia-toolkit/commit/92ff4ebe8420bd3f63011424ec3bb44ebe286f4c))

### Feature

* feat: Add getDICOMTags method to NBIAClient class ([`18b6625`](https://github.com/jjjermiah/nbia-toolkit/commit/18b6625df5a1d435aaad37d4d920b5198e0e58d3))

### Fix

* fix: remove err ([`58a9ada`](https://github.com/jjjermiah/nbia-toolkit/commit/58a9ada2bdfc0ec126ff80ce3adff4608562001b))

* fix: remove extra files ([`91b277b`](https://github.com/jjjermiah/nbia-toolkit/commit/91b277ba1a09f491bf8c8943dc4cf6f940f523d0))

* fix: Update pydicom version to 2.4.0 ([`b78edd8`](https://github.com/jjjermiah/nbia-toolkit/commit/b78edd842f230b75d54e11d91a91c9979a2b8380))

* fix: merge ([`544c682`](https://github.com/jjjermiah/nbia-toolkit/commit/544c682d9300aae80def16a22e379602ef5a8370))

* fix: Fix encryption key in OAuth2 class ([`1082e47`](https://github.com/jjjermiah/nbia-toolkit/commit/1082e476f9f00bd4e45df2f9262b344718a83ee6))

### Refactor

* refactor: clean, lint ([`688a1a6`](https://github.com/jjjermiah/nbia-toolkit/commit/688a1a6de485c14a9e20150fc1335635f3221f01))

### Unknown

* Merge pull request #104 from jjjermiah/dicomtags

feat: Dicomtags ([`25760ef`](https://github.com/jjjermiah/nbia-toolkit/commit/25760ef89c94dce23c4bf4ba8e5ba00fabe32c29))

* Merge pull request #103 from jjjermiah/devel

refactor: clean, lint ([`f9ab11e`](https://github.com/jjjermiah/nbia-toolkit/commit/f9ab11e6980cd95b7b661465a0cc4796d8e8df66))

* remove unused lines ([`c1dc231`](https://github.com/jjjermiah/nbia-toolkit/commit/c1dc23113340d358cd201c36f2e1e9b1505644cc))

* Merge pull request #102 from jjjermiah/19-authpy-logout-functionality

19 authpy logout functionality ([`fee4ee0`](https://github.com/jjjermiah/nbia-toolkit/commit/fee4ee0c870a178a459db9e15d8f521456daa170))

* tests: remove main code in md5 ([`2972b5f`](https://github.com/jjjermiah/nbia-toolkit/commit/2972b5fc9b7bb37dea525abeb9a1e8f1748bc072))

* tests: add more coverage for logger ([`b90c74c`](https://github.com/jjjermiah/nbia-toolkit/commit/b90c74c0bd7af5940e72401d17a5e41982466897))

* Merge pull request #101 from jjjermiah/19-authpy-logout-functionality

19 authpy logout functionality ([`a6f40cc`](https://github.com/jjjermiah/nbia-toolkit/commit/a6f40cc506ce035e2a6568e1af546ded37b34677))

* tests: fix small error ([`977df6c`](https://github.com/jjjermiah/nbia-toolkit/commit/977df6c1ae29262f45963cb929d70fb446f5768a))

* Merge pull request #100 from jjjermiah/main

merge ([`d2a6f55`](https://github.com/jjjermiah/nbia-toolkit/commit/d2a6f55cd6df0e98a122f8f94cb6512c8f3da65a))

* tests: add tests and Update user authentication logic ([`bf4b8d8`](https://github.com/jjjermiah/nbia-toolkit/commit/bf4b8d8737a5621c778c07c52d517a379741139a))


## v0.28.0 (2024-02-05)

### Chore

* chore(sem-ver): 0.28.0 ([`4f78b7a`](https://github.com/jjjermiah/nbia-toolkit/commit/4f78b7a01e3d58d60ad83b039079198c0181324d))

* chore: Update README: 0.27.0 ([`79f7eda`](https://github.com/jjjermiah/nbia-toolkit/commit/79f7edafff8bf0ada9f0ea14909c9fe45f628a69))

### Feature
Expand Down
601 changes: 304 additions & 297 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nbiatoolkit"
version = "0.28.0"
version = "0.29.0"
description = "A python package to query the National Biomedical Imaging Archive (NBIA) database."
authors = ["Jermiah Joseph"]
license = "MIT"
Expand All @@ -21,7 +21,7 @@ downloadSingleSeries = "nbiatoolkit.nbia_cli:downloadSingleSeries_cli"
[tool.poetry.dependencies]
python = ">=3.10 || 3.12"
requests = "2.31.0"
pydicom = "^2.4.3"
pydicom = "^2.4.0"
tqdm = "^4.66.1"
pyfiglet = "^1.0"
beautifulsoup4 = "^4.12.3"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup

__version__ = "0.28.0"
__version__ = "0.29.0"

setup(
name="nbiatoolkit",
Expand Down
2 changes: 2 additions & 0 deletions src/nbiatoolkit/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def __init__(
self.username, self.password = encrypt_credentials(
key=self.fernet_key, username=username, password=password
)
self.username, self.password = encrypt_credentials(key=self._fernet_key, username=username, password=password)

if isinstance(base_url, NBIA_ENDPOINTS):
self.base_url = base_url.value
Expand All @@ -153,6 +154,7 @@ def __init__(
self.refresh_token = "" # Fix: Assign an empty string instead of None
self.scope = None


@property
def fernet_key(self) -> bytes:
return self._fernet_key
Expand Down
229 changes: 0 additions & 229 deletions src/nbiatoolkit/dicomsort/crawl.py

This file was deleted.

20 changes: 19 additions & 1 deletion src/nbiatoolkit/nbia.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from datetime import datetime

# set __version__ variable
__version__ = "0.28.0"
__version__ = "0.29.0"


class NBIAClient:
Expand Down Expand Up @@ -432,6 +432,24 @@ def getNewSeries(

return response

def getDICOMTags(
self,
SeriesInstanceUID: str,
) -> Union[list[dict], None]:
assert SeriesInstanceUID is not None and isinstance(SeriesInstanceUID, str), \
"SeriesInstanceUID must be a string"

PARAMS = self.parsePARAMS({"SeriesUID": SeriesInstanceUID})

response = self.query_api(endpoint=NBIA_ENDPOINTS.GET_DICOM_TAGS, params=PARAMS)

if not isinstance(response, list):
self._log.error("Expected list, but received: %s", type(response))
return None

return response


def downloadSeries(
self,
SeriesInstanceUID: Union[str, list],
Expand Down
Loading

0 comments on commit ad0ec3a

Please sign in to comment.