SimbioReader 0.6.1__tar.gz → 0.6.5__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.
Files changed (32) hide show
  1. {simbioreader-0.6.1/src/SimbioReader.egg-info → simbioreader-0.6.5}/PKG-INFO +23 -17
  2. {simbioreader-0.6.1 → simbioreader-0.6.5}/README.md +7 -2
  3. simbioreader-0.6.5/pyproject.toml +106 -0
  4. simbioreader-0.6.5/src/SimbioReader/__main__.py +4 -0
  5. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/cli.py +24 -8
  6. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/constants.py +1 -1
  7. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/filters.py +13 -1
  8. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/filters_tools.py +6 -4
  9. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/simbioInfo.py +1 -1
  10. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/sr.py +411 -238
  11. simbioreader-0.6.5/src/SimbioReader/tools.py +145 -0
  12. simbioreader-0.6.1/PKG-INFO +0 -219
  13. simbioreader-0.6.1/pyproject.toml +0 -60
  14. simbioreader-0.6.1/setup.cfg +0 -4
  15. simbioreader-0.6.1/src/SimbioReader/__main__.py +0 -860
  16. simbioreader-0.6.1/src/SimbioReader/tools.py +0 -149
  17. simbioreader-0.6.1/src/SimbioReader/version.py +0 -167
  18. simbioreader-0.6.1/src/SimbioReader.egg-info/SOURCES.txt +0 -27
  19. simbioreader-0.6.1/src/SimbioReader.egg-info/dependency_links.txt +0 -1
  20. simbioreader-0.6.1/src/SimbioReader.egg-info/entry_points.txt +0 -3
  21. simbioreader-0.6.1/src/SimbioReader.egg-info/requires.txt +0 -9
  22. simbioreader-0.6.1/src/SimbioReader.egg-info/top_level.txt +0 -1
  23. simbioreader-0.6.1/test/test_db.py +0 -60
  24. simbioreader-0.6.1/test/test_new_format.py +0 -99
  25. simbioreader-0.6.1/test/test_tools.py +0 -19
  26. {simbioreader-0.6.1 → simbioreader-0.6.5}/LICENSE +0 -0
  27. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/__init__.py +0 -0
  28. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/exceptions.py +0 -0
  29. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/infocli.py +0 -0
  30. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/phases.py +0 -0
  31. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/subphases.py +0 -0
  32. {simbioreader-0.6.1 → simbioreader-0.6.5}/src/SimbioReader/tests.py +0 -0
@@ -1,32 +1,31 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.6.1
3
+ Version: 0.6.5
4
4
  Summary: Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo
5
- Author-email: Romolo Politi <Romolo.Politi@inaf.it>
6
- Project-URL: Repository, https://github.com/SIMBIO-SYS/SimbioReader
5
+ License-File: LICENSE
7
6
  Keywords: data reader,Space Mission,BepiColombo,SIMBIO-SYS
7
+ Author: Romolo Politi
8
+ Author-email: Romolo.Politi@inaf.it
9
+ Requires-Python: >=3.14, <4.0
8
10
  Classifier: Programming Language :: Python :: 3.11
9
11
  Classifier: Programming Language :: Python :: 3.12
10
12
  Classifier: Programming Language :: Python :: 3.13
11
13
  Classifier: Programming Language :: Python :: 3.14
12
14
  Classifier: Development Status :: 4 - Beta
13
- Requires-Python: >=3.11
15
+ Requires-Dist: importlib-metadata (>=8.7.0,<9.0.0)
16
+ Requires-Dist: mystrtools (>=0.1.0,<0.2.0)
17
+ Requires-Dist: numpy (>=2.3.3,<3.0.0)
18
+ Requires-Dist: pandas (>=3.0.1,<4.0.0)
19
+ Requires-Dist: pillow (>=12.0.0,<13.0.0)
20
+ Requires-Dist: rich-click (>=1.8.9,<2.0.0)
21
+ Requires-Dist: semantic-version-tools (>=1.4.1,<2.0.0)
22
+ Requires-Dist: update-checker (>=0.18.0,<0.19.0)
23
+ Project-URL: Repository, https://github.com/SIMBIO-SYS/SimbioReader
14
24
  Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- Requires-Dist: numpy<3.0.0,>=2.3.3
17
- Requires-Dist: pandas<3.0.0,>=2.3.2
18
- Requires-Dist: rich-click<2.0.0,>=1.8.9
19
- Requires-Dist: update-checker<0.19.0,>=0.18.0
20
- Requires-Dist: importlib-metadata<9.0.0,>=8.7.0
21
- Requires-Dist: pillow<13.0.0,>=12.0.0
22
- Provides-Extra: docs
23
- Requires-Dist: sphinx; extra == "docs"
24
- Dynamic: license-file
25
-
26
- ![Version 0.6.1](https://img.shields.io/badge/version-0.6.1-blue?style=plastic)
25
+
26
+ ![Version 0.6.5](https://img.shields.io/badge/version-0.6.5-blue?style=plastic)
27
27
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
28
28
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
29
- [![Upload Python Package](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml)
30
29
  [![SimbioReader Test](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/test.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/test.yml)
31
30
  [![Documentation Status](https://readthedocs.org/projects/simbioreader/badge/?version=latest)](https://simbioreader.readthedocs.io/en/latest/?badge=latest)
32
31
 
@@ -45,6 +44,12 @@ To install the reader you can use the command:
45
44
  $ python3 -m pip install SimbioReader
46
45
  ```
47
46
 
47
+ or using poetry
48
+
49
+ ```console
50
+ $ poetry add SimbioReader
51
+ ```
52
+
48
53
  ## Usage
49
54
 
50
55
  The package contain a class that read and decode the SIMBIO-SYS image
@@ -217,3 +222,4 @@ will show the test with the name that contain the string *hric functional* perfo
217
222
  ```python
218
223
  dat.Show()
219
224
  ```
225
+
@@ -1,7 +1,6 @@
1
- ![Version 0.6.1](https://img.shields.io/badge/version-0.6.1-blue?style=plastic)
1
+ ![Version 0.6.5](https://img.shields.io/badge/version-0.6.5-blue?style=plastic)
2
2
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
3
3
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
4
- [![Upload Python Package](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/python-publish.yml)
5
4
  [![SimbioReader Test](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/test.yml/badge.svg)](https://github.com/SIMBIO-SYS/SimbioReader/actions/workflows/test.yml)
6
5
  [![Documentation Status](https://readthedocs.org/projects/simbioreader/badge/?version=latest)](https://simbioreader.readthedocs.io/en/latest/?badge=latest)
7
6
 
@@ -20,6 +19,12 @@ To install the reader you can use the command:
20
19
  $ python3 -m pip install SimbioReader
21
20
  ```
22
21
 
22
+ or using poetry
23
+
24
+ ```console
25
+ $ poetry add SimbioReader
26
+ ```
27
+
23
28
  ## Usage
24
29
 
25
30
  The package contain a class that read and decode the SIMBIO-SYS image
@@ -0,0 +1,106 @@
1
+ [project]
2
+ name = "SimbioReader"
3
+ version = "0.6.5"
4
+ description="Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo"
5
+ dependencies = [
6
+
7
+ "numpy (>=2.3.3,<3.0.0)",
8
+ "pandas (>=3.0.1,<4.0.0)",
9
+ "rich-click (>=1.8.9,<2.0.0)",
10
+ "update-checker (>=0.18.0,<0.19.0)",
11
+ "importlib-metadata (>=8.7.0,<9.0.0)",
12
+ "pillow (>=12.0.0,<13.0.0)",
13
+ "semantic-version-tools (>=1.4.1,<2.0.0)",
14
+ "mystrtools (>=0.1.0,<0.2.0)",
15
+ ]
16
+ requires-python = ">=3.14, <4.0"
17
+
18
+ authors = [{name="Romolo Politi", email ="Romolo.Politi@inaf.it" }]
19
+
20
+ readme = "README.md"
21
+
22
+ keywords = ["data reader", "Space Mission", "BepiColombo", "SIMBIO-SYS"]
23
+ classifiers = [
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Programming Language :: Python :: 3.14",
28
+ "Development Status :: 4 - Beta",
29
+
30
+ ]
31
+
32
+
33
+
34
+ [project.urls]
35
+ Repository = "https://github.com/SIMBIO-SYS/SimbioReader"
36
+
37
+
38
+ [project.scripts]
39
+ simbioReader = "SimbioReader.cli:cli"
40
+ simbioInfo = "SimbioReader.infocli:cli"
41
+
42
+
43
+
44
+
45
+ [tool.poetry]
46
+ packages =[
47
+ {include ="SimbioReader", from ="src"}]
48
+
49
+
50
+
51
+ [build-system]
52
+ requires = ["poetry-core>=2.0.0"]
53
+ build-backend = "poetry.core.masonry.api"
54
+ [dependency-groups]
55
+ test = [
56
+ "pytest (>=9.0.2,<10.0.0)",
57
+ "pytest-cov (>=7.0.0,<8.0.0)"
58
+ ]
59
+ devel = [
60
+ "ruff (>=0.15.4,<0.16.0)",
61
+ "pyright (>=1.1.408,<2.0.0)"
62
+ ]
63
+
64
+ [tool.pytest.ini_options]
65
+ markers = [
66
+ "caldb: mark a test as a caldb test",
67
+ "config: mark a test as a config test",
68
+ "pipeline: mark a test as a pipeline test",
69
+ "pipeline_L0: mark a test as a pipeline L0 test",
70
+ "pipeline_step: mark a test as a pipeline step test"
71
+ ]
72
+ addopts = [
73
+ "--basetemp=/tmp/pytest",
74
+ "--verbosity=3",
75
+ "--tb=line",
76
+ "--capture=sys",
77
+ "--show-capture=all",
78
+ "--cov=SimbioReader",
79
+ "--cov-report=term",
80
+ "--cov-report=html:coverage/coverage_html",
81
+ "--cov-report=xml:coverage/coverage.xml",
82
+ "--cov-report=json:coverage/coverage.json"
83
+
84
+
85
+ ]
86
+ testpaths=[
87
+ "test/"
88
+ ]
89
+ log_file = "output/log/pytest_log.log"
90
+ log_file_level = "DEBUG"
91
+
92
+ log_file_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
93
+
94
+ log_file_date_format = "%Y-%m-%d %H:%M:%S"
95
+ pythonpath = ["."]
96
+
97
+ [tool.coverage.run]
98
+ branch=true
99
+ omit=["test/*","./prova.py"]
100
+
101
+ [tool.pyright]
102
+ pythonVersion = "3.14"
103
+ typeCheckingMode = "basic"
104
+ include = ["src"]
105
+ venvPath = "/home/romolo/Documenti/Progetti/SIMBIO-SYS/Software/SimbioReader"
106
+ venv = "venv"
@@ -0,0 +1,4 @@
1
+ from SimbioReader.cli import cli
2
+
3
+ if __name__ == "__main__":
4
+ cli()
@@ -1,11 +1,19 @@
1
1
  from rich.console import Console
2
- from SimbioReader.sr import SimbioReader, version
2
+ from SimbioReader.sr import SimbioReader,version
3
3
  import rich_click as click
4
- from SimbioReader.constants import CONTEXT_SETTINGS,datamodel
4
+ from SimbioReader.constants import CONTEXT_SETTINGS,datamodel, progEpilog
5
5
  from rich_click import rich_config
6
+ from pathlib import Path
7
+ # from semantic_version_tools import Vers
8
+ # from importlib.metadata import version as get_version
6
9
 
7
10
 
8
11
 
12
+ __version__ = version.full()
13
+
14
+ click.rich_click.USE_RICH_MARKUP = True
15
+ click.rich_click.FOOTER_TEXT = progEpilog
16
+
9
17
  def sh_version(ctx, self, value):
10
18
  """Display version and exit"""
11
19
  console = Console()
@@ -16,17 +24,25 @@ def sh_version(ctx, self, value):
16
24
 
17
25
  @click.command(context_settings=CONTEXT_SETTINGS)
18
26
  @rich_config(help_config={'header_text': f"SIMBIO-SYS Data Reader, version [blue]{version.short()}[/blue]"})
19
- @click.argument('file', type=click.Path(exists=True), required=True)
27
+ @click.argument('file', type=click.Path(exists=True,path_type=Path), required=True)
20
28
  @click.option('--hk', is_flag=True, help='Show the HouseKeeping', default=False)
21
29
  @click.option('--detector', is_flag=True, help='Show the Detector', default=False)
22
30
  @click.option('--data-structure', is_flag=True, help='Show the Data Structure', default=False)
23
31
  @click.option('--all', 'all_info', is_flag=True, help='Show all the information', default=False)
24
- @click.option('--filter', 'filter_flag', is_flag=True, help='Show the filters for the given channel', default=False)
32
+ @click.option('--filters', 'filter_flag', is_flag=True, help='Show the filters for the given channel', default=False)
25
33
  @click.option('-d', '--debug', is_flag=True, help='Debug mode', default=False)
26
34
  @click.option('-v', '--verbose', is_flag=True, help='Verbose mode', default=False)
27
- @click.option('--version', is_flag=True, help='Show the version and exit', default=False,callback=sh_version)
28
- def cli(file: str=None, hk: bool = False, detector: bool=False, data_structure: bool = False, all_info: bool = False,
29
- filter_flag : bool =False, debug: bool = False, verbose: bool = False, version:bool = False):
35
+ @click.option('-s','--summarize', is_flag=True, help='Show only the summary', default=False)
36
+ @click.option('--version', is_flag=True, help='Show the version and exit', default=False,)
37
+ @click.pass_context
38
+ def cli(ctx, file:Path, hk: bool = False, detector: bool=False, data_structure: bool = False, all_info: bool = False,
39
+ filter_flag : bool =False, debug: bool = False, verbose: bool = False, version:bool=False, summarize: bool = False):
30
40
  console = Console()
41
+ if version:
42
+ sh_version(ctx, cli, version)
31
43
  dat = SimbioReader(file, console=console, debug=debug, verbose=verbose)
32
- console.print(dat.summary())
44
+ if summarize:
45
+ console.print(dat.summary())
46
+ else:
47
+ console.print(dat.show(hk=hk, detector=detector,
48
+ data_structure=data_structure, filters=filter_flag, all_info=all_info))
@@ -19,7 +19,7 @@ CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
19
19
  progEpilog = "- For any information or suggestion please contact " \
20
20
  "[bold magenta]Romolo.Politi@inaf.it[/bold magenta]"
21
21
 
22
- VERSION = (0,6,1,'f',1)
22
+ VERSION = (0,6,2,'f',1)
23
23
 
24
24
 
25
25
  datamodel='1.22.0.0'
@@ -139,7 +139,19 @@ hricFilters={
139
139
  "cust0":{
140
140
  "name" : "PAN-L - custom",
141
141
  "desc" : "Fraction of the CCD used by the PAN-L filter",
142
- "id" : "L_P700",
142
+ "id" : "CUST-0",
143
+ "bandwidth" : "204.3",
144
+ "centerFilter" : "699.5",
145
+ "interframeDel": "0.8",
146
+ "fistLine" : "1227",
147
+ "firstSample" : "576",
148
+ "line" : "384",
149
+ "sample" : "896"
150
+ },
151
+ "cust1":{
152
+ "name" : "PAN-L - custom",
153
+ "desc" : "Fraction of the CCD used by the PAN-L filter",
154
+ "id" : "CUST-1",
143
155
  "bandwidth" : "204.3",
144
156
  "centerFilter" : "699.5",
145
157
  "interframeDel": "0.8",
@@ -15,11 +15,13 @@ class Filter:
15
15
  raise ValueError("Invalid channel.")
16
16
  itm = [elem for elem in flt.values() if elem['name']==name]
17
17
  if len(itm)==0:
18
- raise ValueError("No filters found.")
18
+ itm=[elem for elem in flt.values() if elem['id']=='CUST-0']
19
+ # raise ValueError("No filters found.")
19
20
  elif len(itm)>1:
20
- raise ValueError("Multiple filters found. Please provide a detailed filter name.")
21
- elif len(itm)==1:
22
- itm=itm[0]
21
+ pass
22
+ # raise ValueError("Multiple filters found. Please provide a detailed filter name.")
23
+ # elif len(itm)==1:
24
+ itm=itm[0]
23
25
 
24
26
  for key, value in itm.items():
25
27
  setattr(self, key, value)
@@ -44,7 +44,7 @@ class Phase:
44
44
  dt = parse(dt,ignoretz=True)
45
45
  phase_data = self._find_phase_by_date(dt)
46
46
  if not phase_data:
47
- raise ValueError("No phase found for the given date.")
47
+ raise ValueError(f"No phase found for the given date. (dt: {dt})")
48
48
  else:
49
49
  raise ValueError("You must provide a phase name or a date.")
50
50