Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 2.46 KB

README.md

File metadata and controls

81 lines (57 loc) · 2.46 KB

CTP Anonymiser Minimal

main pre-commit.ci status

A minimal re-packaging of the RSNA MIRC Clinical Trials Processor (CTP), mainly providing the DICOMAnonymizer class.

The majority of the package is built from the vendored sources, allowing dependencies to be updated freely. The remaining dependencies which are unavailable in source form are:

  • jai_imageio-1.2-pre-dr-b04.jar
  • pixelmed_codec.jar

These need to be installed separately in order to use the jars published by this repo.

Usage

First authenticate with GitHub packages by following this guide. Then add this package to your Maven pom.xml:

<dependency>
  <groupId>uk.ac.ed.epcc</groupId>
  <artifactId>ctpanonymiser_minimal</artifactId>
  <version>...</version>
</dependency>

Development

Building

This has only been tested on Linux so far.

Requirements:

  • Java 8 SDK
  • Maven
  • Ant

After cloning, run ./scripts/build/run-all.bash, which will pull-in the sources and create the src-generated directory.

Testing

There are 2 test suites:

  • tests contains some basic sanity checks against the src-generated classes. Run these with mvn test from the root dir
  • The integration directory contains a separate Maven project which pulls-in the built jar from the main code as a dependency. The tests in this project verify that the jar packaging is valid, and is where most new tests should be created. These can be run with mvn -f ./integration/pom.xml test
    • Note: Some LFS-tracked files are required to run these tests. First run git lfs pull

pre-commit

This repo uses pre-commit to manage and automatically run a series of linters and code formatters. After cloning the repo and changing into the directory, run this once to setup pre-commit.

$ pip install pre-commit
$ pre-commit install

This will then run the checks before every commit. It can also be run manually at any time:

$ pre-commit run [<hook>] (--all-files | --files <file list>)