-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See #45
- Loading branch information
Showing
6 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
from semsql.builder.registry import registry_schema | ||
from semsql.builder.registry.registry_schema import (Makefile, MakefileRule, | ||
Ontology) | ||
Ontology, CompressionEnum) | ||
from semsql.utils.makefile_utils import makefile_to_string | ||
|
||
this_path = Path(__file__).parent | ||
|
@@ -137,6 +137,11 @@ def compile_registry(registry_path: str, local_prefix_file: TextIO = None) -> st | |
"unzip -p [email protected] {ont.zip_extract_file} " | ||
"> [email protected] && rm [email protected]" | ||
) | ||
elif ont.compression: | ||
if str(ont.compression) == str(CompressionEnum.gzip.text): | ||
command = f"curl -L -s {ont.url} | gzip -dc > [email protected]" | ||
else: | ||
raise ValueError(f"Unknown compression: '{ont.compression}'") | ||
else: | ||
command = f"curl -L -s {ont.url} > [email protected]" | ||
download_rule = MakefileRule( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters