koronascript 0.2__tar.gz → 0.2.1__tar.gz

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.
@@ -54,7 +54,7 @@ class KoronaScript():
54
54
  cds.write(' </modules>\n')
55
55
  cds.write('</ModuleContainer>\n')
56
56
 
57
- def run(self, src, dst):
57
+ def run(self, src, dst, debug=False):
58
58
  '''Save the files (to /tmp?) and call Korona to execute them'''
59
59
  cfs, cfsname = tempfile.mkstemp(suffix='.cfs')
60
60
  cds, cdsname = tempfile.mkstemp(suffix='.cds')
@@ -77,9 +77,11 @@ class KoronaScript():
77
77
  for v in ['java.library.path', 'jna.library.path']:
78
78
  javaopts.append(f'-D{v}={libpath}')
79
79
 
80
- res = subprocess.run([java] + javaopts + ['no.imr.korona.main.KoronaCliMain', 'batch', '--cfs', cfsname, '--source', src, '--destination', dst])
81
- print(res.stdout)
80
+ cmd = [java] + javaopts + ['no.imr.korona.main.KoronaCliMain', 'batch', '--cfs', cfsname, '--source', src, '--destination', dst]
81
+ if debug: print('Running:\n ', cmd)
82
+ res = subprocess.run(cmd, capture_output=True, text=True)
83
+ if debug: print(res.stdout)
82
84
  if res.returncode != 0:
83
- print(f'Warning: Java subprocess returned error code {res.returncode}')
84
- print('Errors:')
85
- print(res.stderr)
85
+ err_str = f'Korona subprocess returned an error code: {res.returncode}\n' + '----------------------------------------\n' + res.stderr
86
+ raise Exception(err_str)
87
+ return res.returncode
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: koronascript
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: Wrapper around Korona modules for processing echosounder data
5
5
  Home-page: https://github.com/CRIMAC-WP4-Machine-learning/CRIMAC-KoronaScript
6
6
  Author: Ketil Malde
@@ -21,11 +21,16 @@ Download the appropriate version from here:
21
21
 
22
22
  https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-linux.zip
23
23
 
24
+ https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-linux.zip
25
+
24
26
  https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-windows.zip
25
27
 
26
- If you run linux you need to install the netcdf library separately:
28
+ https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-windows.zip
29
+
30
+ If you run linux you need to install the netcdf separately:
31
+
32
+ `apt-get install libnetcdf` or `sudo apt install libnetcdf-dev`
27
33
 
28
- `apt-get install libnetcdf`
29
34
 
30
35
  ### Add license
31
36
 
@@ -12,11 +12,16 @@ Download the appropriate version from here:
12
12
 
13
13
  https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-linux.zip
14
14
 
15
+ https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-linux.zip
16
+
15
17
  https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-windows.zip
16
18
 
17
- If you run linux you need to install the netcdf library separately:
19
+ https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-windows.zip
20
+
21
+ If you run linux you need to install the netcdf separately:
22
+
23
+ `apt-get install libnetcdf` or `sudo apt install libnetcdf-dev`
18
24
 
19
- `apt-get install libnetcdf`
20
25
 
21
26
  ### Add license
22
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: koronascript
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: Wrapper around Korona modules for processing echosounder data
5
5
  Home-page: https://github.com/CRIMAC-WP4-Machine-learning/CRIMAC-KoronaScript
6
6
  Author: Ketil Malde
@@ -21,11 +21,16 @@ Download the appropriate version from here:
21
21
 
22
22
  https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-linux.zip
23
23
 
24
+ https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-linux.zip
25
+
24
26
  https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-windows.zip
25
27
 
26
- If you run linux you need to install the netcdf library separately:
28
+ https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-windows.zip
29
+
30
+ If you run linux you need to install the netcdf separately:
31
+
32
+ `apt-get install libnetcdf` or `sudo apt install libnetcdf-dev`
27
33
 
28
- `apt-get install libnetcdf`
29
34
 
30
35
  ### Add license
31
36
 
@@ -5,7 +5,6 @@ KoronaScript/Configuration.py
5
5
  KoronaScript/KoronaModule.py
6
6
  KoronaScript/Modules.py
7
7
  KoronaScript/__init__.py
8
- configuration/korona-info.json
9
8
  koronascript.egg-info/PKG-INFO
10
9
  koronascript.egg-info/SOURCES.txt
11
10
  koronascript.egg-info/dependency_links.txt
@@ -1,5 +1,5 @@
1
1
  [flake8]
2
- ignore = E302,E501,E203
2
+ ignore = E302,E501,E203,E701
3
3
 
4
4
  [egg_info]
5
5
  tag_build =
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup
2
2
 
3
3
  setup(name='koronascript',
4
- version='0.2',
4
+ version='0.2.1',
5
5
  description='Wrapper around Korona modules for processing echosounder data',
6
6
  long_description=open('README.md').read(),
7
7
  long_description_content_type='text/markdown',