Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
* release/0.2.0: (80 commits)
  Bump version: 0.2.1-dev -> 0.2.1
  Bump version: 0.2.0 -> 0.2.1-dev
  Upload Pipfile.lock and docs.
  Add releasing checklist.
  Bump version: 0.2.0-dev -> 0.2.0
  Bump version: 0.1.5-dev -> 0.2.0-dev
  Fix Makefile to install dicom3tools on Linux.
  Handle no patient_birthdate better.
  Migrate to importlib.resources.
  Update lock.
  Update codes from ADA-1107.
  Sync with ADA-1107
  Add day MeasurementUnitsCodeSequence.
  Remove commented code.
  Add Longitudinal Termporal Event and Offset.
  Fix modifiers which were using body structures.
  Add UTF-8 Charachter set.
  Fix problems with Windows.
  Update SNOMED codes.
  update codes from ada-1107
  ...
  • Loading branch information
zgypa committed Aug 23, 2023
2 parents e4ce41e + 823ad2d commit 4e8aabd
Show file tree
Hide file tree
Showing 30 changed files with 1,469 additions and 1,193 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
commit = True
tag = True
tag_name = v{new_version}
current_version = 0.1.5
current_version = 0.2.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
message = Bump version: {current_version} -> {new_version}
serialize =
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build
*.pyc
*.egg-info
*.dcm
modules/dicom3tools
76 changes: 3 additions & 73 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
disable=
raw-checker-failed,
bad-inline-option,
locally-disabled,
Expand All @@ -78,67 +69,6 @@ disable=print-statement,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -584,5 +514,5 @@ min-public-methods=2

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
73 changes: 73 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

MAIN = dicom4ortho
D3TOOLS_DIR = modules/dicom3tools
D3TOOLS_VERSION = 1.00.snapshot.20230225185712
D3TOOLS_BASE_URL = https://www.dclunie.com/dicom3tools/workinprogress/macexe/dicom3tools_
D3TOOLS_FILE = dicom3tools.zip

ifeq ($(OS),Windows_NT)
D3TOOLS_URL = $(D3TOOLS_BASE_URL)winexe_$(D3TOOLS_VERSION).zip
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
D3TOOLS_URL = $(D3TOOLS_BASE_URL)macexe_$(D3TOOLS_VERSION).zip
endif
endif

DIST = ./dist


LINTER = $$(which pylint) --errors-only


.PHONY: lint
lint:
$(LINTER) setup.py
$(LINTER) $(MAIN)

.PHONY: test
test: install-dev
python3 -m unittest

.PHONY: clean
clean:
rm -rf $(DIST)
echo "Cleaned up $(DIST) folder."
rm -rf *.egg-info
echo "Removed all .egg-info files."
rm -f test/resources/*.dcm
echo "Removed *.dcm files in test/resources."
find . -path "*/__pycache*" -delete
echo "Deleted all __pycache files."
rm -rf $(D3TOOLS_DIR)

$(DIST):
mkdir $@

.PHONY: build
build: lint test $(DIST)
python3 -m setup sdist

.PHONY: deploy
deploy:
echo "Deplyoing to PyPi."
echo "To deploy, make sure you have a token saved in ~/.pypirc . See https://pypi.org/manage/account/token/?selected_project=dicom4ortho"
python3 -m twine upload --repository pypi dist/*

.PHONY: all
all: clean build

.PHONY: install-dev
install-dev: $(D3TOOLS_DIR)
ifeq ($(UNAME_S),Linux)
install-dev:
sudo apt-get -y install dicom3tools
rm -f $(D3TOOLS_DIR)/dciodvfy
ln -s /usr/bin/dciodvfy $(D3TOOLS_DIR)
else
install-dev:
cd $(D3TOOLS_DIR) && curl $(D3TOOLS_URL) -o $(D3TOOLS_FILE) && unzip $(D3TOOLS_FILE) && rm $(D3TOOLS_FILE)
endif

$(D3TOOLS_DIR):
mkdir -p $@
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
wrapt = "*"
pylint = "*"
twine = "*"
autopep8 = "*"
Expand All @@ -18,6 +19,7 @@ dicom-photo = {path = ".", editable = true}
# There is a vulnerability flaw in <1.26.5 of urllib3.
urllib3 = ">=1.26.5"
sphinx = "*"
numpy = "*"

[requires]
python_version = "3"
Loading

0 comments on commit 4e8aabd

Please sign in to comment.