From 72c7f33fe8ae8c039e4ac10cc55cfe2828be830e Mon Sep 17 00:00:00 2001 From: mgrani Date: Fri, 7 Jun 2024 09:06:00 +0200 Subject: [PATCH 1/5] change metadata extraction from title supports multiple title formats. Consequence: more robustness when using lexishttp@ --- owilix/cli.py | 9 ++++++--- owilix/core/manager.py | 2 +- owilix/core/metadata.py | 14 +++++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/owilix/cli.py b/owilix/cli.py index 8640e99..a9dbab4 100644 --- a/owilix/cli.py +++ b/owilix/cli.py @@ -158,15 +158,18 @@ def clean(ctx): """ if os.path.exists('.env'): os.remove('.env') - ctx.obj["CONSOLE"].print("'.env' file has been removed. Login should work again.") + ctx.obj["CONSOLE"].print("Cleaning '.env': file has been removed. Login should work again.") else: - ctx.obj["CONSOLE"].print("No '.env' file found. Ensure you're running this command in the correct directory.") + ctx.obj["CONSOLE"].print("Cleaning '.env': file not found. Running commands from this directory is fine now.") _tknname = os.path.join(os.path.expanduser('~'),".tokens_lxs") if os.path.exists(_tknname): os.remove(_tknname) - ctx.obj["CONSOLE"].print(f"{_tknname} file has been removed.") + ctx.obj["CONSOLE"].print(f"Cleaning {_tknname}: file has been removed.") + else: + ctx.obj["CONSOLE"].print(f"Cleaning {_tknname}: file not found.") + ctx.obj["CONSOLE"].print(f"Cleaning done.") @click.command(help='shows log files') @click.argument('module', default="lexis", required=True) diff --git a/owilix/core/manager.py b/owilix/core/manager.py index 8f6a477..8d64fd9 100644 --- a/owilix/core/manager.py +++ b/owilix/core/manager.py @@ -429,7 +429,7 @@ class OWIlixConfig: "default": { "showfields":"", "nodisplay":"compression,encryption,contributor,path,metadataSource,description,"+ - "publicationYear,provenance,owner,publisher,creator,resourceTypeGeneral,[A-Z]+.*," + "publicationYear,provenance,owner,publisher,creator,resourceTypeGeneral,[A-Z]+.*,containerIcon,containerParams," "rights,rightsURI,workflowEx_id,workflow_id", "sort":"+startDate", "colorder":"internalID,title,startDate,endDate,dataCenter", diff --git a/owilix/core/metadata.py b/owilix/core/metadata.py index 5e33647..6878f20 100644 --- a/owilix/core/metadata.py +++ b/owilix/core/metadata.py @@ -228,10 +228,14 @@ def format_metadata(metadata): metadata[key] = metadata[key].format_map(SafeTemplateDict(**metadata)) return metadata -def extract_metadata_from_title(title, pattern =None): - if pattern is None: - pattern = r"OWI-Open Web Index-(?P[^.]+)\.(?P[^@]+)@(?P[^-]+)-(?P\d{4}-\d{1,2}-\d{1,2}):(?P\d{4}-\d{1,2}-\d{1,2})" - match = re.match(pattern, title) +def extract_metadata_from_title(title:str, patterns:list =None): + if patterns is None: + patterns = [r"OWI-Open Web Index-(?P[^.]+)\.(?P[^@]+)@(?P[^-]+)-(?P\d{4}-\d{1,2}-\d{1,2}):(?P\d{4}-\d{1,2}-\d{1,2})", + r"OWI-Open Web Index-(?P[^.]+)\.(?P[^@]+)@(?P[^-]+)-(?P\d{4}-\d{1,2}-\d{1,2})"] + match = None + for pattern in patterns: + match = re.match(pattern, title) + if match is not None: break if match: # Convert date string to individual components @@ -246,7 +250,7 @@ def extract_metadata_from_title(title, pattern =None): metadata['resourceType'] = "UNKOWN" if 'resourceType' not in metadata else metadata['resourceType'] metadata['dataCenter'] = "UNKOWN" if 'dataCenter' not in metadata else metadata['dataCenter'] metadata['startDate'] = "1973-1-1" if 'startDate' not in metadata else metadata['startDate'] - metadata['endDate'] = "1973-1-1" if 'endDate' not in metadata else metadata['endDate'] + metadata['endDate'] = metadata['startDate'] if 'endDate' not in metadata else metadata['endDate'] metadata['publicationYear'] = "1973" if 'publicationYear' not in metadata else metadata['publicationYear'] return metadata -- 2.51.2 From 51ae9ff5fe062d163cd7ef769b0b37c5857ace50 Mon Sep 17 00:00:00 2001 From: mgrani Date: Fri, 7 Jun 2024 09:13:58 +0200 Subject: [PATCH 2/5] fixed error in query not being and for all keys. Missing keys are interpreted as false. --- owilix/core/metadata.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/owilix/core/metadata.py b/owilix/core/metadata.py index 6878f20..bb08096 100644 --- a/owilix/core/metadata.py +++ b/owilix/core/metadata.py @@ -425,16 +425,17 @@ class Dataset: # query filter if query is not None and query != {}: def matches_query(_d): + _all = [] for key, value in query.items(): regex = key.endswith("*") key = key if not regex else key[:-1] - if not hasattr(_d, key): continue + if not hasattr(_d, key): _all.append(False) if not regex: - return getattr(_d, key) == value + _all.append(getattr(_d, key) == value) else: - return re.match(value, getattr(_d,key)) + _all.append(re.match(value, getattr(_d,key))) - return True + return all(_all) _datasets = [_d for _d in _datasets if matches_query(_d)] -- 2.51.2 From 209ecff56fad6ed1f2094df66914cb4d646259ab Mon Sep 17 00:00:00 2001 From: mgrani Date: Fri, 7 Jun 2024 09:14:13 +0200 Subject: [PATCH 3/5] readme updated --- Readme.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Readme.md b/Readme.md index ae4182f..34a24af 100644 --- a/Readme.md +++ b/Readme.md @@ -280,10 +280,12 @@ A demonstration is available via this [screencast demo](https://syncandshare.lrz - `poetry add --group dev sphinx myst-parser ` - `poetry run sphinx-build -b html docs/source/ docs/build/html` - [Git Log message conventions](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) using -Type Section -add Added -fix Fixed -change Changed -remove Removed -merge Merged -doc Documented \ No newline at end of file + + | Type | Section | + |---------|-------------| + | add | Added | + | fix | Fixed | + | change | Changed | + | remove | Removed | + | merge | Merged | + | doc | Documented | -- 2.51.2 From a627ba89e155cc426e9c013f290e5f4ff716e107 Mon Sep 17 00:00:00 2001 From: mgrani Date: Fri, 7 Jun 2024 12:05:24 +0200 Subject: [PATCH 4/5] added config commands and changed metdata field provenance to a list --- CHANGELOG.md | 18 +---- Readme.md | 11 +++ owilix/cli.py | 1 + owilix/cmd/base.py | 1 + owilix/cmd/config.py | 23 +++++- owilix/cmd/local.py | 2 +- owilix/core/manager.py | 18 ++++- owilix/core/metadata.py | 2 +- owilix/core/utils.py | 166 +++++++++++++++++++++++++++++++++++++++- 9 files changed, 217 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27121a1..61127f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,30 +6,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [v0.5.0]() - 2024-06-07 -[Compare with latest]() - - -## [v0.4.3]() - 2024-06-03 - -[Compare with v0.4.2]() +[Compare with 0.4.0]() ### Features - inserting datasets loally from path ([a3ef490](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/a3ef490eaf6826427c852ff8e16f352d9d530ee7) by Michael Granitzer). - -## [v0.4.2]() - 2024-06-01 - -[Compare with v0.4.1]() - -### Features - - loca/remote diffs between datasets and files ([8f9af3d](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/8f9af3d66e0f081fa2df9a5e789545c28f448b01) by Michael Granitzer). - added regexp based query in specifier. Field needs to end with * ([e0da862](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/e0da862019593b3853b2035a607b1b865f75c058) by Michael Granitzer). - improved control over displayed columns and sort order ([b90ff3f](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/b90ff3f5999cd20c8a4b04a7f762ef0067cf4108) by Michael Granitzer). -## [v0.4.1]() - 2024-05-31 +## [0.4.0]() - 2024-05-20 [Compare with 0.2.0]() diff --git a/Readme.md b/Readme.md index 34a24af..cc6d843 100644 --- a/Readme.md +++ b/Readme.md @@ -200,6 +200,17 @@ e.g. owilix --loglevel DEBUG remote ls all/access=public;subResourceType*=.*parq.* ``` +### Configuration + +`owilix` also supports configuration via command line. +Using `owilix config set key=value key2=value` or `owilix config get key key2` for getting or setting config keys. +Keys have the format `key1.key2#4.key3` where `#k` indicates a position in a list (with -1 being append) + +```bash +owilix config set "user.name=Michael Granitzer" "user.email=michael.granitzer@uni-passau.de" "user.organistion=University of Passau" +owilix config get user.name user.email user.organistion +``` + ### Using the `LexisHTTP` repository `owilix` is primarily using direct file based repositories, particulalry iRODS. However this requires non-default ports to be open, which can cause problems in non-standard environments. diff --git a/owilix/cli.py b/owilix/cli.py index a9dbab4..6176f16 100644 --- a/owilix/cli.py +++ b/owilix/cli.py @@ -82,6 +82,7 @@ def cli(ctx, profile, showfields, nodisplay, sort, colorder, target, yes, verbo ctx.obj['VERBOSE'] = verbose ctx.obj['SLICE'] = slice ctx.obj["log_level"]= get_log_level(loglevel) + ctx.obj["owilix_config"] = config remotes, local = config.get_repositories(remote=remotes.split(",") if remotes is not None else None) ctx.obj['OWI'] = OWIlixManager(target, diff --git a/owilix/cmd/base.py b/owilix/cmd/base.py index f4485e7..8dc5783 100644 --- a/owilix/cmd/base.py +++ b/owilix/cmd/base.py @@ -106,6 +106,7 @@ class BaseCommand(metaclass=SubCommandMeta): self._target = kwargs["TARGET"] self.autoyes = kwargs["AUTOYES"] self.table_fmt= kwargs.get("TABLEFMT", "psql") + self.oconfig = kwargs["owilix_config"] def split_list(item): return [s.strip() for s in item.split(",")] if item is not None and item!="" else [] diff --git a/owilix/cmd/config.py b/owilix/cmd/config.py index 4375cfe..0301f94 100644 --- a/owilix/cmd/config.py +++ b/owilix/cmd/config.py @@ -31,8 +31,25 @@ def set(self, *args, **kwargs): sets the metadata for the dataset at the provided path. path must start with irods:// """ # instantiate sessions here - pass -def get(self, *args): - pass + for k,v in kwargs.items(): + self.oconfig.add_config(k,v) + self.console.print(f"Written {k}={v}") + self.oconfig.save_config() + self.console.print("Config saved") + +@ConfigCommands.register +def get(self, *args, **kwargs): + """ + shows the value for the provided keys in the metadata. Key format is key.key.key#item + + """ + _r = [] + for k in args: + _r.append({ + "key": k, + "value": self.oconfig.get_config(k) + }) + self.show_table(_r, order=["key", "value"]) + diff --git a/owilix/cmd/local.py b/owilix/cmd/local.py index 6862365..33a3474 100644 --- a/owilix/cmd/local.py +++ b/owilix/cmd/local.py @@ -159,7 +159,7 @@ def insert(self, path, access="public", collectionName="userslice", internalID=N _metadata.update(_inferred) else: _metadata["access"],_metadata["collectionName"] = access, collectionName - _metadata["provenance"] = "owi://import" + _metadata["provenance"] = [f"owi://{self.oconfig.get_config('user.name')}@import"] # 1. correct metadta if necessary if not self.autoyes: _metadata = input_dict(_metadata, title="Modify Dataset Metadata", diff --git a/owilix/core/manager.py b/owilix/core/manager.py index 8d64fd9..2423304 100644 --- a/owilix/core/manager.py +++ b/owilix/core/manager.py @@ -16,8 +16,12 @@ from owilix.core.metadata import fill_metadata, validate_metadata from owilix.core.repository import LEXISIrodsRepository, LocalRepository, AggregatedRepository, HttpLexisRepository import os import shutil +import getpass from datetime import datetime +from owilix.core.utils import dict_multi_key_add, dict_multi_key_get + + def rotate_log_file(filename, max_size = 500 * 1024 ): if os.path.isfile(filename): @@ -360,13 +364,13 @@ class OWIlixConfig: pass #validate(instance=config, schema=self.schema) def add_config(self, key: str, value: Any) -> None: - """Add a new configuration entry.""" - self.config[key] = value + """Add a new configuration entry using a multi key approach, i.e. key.key#positioin.key=value.""" + self.config = dict_multi_key_add(self.config, key, value) self.validate_config(self.config) def get_config(self, key: str) -> Any: """Get a configuration value by key.""" - return self.config.get(key) + return dict_multi_key_get(self.config, key) def get_repositories(self, remote=None, local=None): repo_cfg =self.config.get("repositories",{}) @@ -387,7 +391,8 @@ class OWIlixConfig: return self.config.get("theme",{}) def get_default(self, target)-> Dict[str, Any]: - default_cfg = defaultdict(dict) + default_cfg = {} + default_cfg["repositories"]={} default_cfg["repositories"]["config"] = {"it4i": { "repository": "lexis", "options": { @@ -445,4 +450,9 @@ class OWIlixConfig: "warning": "magenta", "danger": "bold red" } + default_cfg["user"]= { + "name" : getpass.getuser(), + "email": "", + "organisattion": "" + } return default_cfg diff --git a/owilix/core/metadata.py b/owilix/core/metadata.py index bb08096..a6a245f 100644 --- a/owilix/core/metadata.py +++ b/owilix/core/metadata.py @@ -62,7 +62,7 @@ schema = { "rightsIdentifier": SchemaEntry(str, "OWIL V1.0"), "rightsURI": SchemaEntry(list, ["https://ows.eu/owil/current"]), "publication": SchemaEntry(str, "https://doi.org/10.1002/asi.24818"), - "provenance": SchemaEntry(str, os.getlogin() + " at " + platform.system()), + "provenance": SchemaEntry(list, [os.getlogin() + " at " + platform.system()]), "license": SchemaEntry(str, "https://ows.eu/owil/current"), "dataCenter": SchemaEntry(str, "unknown", ["lrz", "it4i", "csc", "unknown"]), "collectionName": SchemaEntry(str, "userslice"), diff --git a/owilix/core/utils.py b/owilix/core/utils.py index 774d9e8..cc5ae6e 100644 --- a/owilix/core/utils.py +++ b/owilix/core/utils.py @@ -204,4 +204,168 @@ def check_server(host, port, timeout=30): return True, "success" finally: # Close the socket - sock.close() \ No newline at end of file + sock.close() + +def dict_multi_key_add(di, key, value): + """ + Parses a configuration key and value into a nested dictionary structure. + + The key is specified in a dot-separated syntax where each segment represents a + nested dictionary level. If a segment contains a `#k` notation, it indicates + a list index where the value should be placed. The index `k` can be `-1` to append + the value at the end of the list. + + Parameters: + key (str): A string representing the nested configuration key. + - Use dot (`.`) to separate dictionary levels. + - Use `#k` to specify list insertion at index `k`: + - `k >= 0`: Places the value at index `k` in the list. + - `k = -1`: Appends the value to the list. + value (any): The value to be inserted into the dictionary structure. + + Returns: + dict: A nested dictionary that represents the parsed configuration. + + Examples: + --------- + 1. Basic Dictionary Insertion: + key = "a.b.c" + value = "hello" + result = parse_config(key, value) + print(result) # Output: {'a': {'b': {'c': 'hello'}}} + + 2. List Insertion at Specific Index: + key = "x.y.z#2" + value = 42 + result = parse_config(key, value) + print(result) # Output: {'x': {'y': {'z': [None, None, 42]}}} + + 3. List Insertion at End (Append): + key = "m.n#-1" + value = "world" + result = parse_config(key, value) + print(result) # Output: {'m': {'n': ['world']}} + + 4. Combining Dictionaries and Lists: + key = "a.b#1.c" + value = "test" + result = parse_config(key, value) + print(result) # Output: {'a': {'b': [None, {'c': 'test'}]}} + + Implementation Details: + ---------------------- + The function uses a recursive helper function `insert_into_dict` to navigate + and build the nested structure. If a key segment indicates a list (contains `#`), + it manages the list's creation and insertion logic accordingly. + + """ + def insert_into_dict(d, keys, val): + """ + Recursive helper function to insert value into the nested dictionary or list. + """ + key = keys[0] + if len(keys) == 1: + if '#' in key: + # Handling list case + key, index = key.split('#') + index = int(index) + if key not in d: + d[key] = [] + # Ensure the list is long enough + while len(d[key]) <= index: + d[key].append(None) + if index == -1: + d[key].append(val) + else: + d[key][index] = val + else: + d[key] = val + else: + if '#' in key: + # Handling list case for intermediate keys + key, index = key.split('#') + index = int(index) + if key not in d: + d[key] = [] + while len(d[key]) <= index: + d[key].append({}) + if index == -1: + d[key].append({}) + index = len(d[key]) - 1 + if not isinstance(d[key][index], dict): + d[key][index] = {} + insert_into_dict(d[key][index], keys[1:], val) + else: + if key not in d: + d[key] = {} + insert_into_dict(d[key], keys[1:], val) + + # Split the key into components + keys = key.split('.') + insert_into_dict(di, keys, value) + return di + + +def dict_multi_key_get(config, key): + """ + Retrieves the value from a nested dictionary structure using a dot-separated key syntax. + + The key can include list indices specified by `#k` where `k` is the index in the list. + + Parameters: + config (dict): The nested dictionary from which to retrieve the value. + key (str): A string representing the nested key. + - Use dot (`.`) to separate dictionary levels. + - Use `#k` to specify list index at level `k`. + + Returns: + any: The value from the dictionary corresponding to the specified key. + + Raises: + KeyError: If the key does not exist in the dictionary. + IndexError: If the list index is out of range. + + Examples: + --------- + config = { + "a": { + "b": { + "c": [None, None, "value"] + } + } + } + + 1. Basic Dictionary Access: + key = "a.b.c#2" + result = get_value_from_config(config, key) + print(result) # Output: "value" + + 2. Accessing Nested Dictionaries: + key = "a.b" + result = get_value_from_config(config, key) + print(result) # Output: {'c': [None, None, 'value']} + + 3. Accessing List Element: + key = "a.b.c#0" + result = get_value_from_config(config, key) + print(result) # Output: None + + Implementation Details: + ---------------------- + The function splits the key by dots and iteratively navigates through the + dictionary and lists as specified by each segment. + """ + keys = key.split('.') + current = config + + for k in keys: + if '#' in k: + key_part, index_part = k.split('#') + index = int(index_part) + current = current[key_part] + current = current[index] + else: + current = current[k] + + return current + -- 2.51.2 From d9ad3b0c4edff66aa5047018a9f701d32efcca94 Mon Sep 17 00:00:00 2001 From: mgrani Date: Fri, 7 Jun 2024 12:21:12 +0200 Subject: [PATCH 5/5] poetry problems --- CHANGELOG.md | 72 ++++++++++++++++++++++++++++++++++++++++++---- build.sh | 6 ++-- owilix/_version.py | 2 +- pyproject.toml | 11 +------ 4 files changed, 72 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61127f5..991c9ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,23 +5,85 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## Unreleased + +[Compare with latest]() + +### Added + +- added config commands and changed metdata field provenance to a list ([a627ba8](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/a627ba89e155cc426e9c013f290e5f4ff716e107) by mgrani). + ## [v0.5.0]() - 2024-06-07 [Compare with 0.4.0]() -### Features +### Added + +- added loging of commands and reading out different log files via ([02d1479](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/02d14796809cafaa93350692a6d55aa0106d59a9) by Michael Granitzer). +- added HTTPLexisRepository as backup in case irods ports are closed. However, only works for pull / ls. ([99e65ef](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/99e65efafc25d5671d116fa88ab7a5a163a8fe06) by Michael Granitzer). +- add pyyaml as dependency for configuration file ([9b32fa9](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/9b32fa98f913d7ebcc54c6e2c8a2d1ad27ab7e3b) by Michael Granitzer). +- added relatedSoftware and alternateIdentifier to metadata ([63c551f](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/63c551ffd140d41f7a16c84f8ac09c9a5eef8606) by Michael Granitzer). +- added configuration of client zones and zones for enabling federated access to irods zones ([0a50067](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/0a500679950f157211ea3c405a7b5741d084e758) by Michael Granitzer). +- added --log_level flag. You can now get all Debug information by using `--log_level=DEBUG` ([2ca2f5a](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/2ca2f5a9c793d43596419a45e0af629300e0b8f3) by Michael Granitzer). +- added "owilix" logger ([b918f4f](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/b918f4f8b3b04e6b679d6fad5fa04111949879b1) by Michael Granitzer). +- add doctor command for checking network connnections configured ([aa0afd4](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/aa0afd45ae9f0e8cf1ba793555cbedd5026824e8) by Michael Granitzer). +- added versionoing ([63377ff](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/63377ff0b49b5239f3bf7b8b04e6078aaf356183) by Michael Granitzer). +- added admin set_irods_metadata command ([45910b5](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/45910b5655ae3df3ff313414943df5f1e46d9ee3) by mgrani). +- added prepration flag ([82b5171](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/82b5171d619ed433f5d274329a89e15a838c8abb) by mgrani). + +### Fixed + +- fixed error in query not being and for all keys. Missing keys are interpreted as false. ([51ae9ff](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/51ae9ff5fe062d163cd7ef769b0b37c5857ace50) by mgrani). +- fix of a bug on date based selection. ([bc7a1f9](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/bc7a1f993bb88e4d4228d76ffe345395c12f3c51) by Michael Granitzer). +- fix dataset creation which is public requires list of rightsURI and list of rights ([3d3107e](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/3d3107e55734b4af788481128a692b10153647ae) by mgrani). +- fix small bug in pushing to remote ([78114bb](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/78114bb026a759308bd7d78756da85432c345819) by Michael Granitzer). + +### Changed -- inserting datasets loally from path ([a3ef490](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/a3ef490eaf6826427c852ff8e16f352d9d530ee7) by Michael Granitzer). -- loca/remote diffs between datasets and files ([8f9af3d](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/8f9af3d66e0f081fa2df9a5e789545c28f448b01) by Michael Granitzer). -- added regexp based query in specifier. Field needs to end with * ([e0da862](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/e0da862019593b3853b2035a607b1b865f75c058) by Michael Granitzer). -- improved control over displayed columns and sort order ([b90ff3f](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/b90ff3f5999cd20c8a4b04a7f762ef0067cf4108) by Michael Granitzer). +- change metadata extraction from title supports multiple title formats. Consequence: more robustness when using lexishttp@ ([72c7f33](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/72c7f33fe8ae8c039e4ac10cc55cfe2828be830e) by mgrani). +- change ! flag --exclude changed to --remotes ([deeaf68](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/deeaf68dd9928047181dec3214ef75d64b5b3e23) by Michael Granitzer). +- change config being stored in yaml ([0f55b49](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/0f55b492de9386a13ea3700fd826a68cb3fd97d8) by Michael Granitzer). ## [0.4.0]() - 2024-05-20 [Compare with 0.2.0]() +### Added + +- added bug in pulling datasets ([86e10a0](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/86e10a038c43e6dd6f959aecaad37a0fe3a6abf7) by mgrani). +- added dataset creation and metadta admin panel which metadata chekc. Bot incomplete, since server api is not working properly ([e559d6b](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/e559d6bfdcee85d8dbda93d22f5acc14f8ecdedf) by mgrani). +- added metadata management; added create v0.01 ([40912de](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/40912de7a5367a94e35b0fba623e37f78bb7272c) by mgrani). +- added todo ([b4da4fa](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/b4da4fa43cea51622b693b660790373c00ca0530) by mgrani). +- added documentatoin ([76df3e9](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/76df3e9ab33fb171d638cb4226f5d1c9e123b9ed) by mgrani). +- added first sql template mechanisms plus scripts ([dd7df70](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/dd7df7015a59b0093fa219a0c9b643cf7900fc45) by mgrani). + +### Removed + +- removed path from stats ([cc400d6](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/cc400d6891d3ec346b62ad23ab4ee52cab45576e) by Michael Granitzer). + ## [0.2.0]() - 2024-05-09 [Compare with first commit]() +### Added + +- added duckdb shell ([e068e76](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/e068e76fca3503d127b9ce258d5bcaa47138d65c) by Michael Granitzer). +- added duckdb plugin (first test); changed download to thread based download ([ad7d3bc](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/ad7d3bc26f1000dc7ec77c934f25f55fbc1d36ec) by Michael Granitzer). +- added optional duckdb dependency ([b0590ce](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/b0590ce5b62d036c8dcae79ffdc0a255a1f0dcd2) by Michael Granitzer). +- added local commands;swithc to poetry;first build ([564e437](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/564e4377c43c05cf2cea1383bb00aaee9fd55a49) by Michael Granitzer). +- added plugin for testing ([0072b4a](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/0072b4af71a31d16a17a0db9479b27a36c9db85c) by Michael Granitzer). +- added field list for showing dataset dataframe; first version for extract tar.gz file ([d001e67](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/d001e67d0886e8420b4df471ebcfca9f7df74f45) by Michael Granitzer). +- added more verbose messages in pull ([79b07c6](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/79b07c6a9a88a788176c220966959693655e182a) by Michael Granitzer). +- added command line option for default path ([a604506](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/a60450609d9c15101f1d08a644cc8f139f6639b1) by Michael Granitzer). +- added openwebsearch/py4lexis as submodule; update readme and test ([fa36598](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/fa36598886c5a1ce8e7d2c66ce57196f8de64892) by mgrani). +- added username /pwd configuration via Enviornment Variables LEXIS_USERNAME and LEXIS_PASSWORD ([093ef31](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/093ef31eac636b235695a4e6365b712995ee3919) by mgrani). +- added git modules ([2f7a8eb](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/2f7a8eb0764770f18733dc96290f00adc917b3ab) by mgrani). +- added howto for getting account password ([db0a408](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/db0a408e00400060045d0d619d7b58d2e4430c78) by mgrani). + +### Removed + +- Removed submodule ([4d2deb1](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/4d2deb1da4e7aaecf9a250d035f1d88a0e2dd42e) by Michael Granitzer). +- removed Py4Lexis in order to fork the repo ([55a61ef](https://opencode.it4i.eu/openwebsearcheu-public/owi-cli/commit/55a61efc30458fd7901e1c78c78561b95ba4808c) by mgrani). + diff --git a/build.sh b/build.sh index 4efcee7..25aeb07 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -python update_version.py -poetry run git-changelog -s fix,feat,chore -poetry build \ No newline at end of file +poetry run git-changelog +poetry build +python update_version.py \ No newline at end of file diff --git a/owilix/_version.py b/owilix/_version.py index da2df8a..6c8e6b9 100644 --- a/owilix/_version.py +++ b/owilix/_version.py @@ -1 +1 @@ -__version__ = "0.4.3-post.1+ec08289" +__version__ = "0.0.0" diff --git a/pyproject.toml b/pyproject.toml index a770ad6..4a63814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "owilix" -version = "0.0.0.post70.dev0+79ef75e" +version = "0.0.0" description = "OWILIX - the Command Line Interface for slicing and consuming the Open Web Index. " authors = ["Michael Granitzer "] license = "MIT" @@ -55,15 +55,6 @@ update_version = "update_version:main" [tool.git-changelog] repository = "." -convention = "angular" template = "keepachangelog" output = "CHANGELOG.md" -sections = [ - { name = "Features", labels = ["enhancement", "feature", "feat", "feat:"] }, - { name = "Bug Fixes", labels = ["bug", "fix", "fix:"] }, - { name = "Documentation", labels = ["documentation"] }, - { name = "Maintenance", labels = ["chore", "chore:"] }, - { name = "Refactor", labels = ["refactor"] }, -{ name = "Added", labels = ["add", "added"] } - ] -- 2.51.2