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

[MRG] Prepare for v2.1 release #939

Merged
merged 5 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: cimg/python:3.10
- image: python:3.10
steps:
- checkout
- run:
Expand All @@ -14,7 +14,7 @@ jobs:
- add_ssh_keys:
fingerprints:
- "13:8e:b6:7a:d2:8f:a0:4d:56:08:97:f2:c8:9c:10:e9"
- deploy:
- run:
name: Deploy documentation
environment:
USERNAME: scaramallion
Expand Down
41 changes: 11 additions & 30 deletions .github/workflows/publish-pypi-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

jobs:

build_and_test:
name: Build and test the package
build:
name: Build the package
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -36,41 +36,22 @@ jobs:
name: wheels
path: dist/

- name: Publish package to Test PyPi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/

- name: Set up test environment
run: |
poetry install --no-interaction --extras tests
pip install -i https://test.pypi.org/simple/ pynetdicom

- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
cd ${HOME}
python -m pynetdicom --version
python -c "import pytest; pytest.main(['--pyargs', 'pynetdicom.tests'])"

deploy:
name: Upload package to PyPI
needs:
- build_and_test
name: Upload release to PyPI
needs: [ build ]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pylibjpeg-libjpeg/
permissions:
id-token: write

steps:
- name: Download the package files
uses: actions/download-artifact@v4
with:
name: wheels
path: dist/
merge-multiple: true

- name: Publish package to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions build_tools/circle/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ fi

# Installing required system packages to support the rendering of math
# notation in the HTML documentation
sudo -E apt-get -yq update
sudo -E apt-get -yq remove texlive-binaries --purge
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes \
apt-get -yq update
apt-get -yq remove texlive-binaries --purge
apt-get -yq --no-install-suggests --no-install-recommends --force-yes \
install dvipng texlive-latex-base texlive-latex-extra \
texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended\
latexmk
Expand Down
12 changes: 6 additions & 6 deletions docs/changelog/v2.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Fixes
* Fixed maximum length of *Patient ID* attribute in ``qrscp`` app (:issue:`785`)
* Sanitise filenames for received datasets for non-conformant SOP Instance
UIDs (:issue:`823`)
* Fixed :attr:~pynetdicom._config.LOG_REQUEST_IDENTIFIERS` not applying to
meth:`Association.send_c_find()<pynetdicom.association.Association.send_c_find>`,
meth:`Association.send_c_move()<pynetdicom.association.Association.send_c_move>` and
meth:`Association.send_c_get()<pynetdicom.association.Association.send_c_get>` (:issue:`911`)
* Fixed :attr:`~pynetdicom._config.LOG_REQUEST_IDENTIFIERS` not applying to
:meth:`Association.send_c_find()<pynetdicom.association.Association.send_c_find>`,
:meth:`Association.send_c_move()<pynetdicom.association.Association.send_c_move>` and
:meth:`Association.send_c_get()<pynetdicom.association.Association.send_c_get>` (:issue:`911`)


Enhancements
Expand All @@ -29,13 +29,13 @@ Enhancements
* Added support for :class:`Inventory Query/Retrieve Service Class
<pynetdicom.service_class.InventoryQueryRetrieveServiceClass>` (:issue:`879`)
* Added support for :class:`Storage Management Service Class
<pynetdicom.service_class.StorageManagementServiceClass>` (:issue:`880`)
<pynetdicom.service_class_n.StorageManagementServiceClass>` (:issue:`880`)
* Added :meth:`~pynetdicom.events.Event.encoded_dataset` to simplify accessing
the encoded dataset without first decoding it
* Added a check to :meth:`~pynetdicom.association.Association.send_c_store` to
ensure that the *Transfer Syntax UID* matches the encoding of the dataset
(:issue:`891`)
* Updated SOP Classes to version 2023e of the DICOM Standard
* Updated SOP Classes to version 2024b of the DICOM Standard


Changes
Expand Down
1 change: 1 addition & 0 deletions docs/reference/service_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ pynetdicom supports the following Service Classes
ProcedureStepServiceClass
RTMachineVerificationServiceClass
StorageCommitmentServiceClass
StorageManagementServiceClass
UnifiedProcedureStepServiceClass
11 changes: 0 additions & 11 deletions docs/user/association.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ Handlers can also be bound and unbound from events in an existing
TLS
...

.. warning::

TLS v1.3 is not currently supported

The client socket used for the association can be wrapped in TLS by supplying
the *tls_args* keyword parameter to
:meth:`~pynetdicom.ae.ApplicationEntity.associate`:
Expand Down Expand Up @@ -493,10 +489,6 @@ unaffected.
TLS
...

.. warning::

TLS v1.3 is not currently supported

The client sockets generated by the association server can also be wrapped in
TLS by supplying a :class:`ssl.SSLContext` instance via the *ssl_context*
keyword parameter:
Expand All @@ -516,9 +508,6 @@ keyword parameter:
ssl_cx.verify_mode = ssl.CERT_REQUIRED
ssl_cx.load_cert_chain(certfile='server.crt', keyfile='server.key')
ssl_cx.load_verify_locations(cafile='client.crt')
# Python 3.7+ w/ OpenSSL 1.1.0g+, other versions may require a different
# method to set the TLS version - check the Python documentation
ssl_cx.maximum_version = ssl.TLSVersion.TLSv1_2

server = ae.start_server(("127.0.0.1", 11112), block=False, ssl_context=ssl_cx)

Expand Down
4 changes: 2 additions & 2 deletions pynetdicom/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@


# pynetdicom version
__version__ = "2.1.0.dev0"
__version__ = "2.1.0"

# DICOM Standard version used for SOP classes and instances
__dicom_version__: str = "2023e"
__dicom_version__: str = "2024b"

VERSION_PATTERN = r"""
v?
Expand Down
17 changes: 14 additions & 3 deletions pynetdicom/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ class PresentationContextTuple(NamedTuple):
(False, True): CONTEXT_REJECTED, # Invalid
},
}

# Transfer Syntaxes not in pydicom v2.4
_PYDICOM_ADDITIONS = [
"1.2.840.10008.1.2.4.201", # HTJ2KLossless
"1.2.840.10008.1.2.4.202", # HTJ2KLosslessRPCL
"1.2.840.10008.1.2.4.203", # HTJ2K
"1.2.840.10008.1.2.4.204", # JPIPHTJ2KReferenced
"1.2.840.10008.1.2.4.205", # JPIPHTJ2KReferencedDeflate
]

class PresentationContext:
"""A Presentation Context primitive.
Expand Down Expand Up @@ -282,10 +289,14 @@ def add_transfer_syntax(self, syntax: Union[None, str, bytes, UID]) -> None:
"A non-conformant UID has been added to 'transfer_syntax'"
)

if not syntax.is_private and not syntax.is_transfer_syntax:
if (
not syntax.is_private
and not syntax.is_transfer_syntax
and syntax not in _PYDICOM_ADDITIONS
):
LOGGER.warning(
"A UID has been added to 'transfer_syntax' that is not a "
"transfer syntax"
f"transfer syntax: '{syntax}'"
)

self._transfer_syntax.append(syntax)
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ include = [
"pynetdicom/tests/dicom_files/*",
"pynetdicom/apps/qrscp/default.ini",
"pynetdicom/py.typed",

"LICENCE",
]

Expand All @@ -40,7 +39,7 @@ maintainers = [
]
name = "pynetdicom"
readme = "README.rst"
version = "2.1.0.dev0"
version = "2.1.0"


[tool.poetry.dependencies]
Expand Down