|
1 | | -# opensource-repo |
2 | | -This repository is the recommended template repository for NIST opensource contributions. |
| 1 | +# CASE Python Utilities |
| 2 | + |
| 3 | +This project provides various specialized utilities for producing data in the [CASE](https://caseontology.org/) format. |
| 4 | + |
| 5 | + |
| 6 | +## Disclaimer |
| 7 | + |
| 8 | +Participation by NIST in the creation of the documentation of mentioned software is not intended to imply a recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that any specific software is necessarily the best available for the purpose. |
| 9 | + |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +1. Clone this repository. |
| 14 | +2. (Optional) Create and activate a virtual environment. |
| 15 | +3. Run `python setup.py`. |
| 16 | + |
| 17 | +Installation is demonstrated in the `.venv.done.log` target of the [`tests/`](tests/) directory. |
| 18 | + |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | + |
| 23 | +### `case_file` |
| 24 | + |
| 25 | +To characterize a file, including hashes: |
| 26 | + |
| 27 | +```bash |
| 28 | +case_file sample.txt.json sample.txt |
| 29 | +``` |
| 30 | + |
| 31 | +To characterize a file, but skip hashing it: |
| 32 | + |
| 33 | +```bash |
| 34 | +case_file --disable-hashes sample.txt.json sample.txt |
| 35 | +``` |
| 36 | + |
| 37 | + |
| 38 | +### `local_uuid` |
| 39 | + |
| 40 | +This [module](case_utils/local_uuid.py) provides a wrapper UUID generator, `local_uuid()`. Its main purpose is making example data generate consistent identifiers, and intentionally includes mechanisms to make it difficult to activate this mode without awareness of the caller. |
| 41 | + |
| 42 | + |
| 43 | +## Development status |
| 44 | + |
| 45 | +This repository follows [CASE community guidance on describing development status](https://caseontology.org/resources/software.html#development_status), by adherence to noted support requirements. |
| 46 | + |
| 47 | +The status of this repository is: |
| 48 | + |
| 49 | +4 - Beta |
| 50 | + |
| 51 | + |
| 52 | +## Versioning |
| 53 | + |
| 54 | +This project follows [SEMVER 2.0.0](https://semver.org/) where versions are declared. |
| 55 | + |
| 56 | + |
| 57 | +## Ontology versions supported |
| 58 | + |
| 59 | +This repository supports the ontology versions that are linked as submodules in the [CASE Examples QC](https://github.com/ajnelson-nist/CASE-Examples-QC) repository. Currently, the ontology versions are: |
| 60 | + |
| 61 | +* CASE - 0.3.0 |
| 62 | +* UCO - 0.5.0 |
| 63 | + |
| 64 | + |
| 65 | +## Repository locations |
| 66 | + |
| 67 | +This repository is available at the following locations: |
| 68 | +* [https://github.com/casework/CASE-Utilities-Python](https://github.com/casework/CASE-Utilities-Python) |
| 69 | +* [https://github.com/usnistgov/CASE-Utilities-Python](https://github.com/usnistgov/CASE-Utilities-Python) (a mirror) |
| 70 | + |
| 71 | +Releases and issue tracking will be handled at the [casework location](https://github.com/casework/CASE-Utilities-Python). |
| 72 | + |
| 73 | + |
| 74 | +## Make targets |
| 75 | + |
| 76 | +Some `make` targets are defined for this repository: |
| 77 | +* `check` - Run unit tests. |
| 78 | +* `clean` - Remove test build files, but not downloaded files. |
| 79 | +* `download` - Download files sufficiently to run the unit tests offline. This will *not* include the ontology repositories tracked as submodules. Note if you do need to work offline, be aware touching the `setup.cfg` file in the project root directory, or `tests/requirements.txt`, will trigger a virtual environment rebuild. |
0 commit comments