SimbioReader 0.5.6__tar.gz → 0.5.8__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.6/src/SimbioReader.egg-info → simbioreader-0.5.8}/PKG-INFO +2 -2
  2. {simbioreader-0.5.6 → simbioreader-0.5.8}/README.md +1 -1
  3. {simbioreader-0.5.6 → simbioreader-0.5.8}/pyproject.toml +1 -1
  4. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/__main__.py +4 -3
  5. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/constants.py +1 -1
  6. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/tools.py +3 -0
  7. {simbioreader-0.5.6 → simbioreader-0.5.8/src/SimbioReader.egg-info}/PKG-INFO +2 -2
  8. {simbioreader-0.5.6 → simbioreader-0.5.8}/LICENSE +0 -0
  9. {simbioreader-0.5.6 → simbioreader-0.5.8}/setup.cfg +0 -0
  10. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/__init__.py +0 -0
  11. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/exceptions.py +0 -0
  12. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/filters.py +0 -0
  13. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/filters_tools.py +0 -0
  14. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/infocli.py +0 -0
  15. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/phases.py +0 -0
  16. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/simbioInfo.py +0 -0
  17. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/subphases.py +0 -0
  18. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/tests.py +0 -0
  19. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader/version.py +0 -0
  20. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader.egg-info/SOURCES.txt +0 -0
  21. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader.egg-info/dependency_links.txt +0 -0
  22. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader.egg-info/entry_points.txt +0 -0
  23. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader.egg-info/requires.txt +0 -0
  24. {simbioreader-0.5.6 → simbioreader-0.5.8}/src/SimbioReader.egg-info/top_level.txt +0 -0
  25. {simbioreader-0.5.6 → simbioreader-0.5.8}/test/test_db.py +0 -0
  26. {simbioreader-0.5.6 → simbioreader-0.5.8}/test/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.5.6
3
+ Version: 0.5.8
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.6](https://img.shields.io/badge/version-0.5.6-blue?style=plastic)
24
+ ![Version 0.5.8](https://img.shields.io/badge/version-0.5.8-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.6](https://img.shields.io/badge/version-0.5.6-blue?style=plastic)
1
+ ![Version 0.5.8](https://img.shields.io/badge/version-0.5.8-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.6"
3
+ version = "0.5.8"
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:
@@ -678,11 +678,11 @@ class SimbioReader:
678
678
  if not template.exists():
679
679
  raise FileNotFoundError(f"The template {template.name} was not found")
680
680
  new_label=f"{dest}/{new_filename}.lblx"
681
- copyfile(template,new_label)
681
+ template.rename(new_label)
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,6,'d',1)
22
+ VERSION = (0,5,8,'d',1)
23
23
 
24
24
  datamodel='1.22.0.0'
25
25
 
@@ -126,6 +126,8 @@ def lidUpdate(tree, fileName, calib: bool = False):
126
126
  fileName=Path(fileName)
127
127
  newLid =lidGenerator(old_lid=oldLid,file_name=fileName, calib=calib)
128
128
  updateXML(tree, "logical_identifier", newLid)
129
+ return newLid
130
+
129
131
 
130
132
  def new_lvid(old:str, file_name: Path, file_version:str):
131
133
  parts=old.split('::')
@@ -138,6 +140,7 @@ def lvidUpdate(tree:str, file_name: Path, file_version:str):
138
140
  oldLVID = getFromXml(tree, "lidvid_reference")
139
141
  newLVID=new_lvid(oldLVID, file_name, file_version)
140
142
  updateXML(tree, "lidvid_reference", newLVID)
143
+
141
144
  pass
142
145
 
143
146
  def pretty_print(dom):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimbioReader
3
- Version: 0.5.6
3
+ Version: 0.5.8
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.6](https://img.shields.io/badge/version-0.5.6-blue?style=plastic)
24
+ ![Version 0.5.8](https://img.shields.io/badge/version-0.5.8-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