Skip to content

Commit 116cc10

Browse files
committed
Centralize built_version_choices_list into version_info.py
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent b0a0d78 commit 116cc10

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

CONTRIBUTE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
1. After cloning this repository, ensure the CASE submodule is checked out. This can be done with either `git submodule init && git submodule update`, `make .git_submodule_init.done.log`, or `make check`.
77
2. Update the CASE submodule pointer to the new tagged release.
88
3. The version of CASE is also hard-coded in [`case_utils/ontology/version_info.py`](case_utils/ontology/version_info.py). Edit the variable `CURRENT_CASE_VERSION`.
9-
4. From the top source directory, run `make clean`. This guarantees a clean state of this repository as well as the ontology submodules.
10-
5. Still from the top source directory, run `make`.
11-
6. Any new `.ttl` files will be created under [`case_utils/ontology/`](case_utils/ontology/). Use `git add` to add each of them. (The patch-weight of these files could overshadow manual revisions, so it is fine to commit the built files after the manual changes are committed.)
9+
4. A list of built versions of CASE is also hard-coded in [`case_utils/ontology/version_info.py`](case_utils/ontology/version_info.py). Edit the variable `built_version_choices_list`.
10+
5. From the top source directory, run `make clean`. This guarantees a clean state of this repository as well as the ontology submodules.
11+
6. Still from the top source directory, run `make`.
12+
7. Any new `.ttl` files will be created under [`case_utils/ontology/`](case_utils/ontology/). Use `git add` to add each of them. (The patch-weight of these files could overshadow manual revisions, so it is fine to commit the built files after the manual changes are committed.)
1213

1314
Here is a sample sequence of shell commands to run the build:
1415

case_utils/case_sparql_construct/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ def main() -> None:
4242
else logging.INFO
4343
)
4444

45-
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
46-
4745
parser.add_argument("-d", "--debug", action="store_true")
4846
parser.add_argument(
4947
"--built-version",

case_utils/case_sparql_select/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def main() -> None:
5757
else logging.INFO
5858
)
5959

60-
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
61-
6260
parser.add_argument("-d", "--debug", action="store_true")
6361
parser.add_argument(
6462
"--built-version",

case_utils/case_validate/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ def main() -> None:
6363
else logging.INFO
6464
)
6565

66-
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
67-
6866
# Add arguments specific to case_validate.
6967
parser.add_argument(
7068
"-d", "--debug", action="store_true", help="Output additional runtime messages."

case_utils/ontology/version_info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121

2222
__version__ = "0.1.0"
2323

24-
__all__ = ["CURRENT_CASE_VERSION"]
24+
__all__ = ["CURRENT_CASE_VERSION", "built_version_choices_list"]
2525

2626
# Tested with CI to match versionInfo of <https://ontology.caseontology.org/case/case>.
2727
CURRENT_CASE_VERSION: str = "0.5.0"
2828

29+
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
2930

3031
def main() -> None:
3132
print(CURRENT_CASE_VERSION)

0 commit comments

Comments
 (0)