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

Update to Orthanc 1.12.3 and Python Plugin 4.2 #64

Merged
merged 4 commits into from
Jun 5, 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
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ new_patient = pyorthanc.Patient(job.content['ID'], client)

## Notes on versioning

The `Orthanc` and `AsyncOrthanc` classes are generated from `https://api.orthanc-server.com/`.
The `Orthanc` and `AsyncOrthanc` classes are generated from https://orthanc.uclouvain.be/api/.

Compatibility of versions between PyOrthanc and the Orthanc REST API are the following.
Note that recent PyOrthanc versions will likely support older Orthanc version.

| PyOrthanc version | Generated from |
|-------------------|-----------------------------------------------|
| \>= 1.13.2 | Orthanc API 1.12.1 with Python Plugin 4.1 |
| \>= 1.17.0 | Orthanc API 1.12.3 with Python Plugin 4.2 |
| 1.13.2 to 1.16.1 | Orthanc API 1.12.1 with Python Plugin 4.1 |
| 1.13.0, 1.13.1 | Orthanc API 1.12.1 with Python Plugin 4.0 |
| 1.12.* | Orthanc API 1.12.1 |
| 1.11.* | Orthanc API 1.11.3 |
| 0.2.* | Provided Google sheet from Orthanc maintainer |


You can still use the old client with
You can still use the old client implementation with
```python
from pyorthanc.deprecated.client import Orthanc # Old client wrote by hand
from pyorthanc.deprecated.client_1_11_3 import Orthanc
```

Note that due to automatic generation some method names may be less clear.
Expand Down Expand Up @@ -133,3 +133,7 @@ You can contribute to this project with the following steps:
5. Once done, `git add`, `git commit` and `git push` the changes.
6. Make a Pull Request from your branch to the https://github.com/gacou54/pyorthanc.

### Run tests
```shell
docker compose run --build test
```
3 changes: 1 addition & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.3'
services:
orthanc1:
build:
Expand All @@ -10,7 +9,7 @@ services:
depends_on:
- orthanc2
orthanc2:
image: jodogne/orthanc:1.12.1
image: orthancteam/orthanc:24.5.1
test:
build:
context: .
Expand Down
2 changes: 1 addition & 1 deletion pyorthanc/_resources/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def get_content_by_tag(self, tag: str) -> Any:
Any
Content corresponding to specified tag.
"""
result = self.client.get_instances_id_content_tags_path(id_=self.id_, tags_path=tag)
result = self.client.get_instances_id_content_path(id_=self.id_, path=tag)

try:
return result.decode('utf-8').strip().replace('\x00', '')
Expand Down
Loading
Loading