SimbioReader 0.5.5__tar.gz → 0.5.7__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 (26) hide show
  1. {simbioreader-0.5.5/src/SimbioReader.egg-info → simbioreader-0.5.7}/PKG-INFO +2 -2
  2. {simbioreader-0.5.5 → simbioreader-0.5.7}/README.md +1 -1
  3. {simbioreader-0.5.5 → simbioreader-0.5.7}/pyproject.toml +1 -1
  4. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/__main__.py +3 -2
  5. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/constants.py +1 -1
  6. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/tools.py +6 -1
  7. {simbioreader-0.5.5 → simbioreader-0.5.7/src/SimbioReader.egg-info}/PKG-INFO +2 -2
  8. {simbioreader-0.5.5 → simbioreader-0.5.7}/LICENSE +0 -0
  9. {simbioreader-0.5.5 → simbioreader-0.5.7}/setup.cfg +0 -0
  10. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/__init__.py +0 -0
  11. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/exceptions.py +0 -0
  12. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/filters.py +0 -0
  13. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/filters_tools.py +0 -0
  14. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/infocli.py +0 -0
  15. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/phases.py +0 -0
  16. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/simbioInfo.py +0 -0
  17. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/subphases.py +0 -0
  18. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/tests.py +0 -0
  19. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader/version.py +0 -0
  20. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader.egg-info/SOURCES.txt +0 -0
  21. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader.egg-info/dependency_links.txt +0 -0
  22. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader.egg-info/entry_points.txt +0 -0
  23. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader.egg-info/requires.txt +0 -0
  24. {simbioreader-0.5.5 → simbioreader-0.5.7}/src/SimbioReader.egg-info/top_level.txt +0 -0
  25. {simbioreader-0.5.5 → simbioreader-0.5.7}/test/test_db.py +0 -0
  26. {simbioreader-0.5.5 → simbioreader-0.5.7}/test/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo
5
5
  Author-email: Romolo Politi <Romolo.Politi@inaf.it>
6
6
  License: GNU GPL ver3
@@ -21,7 +21,7 @@ Provides-Extra: docs
21
21
  Requires-Dist: sphinx; extra == "docs"
22
22
  Dynamic: license-file
23
23
 
24
- ![Version 0.5.5](https://img.shields.io/badge/version-0.5.5-blue?style=plastic)
24
+ ![Version 0.5.7](https://img.shields.io/badge/version-0.5.7-blue?style=plastic)
25
25
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
26
26
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
27
27
  [![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)
@@ -1,4 +1,4 @@
1
- ![Version 0.5.5](https://img.shields.io/badge/version-0.5.5-blue?style=plastic)
1
+ ![Version 0.5.7](https://img.shields.io/badge/version-0.5.7-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
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)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "SimbioReader"
3
- version = "0.5.5"
3
+ version = "0.5.7"
4
4
  description="Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo"
5
5
  dependencies = [
6
6
 
@@ -640,7 +640,7 @@ class SimbioReader:
640
640
 
641
641
 
642
642
 
643
- def savePreview(self,img_type:str='png',quality:int=100, outFolder:Path=None, template:Path=None, description:str = "This is the first version."):
643
+ def savePreview(self,img_type:str='png',quality:int=100, outFolder:Path=None, template:Path=None, description:str = "This is the first version.")->str|None:
644
644
  """Saves a preview image of the loaded data.
645
645
 
646
646
  Args:
@@ -682,7 +682,7 @@ class SimbioReader:
682
682
  from xml.dom.minidom import parse, parseString, Element
683
683
  import hashlib
684
684
  tree = parse(new_label)
685
- lidUpdate(tree, new_label)
685
+ new_lid=lidUpdate(tree, new_label)
686
686
  creatTime=datetime.now()
687
687
  updateXML(tree, "modification_date", creatTime.strftime("%Y-%m-%d"), idx=0)
688
688
  file_version=new_filename.split('__')[1].split('.')[0]
@@ -701,6 +701,7 @@ class SimbioReader:
701
701
  dom2 = parseString(pretty_print(tree))
702
702
  with open(new_label, "w") as xmlFile:
703
703
  dom2.writexml(xmlFile, encoding="utf-8")
704
+ return f"{new_lid}::{file_version}"
704
705
  elif img_type == 'jpg':
705
706
  data = im.fromarray(self.img,mode='L')
706
707
  # print(data.getpixel((50,50)))
@@ -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,5,5,'d',1)
22
+ VERSION = (0,5,7,'d',1)
23
23
 
24
24
  datamodel='1.22.0.0'
25
25
 
@@ -122,8 +122,12 @@ def lidUpdate(tree, fileName, calib: bool = False):
122
122
  # parts[-2] = 'data_calibrated'
123
123
  # parts[-1] = fileName.stem.split('__')[0]
124
124
  # newLid = ':'.join(parts)
125
- newLid =lidGenerator(olf_lid=oldLid,file_name=fileName, ccalib=calib)
125
+ if not isinstance(fileName, Path):
126
+ fileName=Path(fileName)
127
+ newLid =lidGenerator(old_lid=oldLid,file_name=fileName, calib=calib)
126
128
  updateXML(tree, "logical_identifier", newLid)
129
+ return newLid
130
+
127
131
 
128
132
  def new_lvid(old:str, file_name: Path, file_version:str):
129
133
  parts=old.split('::')
@@ -136,6 +140,7 @@ def lvidUpdate(tree:str, file_name: Path, file_version:str):
136
140
  oldLVID = getFromXml(tree, "lidvid_reference")
137
141
  newLVID=new_lvid(oldLVID, file_name, file_version)
138
142
  updateXML(tree, "lidvid_reference", newLVID)
143
+
139
144
  pass
140
145
 
141
146
  def pretty_print(dom):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Python Reader for the data from SIMBIO-SYS instrument suite on-board the ESA mission BepiColombo
5
5
  Author-email: Romolo Politi <Romolo.Politi@inaf.it>
6
6
  License: GNU GPL ver3
@@ -21,7 +21,7 @@ Provides-Extra: docs
21
21
  Requires-Dist: sphinx; extra == "docs"
22
22
  Dynamic: license-file
23
23
 
24
- ![Version 0.5.5](https://img.shields.io/badge/version-0.5.5-blue?style=plastic)
24
+ ![Version 0.5.7](https://img.shields.io/badge/version-0.5.7-blue?style=plastic)
25
25
  ![Language Python 3.13](https://img.shields.io/badge/python-3.13-orange?style=plastic&logo=python)
26
26
  ![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
27
27
  [![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)
File without changes
File without changes