osducli 0.0.46__py3-none-any.whl → 0.0.48__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
osducli/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.48
@@ -50,6 +50,7 @@ MSG_PROMPT_WORKFLOW_URL = "\nWorkflow API path []: "
50
50
 
51
51
  MSG_PROMPT_DATA_PARTITION = "\nData partition name []: "
52
52
  MSG_PROMPT_LEGAL_TAG = "\nManifest legal tag []: "
53
+ MSG_PROMPT_OTHER_RELEVANT_DATA_COUNTRIES = "\nOther relevant data countries []: "
53
54
  MSG_PROMPT_ACL_VIEWER = "\nacl viewer []: "
54
55
  MSG_PROMPT_ACL_OWNER = "\nacl owner []: "
55
56
 
@@ -37,6 +37,7 @@ from osducli.commands.config.consts import (
37
37
  MSG_PROMPT_LEGAL_TAG,
38
38
  MSG_PROMPT_LEGAL_URL,
39
39
  MSG_PROMPT_MANAGE_GLOBAL,
40
+ MSG_PROMPT_OTHER_RELEVANT_DATA_COUNTRIES,
40
41
  MSG_PROMPT_REFRESH_TOKEN,
41
42
  MSG_PROMPT_SCHEMA_URL,
42
43
  MSG_PROMPT_SCOPES,
@@ -64,6 +65,7 @@ from osducli.config import (
64
65
  CONFIG_FILE_URL,
65
66
  CONFIG_LEGAL_TAG,
66
67
  CONFIG_LEGAL_URL,
68
+ CONFIG_OTHER_RELEVANT_DATA_COUNTRIES,
67
69
  CONFIG_REFRESH_TOKEN,
68
70
  CONFIG_SCHEMA_URL,
69
71
  CONFIG_SEARCH_URL,
@@ -277,6 +279,12 @@ def _configure_connection(config): # noqa C901
277
279
  CONFIG_LEGAL_TAG,
278
280
  fallback="opendes-public-usa-dataset-7643990",
279
281
  )
282
+ other_relevant_data_countries = _prompt_default_from_config(
283
+ MSG_PROMPT_OTHER_RELEVANT_DATA_COUNTRIES,
284
+ config,
285
+ CONFIG_OTHER_RELEVANT_DATA_COUNTRIES,
286
+ fallback="US",
287
+ )
280
288
  acl_viewer = _prompt_default_from_config(
281
289
  MSG_PROMPT_ACL_VIEWER,
282
290
  config,
@@ -320,6 +328,8 @@ def _configure_connection(config): # noqa C901
320
328
  config.set_value("core", CONFIG_DATA_PARTITION_ID, data_partition_id)
321
329
  if legal_tag != "":
322
330
  config.set_value("core", CONFIG_LEGAL_TAG, legal_tag)
331
+ if other_relevant_data_countries != "":
332
+ config.set_value("core", CONFIG_OTHER_RELEVANT_DATA_COUNTRIES, other_relevant_data_countries)
323
333
  if acl_viewer != "":
324
334
  config.set_value("core", CONFIG_ACL_VIEWER, acl_viewer)
325
335
  if acl_owner != "":
@@ -38,8 +38,6 @@ logger = get_logger(__name__)
38
38
  "-b",
39
39
  "--batch",
40
40
  help="Number of records to add per API call. If not specified records are uploaded as is.",
41
- is_flag=False,
42
- flag_value=200,
43
41
  type=int,
44
42
  default=None,
45
43
  show_default=True,
@@ -0,0 +1,13 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ """Wellbore DDMS Data Loader commands"""
@@ -0,0 +1,16 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ """Wellbore DDMS Data Loader constants"""
14
+
15
+ WBDUTIL_SERVICE_NAME = "Wellbore DDMS Data Loader"
16
+ WBDUTIL_DOCUMENTATION = "https://community.opengroup.org/osdu/ui/data-loading/wellbore-ddms-data-loader" # noqa: E501
@@ -0,0 +1,40 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ import json
13
+ import tempfile
14
+
15
+ from osducli.config import CLIConfig
16
+
17
+
18
+ def get_config_path(config: CLIConfig):
19
+ """
20
+ Takes a config object and writes a mapped config to a temporary JSON file.
21
+ Returns the path to the temp file.
22
+ """
23
+ output = {
24
+ "base_url": config.get('core', 'server'),
25
+ "data_partition_id": config.get('core', 'data_partition_id'),
26
+ "legal": {
27
+ "legaltags": [config.get('core', 'legal_tag')],
28
+ "otherRelevantDataCountries": [config.get('core', 'other_relevant_data_countries')],
29
+ "status": "compliant"
30
+ },
31
+ "data": {
32
+ "default": {
33
+ "viewers": [config.get('core', 'acl_viewer')],
34
+ "owners": [config.get('core', 'acl_owner')]
35
+ }
36
+ }
37
+ }
38
+ with tempfile.NamedTemporaryFile('w', delete=False, suffix='.json') as tmp:
39
+ json.dump(output, tmp, indent=4)
40
+ return tmp.name
@@ -0,0 +1,38 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Retrieve WellLog data from an OSDU instance and save to a LAS format file"""
13
+ import os
14
+
15
+ import click
16
+ from wbdutil.commands.download import download_las
17
+
18
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
19
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
20
+ from osducli.commands.wbdutil.config_file import get_config_path
21
+
22
+
23
+ # click entry point
24
+ @click.command(cls=CustomClickCommand, help="Download WellLog data to LAS file")
25
+ @click.option("-id", "--id", "_id", help="WellLog id to retrieve", required=True)
26
+ @click.option("-o", "--out", "_file", help="The output file path", required=True)
27
+ @click.option("-c", "--curves", "_curves", help="List of curves to retrieve, or none to get all curves", required=False)
28
+ @handle_cli_exceptions
29
+ @command_with_output(None)
30
+ def _click_command(state: State, _id: str, _file: str, _curves: list[str]):
31
+ client = CliOsduClient(state.config)
32
+ client.token_refresher.authorize()
33
+ token = client.token_refresher.access_token
34
+ config_path = get_config_path(state.config)
35
+ try:
36
+ download_las(_id, _file, token, config_path, _curves)
37
+ finally:
38
+ os.remove(config_path)
@@ -0,0 +1,13 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ """Wellbore DDMS Data Loader ingest commands"""
@@ -0,0 +1,37 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Write data from a LAS file to an existing WellLog"""
13
+ import os
14
+
15
+ import click
16
+ from wbdutil.commands.ingest import welllog_data
17
+
18
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
19
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
20
+ from osducli.commands.wbdutil.config_file import get_config_path
21
+
22
+
23
+ # click entry point
24
+ @click.command(cls=CustomClickCommand, help="Write data from a LAS file to an existing WellLog")
25
+ @click.option("-id", "--id", "_id", help="WellLog id to update", required=True)
26
+ @click.option("-p", "--path", "_path", help=" Path to a file or folder containing one or more LAS file(s)", required=True)
27
+ @handle_cli_exceptions
28
+ @command_with_output(None)
29
+ def _click_command(state: State, _id: str, _path: str):
30
+ client = CliOsduClient(state.config)
31
+ client.token_refresher.authorize()
32
+ token = client.token_refresher.access_token
33
+ config_path = get_config_path(state.config)
34
+ try:
35
+ welllog_data(_id, _path, token, config_path)
36
+ finally:
37
+ os.remove(config_path)
@@ -0,0 +1,37 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Ingest a LAS file (single) or directory of LAS files (bulk) into OSDU"""
13
+ import os
14
+
15
+ import click
16
+ from wbdutil.commands.ingest import wellbore
17
+
18
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
19
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
20
+ from osducli.commands.wbdutil.config_file import get_config_path
21
+
22
+
23
+ # click entry point
24
+ @click.command(cls=CustomClickCommand, help="Ingest LAS file(s) into OSDU")
25
+ @click.option("-p", "--path", "_path", help="Path and filename of a LAS file OR path to directory containing LAS and config files", required=True)
26
+ @click.option("--norecognize", "_no_recognize", help="If specified the application won't attempt to recognize the curve families.", is_flag=True, required=False)
27
+ @handle_cli_exceptions
28
+ @command_with_output(None)
29
+ def _click_command(state: State, _path: str, _no_recognize: bool = False):
30
+ client = CliOsduClient(state.config)
31
+ client.token_refresher.authorize()
32
+ token = client.token_refresher.access_token
33
+ config_path = get_config_path(state.config)
34
+ try:
35
+ wellbore(_path, token, config_path, _no_recognize)
36
+ finally:
37
+ os.remove(config_path)
@@ -0,0 +1,13 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ """Wellbore DDMS Data Loader list commands"""
@@ -0,0 +1,38 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """ Retrieve and print WellLog record from an OSDU instance"""
13
+
14
+ import os
15
+
16
+ import click
17
+ from wbdutil.commands.list_osdu import welllog_data
18
+
19
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
20
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
21
+ from osducli.commands.wbdutil.config_file import get_config_path
22
+
23
+
24
+ # click entry point
25
+ @click.command(cls=CustomClickCommand, help="Retrieve and print WellLog curve data")
26
+ @click.option("-id", "--id", "_id", help="WellLog id to retrieve", required=True)
27
+ @click.option("-c", "--curves", "_curves", help="List of curves to retrieve, or none to get all curves", required=False)
28
+ @handle_cli_exceptions
29
+ @command_with_output(None)
30
+ def _click_command(state: State, _id: str, _curves: list[str]):
31
+ client = CliOsduClient(state.config)
32
+ client.token_refresher.authorize()
33
+ token = client.token_refresher.access_token
34
+ config_path = get_config_path(state.config)
35
+ try:
36
+ return welllog_data(_id, token, config_path, _curves)
37
+ finally:
38
+ os.remove(config_path)
@@ -0,0 +1,38 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """ Retrieve and print WellLog record from an OSDU instance"""
13
+
14
+ import os
15
+
16
+ import click
17
+ from wbdutil.commands.list_osdu import welllog
18
+
19
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
20
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
21
+ from osducli.commands.wbdutil.config_file import get_config_path
22
+
23
+
24
+ # click entry point
25
+ @click.command(cls=CustomClickCommand, help="Retrieve and print Wellbore record")
26
+ @click.option("-id", "--id", "_id", help="Wellbore id to retrieve", required=True)
27
+ @click.option("--curveids", "_curveids", help="Show only the curve ids", is_flag=True, required=False)
28
+ @handle_cli_exceptions
29
+ @command_with_output(None)
30
+ def _click_command(state: State, _id: str, _curveids: bool = False):
31
+ client = CliOsduClient(state.config)
32
+ client.token_refresher.authorize()
33
+ token = client.token_refresher.access_token
34
+ config_path = get_config_path(state.config)
35
+ try:
36
+ return welllog(_id, token, config_path, _curveids)
37
+ finally:
38
+ os.remove(config_path)
@@ -0,0 +1,38 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """ Retrieve and print WellLog record from an OSDU instance"""
13
+
14
+ import os
15
+
16
+ import click
17
+ from wbdutil.commands.list_osdu import welllog
18
+
19
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
20
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
21
+ from osducli.commands.wbdutil.config_file import get_config_path
22
+
23
+
24
+ # click entry point
25
+ @click.command(cls=CustomClickCommand, help="Retrieve and print WellLog record")
26
+ @click.option("-id", "--id", "_id", help="WellLog id to retrieve", required=True)
27
+ @click.option("--curveids", "_curveids", help="Show only the curve ids", is_flag=True, required=False)
28
+ @handle_cli_exceptions
29
+ @command_with_output(None)
30
+ def _click_command(state: State, _id: str, _curveids: bool = False):
31
+ client = CliOsduClient(state.config)
32
+ client.token_refresher.authorize()
33
+ token = client.token_refresher.access_token
34
+ config_path = get_config_path(state.config)
35
+ try:
36
+ return welllog(_id, token, config_path, _curveids)
37
+ finally:
38
+ os.remove(config_path)
@@ -0,0 +1,13 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ """Wellbore DDMS Data Loader parse commands"""
@@ -0,0 +1,35 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Convert a LAS file to Wellbore and Well Log and write to JSON files"""
13
+
14
+ import os
15
+
16
+ import click
17
+ from wbdutil.commands.parse import convert
18
+
19
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
20
+ from osducli.cliclient import handle_cli_exceptions
21
+ from osducli.commands.wbdutil.config_file import get_config_path
22
+
23
+
24
+ # click entry point
25
+ @click.command(cls=CustomClickCommand, help="Convert a LAS file to Wellbore and WellLog and write to JSON files")
26
+ @click.option("-id", "--id", "_id", help="Record id to retrieve", required=True)
27
+ @click.option("-i", "--input", "_file", help="Path to a file or folder containing one or more LAS file(s)", required=True)
28
+ @handle_cli_exceptions
29
+ @command_with_output(None)
30
+ def _click_command(state: State, _id: str, _file: str):
31
+ config_path = get_config_path(state.config)
32
+ try:
33
+ return convert(_file, _id, config_path)
34
+ finally:
35
+ os.remove(config_path)
@@ -0,0 +1,27 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Print a LAS file header"""
13
+
14
+ import click
15
+ from wbdutil.commands.parse import printlas
16
+
17
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
18
+ from osducli.cliclient import handle_cli_exceptions
19
+
20
+
21
+ # click entry point
22
+ @click.command(cls=CustomClickCommand, help="Print a LAS file header")
23
+ @click.option("-i", "--input", "_file", help="Path and filename of a LAS file, or folder containing LAS files", required=True)
24
+ @handle_cli_exceptions
25
+ @command_with_output(None)
26
+ def _click_command(state: State, _file: str):
27
+ return printlas(_file)
@@ -0,0 +1,36 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Retrieve and print the ids of wellbores that match the specified name"""
13
+ import os
14
+
15
+ import click
16
+ from wbdutil.commands.search import wellbore_search
17
+
18
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
19
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
20
+ from osducli.commands.wbdutil.config_file import get_config_path
21
+
22
+
23
+ # click entry point
24
+ @click.command(cls=CustomClickCommand, help="Retrieve and print the ids of wellbores that match the specified name")
25
+ @click.option("-n", "--name", "_name", help="The wellbore name to search for", required=True)
26
+ @handle_cli_exceptions
27
+ @command_with_output(None)
28
+ def _click_command(state: State, _name: str):
29
+ client = CliOsduClient(state.config)
30
+ client.token_refresher.authorize()
31
+ token = client.token_refresher.access_token
32
+ config_path = get_config_path(state.config)
33
+ try:
34
+ return wellbore_search(_name, token, config_path)
35
+ finally:
36
+ os.remove(config_path)
@@ -0,0 +1,37 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License");
2
+ # you may not use this file except in compliance with the License.
3
+ # You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+ """Update an existing WellLog record"""
13
+ import os
14
+
15
+ import click
16
+ from wbdutil.commands.update import welllog
17
+
18
+ from osducli.click_cli import CustomClickCommand, State, command_with_output
19
+ from osducli.cliclient import CliOsduClient, handle_cli_exceptions
20
+ from osducli.commands.wbdutil.config_file import get_config_path
21
+
22
+
23
+ # click entry point
24
+ @click.command(cls=CustomClickCommand, help="Update an existing WellLog record")
25
+ @click.option("-id", "--id", "_id", help="Record id to update", required=True)
26
+ @click.option("--curvefam", "_curvefam", help="If true, recognize and update the curve families", is_flag=True, required=False)
27
+ @handle_cli_exceptions
28
+ @command_with_output(None)
29
+ def _click_command(state: State, _id: str, _curvefam: bool = False):
30
+ client = CliOsduClient(state.config)
31
+ client.token_refresher.authorize()
32
+ token = client.token_refresher.access_token
33
+ config_path = get_config_path(state.config)
34
+ try:
35
+ return welllog(_id, token, config_path, _curvefam)
36
+ finally:
37
+ os.remove(config_path)
osducli/config.py CHANGED
@@ -44,6 +44,7 @@ CONFIG_WELLBORE_DDMS_URL = "wellbore_ddms_url"
44
44
 
45
45
  CONFIG_DATA_PARTITION_ID = "data_partition_id"
46
46
  CONFIG_LEGAL_TAG = "legal_tag"
47
+ CONFIG_OTHER_RELEVANT_DATA_COUNTRIES = "other_relevant_data_countries"
47
48
  CONFIG_ACL_VIEWER = "acl_viewer"
48
49
  CONFIG_ACL_OWNER = "acl_owner"
49
50
 
osducli/version.py CHANGED
@@ -9,8 +9,10 @@
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and
11
11
  # limitations under the License.
12
+ import os
12
13
 
13
14
 
14
15
  def get_version():
15
- with open("VERSION") as fh:
16
+ version_file = os.path.join(os.path.dirname(__file__), "VERSION")
17
+ with open(version_file) as fh:
16
18
  return fh.read().strip()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osducli
3
- Version: 0.0.46
3
+ Version: 0.0.48
4
4
  Summary: OSDU command line
5
5
  Author-email: Equinor ASA <mhew@equinor.com>
6
6
  License-Expression: Apache-2.0
@@ -13,12 +13,14 @@ Classifier: Natural Language :: English
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Python: >=3.12
15
15
  Description-Content-Type: text/x-rst
16
+ License-File: LICENSE.md
16
17
  Requires-Dist: click
17
18
  Requires-Dist: jmespath
18
19
  Requires-Dist: osdu-api[common]==1.0.3
19
20
  Requires-Dist: requests
20
21
  Requires-Dist: tabulate
21
22
  Requires-Dist: packaging
23
+ Requires-Dist: wbdutil==0.1.1
22
24
  Requires-Dist: msal
23
25
  Requires-Dist: msal-extensions
24
26
  Requires-Dist: azure-identity
@@ -41,19 +43,13 @@ Requires-Dist: testfixtures; extra == "dev"
41
43
  Requires-Dist: setuptools; extra == "dev"
42
44
  Requires-Dist: tox; extra == "dev"
43
45
  Requires-Dist: docutils; extra == "dev"
46
+ Dynamic: license-file
44
47
 
45
48
  OSDU Command Line Interface
46
49
  ===========================
47
50
 
48
51
  Command-line interface for interacting with OSDU.
49
52
 
50
- NOTE: With version 0.0.45 and earlier the pip install command may need extra parameter since a dependency is not available from pypi.org:
51
-
52
- .. code-block:: bash
53
-
54
- pip install osducli --extra-index-url=https://community.opengroup.org/api/v4/projects/148/packages/pypi/simple
55
-
56
-
57
53
  Usage
58
54
  =====
59
55
 
@@ -79,6 +75,14 @@ For more information, specify the `-h` flag:
79
75
  Change Log
80
76
  ==========
81
77
 
78
+ 0.0.48
79
+ ------
80
+ - Added commands for wbdutil (Wellbore DDMS Data Loader)
81
+
82
+ 0.0.47
83
+ ------
84
+ - Maintenance release
85
+
82
86
  0.0.46
83
87
  ------
84
88
  - Simpler install command without extra-index-url
@@ -1,11 +1,12 @@
1
+ osducli/VERSION,sha256=QFCcUR32EpQ_Fv-h7hQuBlaPU04vEPOQ5TxCUdhmjaY,6
1
2
  osducli/__init__.py,sha256=J3RwqAbN7MWvz8vL24fMUar9Sfk8nMI8xq_aSHGXUy8,591
2
3
  osducli/__main__.py,sha256=4HonhahSaS3Un0f93qnbs_pmJ5pbbVHU-qdhsssVkB0,3661
3
4
  osducli/click_cli.py,sha256=EIe42DOnHDRKU3mPGwT12jI-yX3hsBOp_nS4nMTWc_Y,10864
4
5
  osducli/cliclient.py,sha256=u1pF5wYK1OmboGQld6cLsVXsSr0Fau000dZjvsW-yK0,13872
5
- osducli/config.py,sha256=lSDxp15JiJQ_J_YjdvI1q243uexzxZpXSYMsSgQIgdQ,7802
6
+ osducli/config.py,sha256=OSsUK2UNiEYL_ikpAKkJhpodxMYMw39mEhav5IoUfRo,7873
6
7
  osducli/log.py,sha256=a5pzV2QIOqFEWCGFj01FaZk9PEzMkAr6duHei_dCme8,1549
7
8
  osducli/state.py,sha256=b0GHH2oZ-4ogtmHenNkYwNRSE3OpSTL0XklbKVjUAKQ,3335
8
- osducli/version.py,sha256=pARJXagpA5pHAXYQnmOv3kjtYuOAXYmIEi3eWrobmvI,639
9
+ osducli/version.py,sha256=I8tEetbJZtyhZvVgLMOKwbOnBCKYEfpQlT0YcTP3nXc,722
9
10
  osducli/wbddms_client.py,sha256=ANzhNCQ7TkM2OiPy18w4bJgL8CmveteUXsiDjlQyNTw,2686
10
11
  osducli/auth/__init__.py,sha256=p2bZquIGOPfofHV6GIzWRUv_b9O_pIH5BTyv_gfQT6c,553
11
12
  osducli/auth/aws_token_credential.py,sha256=awKDU2nA3iGXYdIR1NTBk6z64ImIC7okfYr8x7FOM-s,2322
@@ -15,11 +16,11 @@ osducli/auth/msal_non_interactive.py,sha256=qgI1Gj0uZS5-ixypiV7fFY-hRo05SoZJB5YH
15
16
  osducli/auth/token_credential.py,sha256=kYYGWx8lH_s9eyD53McBzSa1vaCK7qhj20fUt2W2ZcA,3488
16
17
  osducli/commands/__init__.py,sha256=p2bZquIGOPfofHV6GIzWRUv_b9O_pIH5BTyv_gfQT6c,553
17
18
  osducli/commands/config/__init__.py,sha256=dueEKDys38kNW9E9NMK7CqOImEX_IsN0wcCK1rNQteU,576
18
- osducli/commands/config/consts.py,sha256=b4uA03wKOgTYTGfE6OyZZHhfvWnhLKgjdfnEJImNT3Q,2671
19
+ osducli/commands/config/consts.py,sha256=BkFGAGsrfV-5oZr9nRTUeTcdLzMg56FIT9_UM6p2Gsg,2753
19
20
  osducli/commands/config/default.py,sha256=AsQPb7mXrR2AivfYK2p0bUKKoraJg7JdJewhV7KwLMU,2243
20
21
  osducli/commands/config/info.py,sha256=YMY3XNbNfg3mwHHeJp8Mm1ktzDuipO8xIZhO_5gk1J0,2194
21
22
  osducli/commands/config/list.py,sha256=YyOPUhxx6QefqKU3ExLSrkMKS75Fa7gYbuHOOPwgx0M,2242
22
- osducli/commands/config/update.py,sha256=k4oK4RXuBENq4FlNsBSu-9BvjQ0NtioOfrkKaWeeX8g,11773
23
+ osducli/commands/config/update.py,sha256=9fmhuV5lQKqkxwO6PwMjObO6UVYW5TKS_fkZrjpVPg4,12213
23
24
  osducli/commands/crs/__init__.py,sha256=UzEngPBaTusYdj9JNPMAjg8fAczS1_dsG0Ti8CT19Lw,611
24
25
  osducli/commands/crs/_const.py,sha256=8QaIrpQxrebHJu0guwWgPWlw8mzLVcbXAzcri9e7jsk,1077
25
26
  osducli/commands/crs/areas.py,sha256=Rz4Sr_TecFC-jtWWfQ6WjAxsa3KFL59aRGeBnMexVZM,1265
@@ -74,7 +75,7 @@ osducli/commands/status/__init__.py,sha256=5g1PB_tU0sqP7aplnihjfhMzVVQdlB3Y01QIe
74
75
  osducli/commands/status/status.py,sha256=yh6KVUpNYbrLJIH-7GjMyo2MpR8Wvycr4KdkxUI1V5A,4543
75
76
  osducli/commands/storage/__init__.py,sha256=Ilc97Kje3VVLZIBJucd_2jsW1GF5En00xF-A6kiLAFM,585
76
77
  osducli/commands/storage/_const.py,sha256=a7oIWewDVdgbE1bHcg8QTQDppVT48pgP1Yl-l8tCRhs,847
77
- osducli/commands/storage/add.py,sha256=nDKP0490dU18Dtpaun3rluaCguJqtAFAxkS1P7WtG2Q,3386
78
+ osducli/commands/storage/add.py,sha256=a4KP-MK1KE02Cs0Io_bYbvBw_u6LD1SeIF0SF2e1zjU,3347
78
79
  osducli/commands/storage/delete.py,sha256=ryjrd24wiJlTAL6jIsTW1gCxB0icAMu0YIyUTx578h0,1613
79
80
  osducli/commands/storage/get.py,sha256=FgjoN_1cY90cbU1osh53XviGvTZaPtRjthUmtP2Y2-k,2136
80
81
  osducli/commands/storage/info.py,sha256=CGbA92GJYkWcLXHx1Z4i9g7Auk-ws2Cg6n6X7_m27iw,1345
@@ -86,6 +87,22 @@ osducli/commands/unit/info.py,sha256=3mAB14C5256cDQGR_pUbSpKXN-0ohA7gxqxwq4t4VP8
86
87
  osducli/commands/unit/list.py,sha256=-5yEk0RHNZudeaaRzzCQexUHR6kCYAzM60YaO0EujVI,1288
87
88
  osducli/commands/version/__init__.py,sha256=S8QUNV3WSGTJAWwzvPokDscvBP4m0BAwXV_JhSA0kD0,580
88
89
  osducli/commands/version/version.py,sha256=5Yc2e0IDlFJtbZvGWVSXFHBWtBO48K60KRZmpLGDjg4,4246
90
+ osducli/commands/wbdutil/__init__.py,sha256=jmG3Hw7UtR63wI2fCYhKgiLJrRXZChEnihA0VksUhb0,595
91
+ osducli/commands/wbdutil/_const.py,sha256=ImAh9YWr-Tf74FLBznE-bGf9E80LmDIMl-RAaAETeTU,767
92
+ osducli/commands/wbdutil/config_file.py,sha256=kO55D8nzmGm69gAltSWnlw5HmqxqkhzkYQQtECgtWCs,1492
93
+ osducli/commands/wbdutil/download.py,sha256=CZ_JRd9CgF2V0oWB7y-ul7mV2oo77LI-MipUDf94XQo,1723
94
+ osducli/commands/wbdutil/search.py,sha256=ULXh6cPmC34x0-FU66t9LsfhgRUH6Og5YQ_dazr33oQ,1531
95
+ osducli/commands/wbdutil/update.py,sha256=RizosFp3f1VOvvTGDL5QIkm9vdrcrR1PxsHssyKJY7s,1588
96
+ osducli/commands/wbdutil/ingest/__init__.py,sha256=thFrBRB9zrW3c-LrmGhCFa5i24_cTVTbFLcdBkNtORI,602
97
+ osducli/commands/wbdutil/ingest/data.py,sha256=ZTb2qvlT5kwaUUGTtpzpuSGqqXm6EkJboRskDWqZXv8,1602
98
+ osducli/commands/wbdutil/ingest/wellbore.py,sha256=dh7x2kUeHH75LW2B1bOCmWV4xzZOkZmG-ck_ag6WF7g,1728
99
+ osducli/commands/wbdutil/list/__init__.py,sha256=C8Yz3XlhSN1sV_Lpjt-h49DhK551zVz25iKuWacN78s,600
100
+ osducli/commands/wbdutil/list/curves.py,sha256=wXzOF1Cfx7YXj35i2O5UsA-yYC984Kj-xB5FiXwXF10,1618
101
+ osducli/commands/wbdutil/list/wellbore.py,sha256=VuOXqiC6-3vL97OoMxYj-5cuoWuei6gHLJ_bztCmdvo,1595
102
+ osducli/commands/wbdutil/list/welllog.py,sha256=fTCNqiL9DSD6TU3RQubp6chzbU1FcO1VtaDEie_wSfg,1593
103
+ osducli/commands/wbdutil/parse/__init__.py,sha256=fgdJNGYpGQpPwCZbqfCR5t1WlB11HZ71-ykDcwfb-sA,601
104
+ osducli/commands/wbdutil/parse/convert.py,sha256=DuGHrkQZFGZl3eoy3DulI-jvPtQckqAc7FO7zlq-_e0,1485
105
+ osducli/commands/wbdutil/parse/print.py,sha256=9uATb2efh38Hj5aLiw1ZC5zFCoEGJyshnO8haXTKJ6k,1114
89
106
  osducli/commands/wellbore_ddms/__init__.py,sha256=AvXe60cTMl2ptWH6-wjaODGpzOiQazUJ05yrBkSlXYo,583
90
107
  osducli/commands/wellbore_ddms/_const.py,sha256=XP4Cc19vBVG88N5qXDvPFhJEtSD4vKw05lnEwDTKRqM,1084
91
108
  osducli/commands/wellbore_ddms/info.py,sha256=Jeyt0uFpyWBKY9jAZK1AJUXiwgPhm0cPyagfwmRYFYQ,1417
@@ -110,8 +127,9 @@ osducli/util/file.py,sha256=kfh6SLOI7X54gZ0hWF3kQ1npXPylNYgE1d1_w-fFyr0,1821
110
127
  osducli/util/prompt.py,sha256=0i3eNnxOHRQstvsvfiKnN0lIxXu6sEXIcU8txeYRhNs,7492
111
128
  osducli/util/pypi.py,sha256=-DW5CThkKKiOwLp2tg85BmrLKZzkMI9pu8DyWNPZH6E,1192
112
129
  osducli/util/service_info.py,sha256=YsVvoRoeG1osFjql2AgVkGoj1TePuhBZf3CQXl2a9As,2577
113
- osducli-0.0.46.dist-info/METADATA,sha256=YJ52g3cj_dupREqcePeYVd1wr_XnriE6e1t0qMKj3w8,6213
114
- osducli-0.0.46.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
115
- osducli-0.0.46.dist-info/entry_points.txt,sha256=gASIcihV0BSJDZOUK-zTzb8RiccZCvKfVZMna9RsEIg,47
116
- osducli-0.0.46.dist-info/top_level.txt,sha256=lqiP5fuyH8lx7c2emYoIVZNxZAPX-bSwnMH789wxUAY,8
117
- osducli-0.0.46.dist-info/RECORD,,
130
+ osducli-0.0.48.dist-info/licenses/LICENSE.md,sha256=9xnGPjJkOAgd0kH4QLlvOIYKqY1M49gWUQpoUxAU-9Y,12788
131
+ osducli-0.0.48.dist-info/METADATA,sha256=trNPJ9A9g6b8DhVKQn1CqnnkFucTWw1TzEP6gxP0Ox0,6121
132
+ osducli-0.0.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
133
+ osducli-0.0.48.dist-info/entry_points.txt,sha256=gASIcihV0BSJDZOUK-zTzb8RiccZCvKfVZMna9RsEIg,47
134
+ osducli-0.0.48.dist-info/top_level.txt,sha256=lqiP5fuyH8lx7c2emYoIVZNxZAPX-bSwnMH789wxUAY,8
135
+ osducli-0.0.48.dist-info/RECORD,,
@@ -0,0 +1,231 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2021 Open Subsurface Data Universe Software / Platform / Data Flow / Data Loading
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+ --------------------------------------------------------------------------------
204
+
205
+ The files (license_verify.py, prompt.py, config.py, state.py, help_text_test.py,
206
+ test_prompt.py) are based upon code from https://github.com/Microsoft/knack and
207
+ are based upon the following license:
208
+
209
+ Copyright (c) Microsoft Corporation
210
+
211
+ All rights reserved.
212
+
213
+ MIT License
214
+
215
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
216
+ this software and associated documentation files (the ""Software""), to deal in
217
+ the Software without restriction, including without limitation the rights to
218
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
219
+ of the Software, and to permit persons to whom the Software is furnished to do
220
+ so, subject to the following conditions:
221
+
222
+ The above copyright notice and this permission notice shall be included in all
223
+ copies or substantial portions of the Software.
224
+
225
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
226
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
227
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
228
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
229
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
230
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
231
+ SOFTWARE.