From 079ba465e4f11101ba8055097f1b7b0bbdd78167 Mon Sep 17 00:00:00 2001 From: Mikejmnez Date: Wed, 10 Dec 2025 13:28:54 -0800 Subject: [PATCH 1/4] add readme --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c1ef6a --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +DAP4 SCHEMA +----------- + + +This repository contains the source dap4 schema and it can be used to: + +* Understand the scope of DAP4 +* Test to validate DMRs (dap4 xml metadata documents) +* Raise issues on the issue tracker + +## How to run tests + +This repository runs test on github workflows with every Pull Request. It is also possible to run tests locally. Do to so you need the following minimal requirements: + +* Python >= 3.11 +* lxml>=4.9.3 +* pytest>=7.0 +* Test .dmr files + +Before creating a new pull request, we recommend to run pre-commit locally. pre-commit can be installed as follows: + +``` +$ pip install pre-commit +$ pre-commit run -a +``` + +All test dmr files are located in the test directory: + +``` +$ tests/data/ +``` + +Tests will run to validate any .dmr in the above directory. Therefore to test whether a sample .dmr can be validated against the dap4 schema, simply add the test .dmr file into the above test directory. + +To run tests, simply execute: + +``` +$ pytest -v +``` + + + + + + From 6f3d74256505bb3ee2043549827f2db8476cbd0b Mon Sep 17 00:00:00 2001 From: Mikejmnez Date: Wed, 10 Dec 2025 13:36:27 -0800 Subject: [PATCH 2/4] format --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c1ef6a..663cbe9 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,17 @@ This repository contains the source dap4 schema and it can be used to: ## How to run tests -This repository runs test on github workflows with every Pull Request. It is also possible to run tests locally. Do to so you need the following minimal requirements: +This repository runs tests on github workflows with every Pull Request. It is also possible to run tests locally. To do so you will need to install the following (minimal) required python dependencies: * Python >= 3.11 * lxml>=4.9.3 * pytest>=7.0 -* Test .dmr files -Before creating a new pull request, we recommend to run pre-commit locally. pre-commit can be installed as follows: +and + +* Test .dmr files to validate. + +Before creating a new pull request, we recommend to run pre-commit locally for basic formatting. pre-commit can be installed as follows: ``` $ pip install pre-commit @@ -30,9 +33,9 @@ All test dmr files are located in the test directory: $ tests/data/ ``` -Tests will run to validate any .dmr in the above directory. Therefore to test whether a sample .dmr can be validated against the dap4 schema, simply add the test .dmr file into the above test directory. +Tests will run and attempt to validate any .dmr in the above directory. Therefore to test whether a sample .dmr can be validated against the dap4 schema, simply add the test .dmr file into the above test directory. -To run tests, simply execute: +To run tests simply execute: ``` $ pytest -v From b700abb5a64845da2e7552b6bd5ec7ff8a6bdc3f Mon Sep 17 00:00:00 2001 From: Mikejmnez Date: Wed, 10 Dec 2025 13:46:03 -0800 Subject: [PATCH 3/4] improve description --- README.md | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 663cbe9..12065c7 100644 --- a/README.md +++ b/README.md @@ -10,35 +10,45 @@ This repository contains the source dap4 schema and it can be used to: ## How to run tests -This repository runs tests on github workflows with every Pull Request. It is also possible to run tests locally. To do so you will need to install the following (minimal) required python dependencies: +This repository runs tests on github workflows with every Pull Request. It is also possible to run tests locally. To do so you will need to have Python >=3.11 and install the following (minimal) required python dependencies: -* Python >= 3.11 * lxml>=4.9.3 * pytest>=7.0 -and +You can install python packages via pip +``` +$ pip install +``` +or a package manager such as miniforge conda, pixi, etc. -* Test .dmr files to validate. +You will also need test dmr files to validate against. All test dmr files are located in the following test directory. -Before creating a new pull request, we recommend to run pre-commit locally for basic formatting. pre-commit can be installed as follows: ``` -$ pip install pre-commit -$ pre-commit run -a +$ tests/data/ ``` -All test dmr files are located in the test directory: +To run the tests execute the following command ``` -$ tests/data/ +$ pytest -v ``` -Tests will run and attempt to validate any .dmr in the above directory. Therefore to test whether a sample .dmr can be validated against the dap4 schema, simply add the test .dmr file into the above test directory. +Tests will run and attempt to validate any .dmr in the above `tests/data/` directory. Thus to test whether a sample `.dmr` can be validated against the dap4 schema, simply add the test `.dmr` file into the above test directory. + -To run tests simply execute: +## How to contribute +You can contribute by raising issues, with a short and clear description of the problem, the expected behavior, and include an example so that the issue/error can be reproduced. + +The issue will help us improve the dap4 schema if needed, or add a test that highlights the improper behavior. + +If a change is needed, create branch of the project, make a change to the spec, and include a test dmr that highlights the new behavior. + +Before creating a new pull request, always make sure tests pass locally and we recommend to run pre-commit locally for basic formatting. `pre-commit` can be installed as follows: ``` -$ pytest -v +$ pip install pre-commit +$ pre-commit run -a ``` @@ -46,3 +56,4 @@ $ pytest -v + From ab04f2f9e1bab28471f3569c548e56238d3dd74c Mon Sep 17 00:00:00 2001 From: Mikejmnez Date: Wed, 10 Dec 2025 13:48:43 -0800 Subject: [PATCH 4/4] add where dap4 schema is located in description --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12065c7..c79080c 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,13 @@ You can contribute by raising issues, with a short and clear description of the The issue will help us improve the dap4 schema if needed, or add a test that highlights the improper behavior. -If a change is needed, create branch of the project, make a change to the spec, and include a test dmr that highlights the new behavior. +If a change is needed, create branch of the project, make a change to the schema located in + +``` +$ dap4/dap4.xsd +``` + +and include a test `.dmr` that highlights the new behavior. Before creating a new pull request, always make sure tests pass locally and we recommend to run pre-commit locally for basic formatting. `pre-commit` can be installed as follows: