Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Sen2Chain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESPACE-DEV
Sen2Chain
Commits
8c4c8091
Commit
8c4c8091
authored
2 years ago
by
pascal.mouquet_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
bugfix get_(corrent)_sen2cor_version in xmlparser
parent
52e515bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sen2chain/xmlparser.py
+43
-72
43 additions, 72 deletions
sen2chain/xmlparser.py
with
43 additions
and
72 deletions
sen2chain/xmlparser.py
+
43
−
72
View file @
8c4c8091
...
...
@@ -217,85 +217,56 @@ class Sen2ChainMetadataParser:
def
init_metadata
(
self
):
self
.
_root
.
find
(
"
SEN2CHAIN_VERSION
"
).
text
=
sen2chain
.
__version__
# <<<<<<< HEAD
# self._root.find("SEN2CHAIN_PROCESSING_VERSION").text = Config().get("sen2chain_processing_version")
# self._root.find("SEN2COR_VERSION").text = get_Sen2Cor_version()
# self._tree.write(str(self.xml_path), encoding="UTF-8", xml_declaration=True)
# def set_metadata(self,
# sen2chain_version: str = None,
# sen2chain_processing_version: str = None,
# sen2cor_version: str = None,
# ):
# self._root.find("SEN2CHAIN_VERSION").text = sen2chain_version or sen2chain.__version__
# self._root.find("SEN2CHAIN_PROCESSING_VERSION").text = sen2chain_processing_version or Config().get("sen2chain_processing_version")
# self._root.find("SEN2COR_VERSION").text = sen2cor_version or get_Sen2Cor_version()
# self._tree.write(str(self.xml_path), encoding="UTF-8", xml_declaration=True)
# =======
self
.
_root
.
find
(
"
SEN2CHAIN_PROCESSING_VERSION
"
).
text
=
Config
().
get
(
"
sen2chain_processing_version
"
)
self
.
_root
.
find
(
"
SEN2COR_VERSION
"
).
text
=
get_current_Sen2Cor_version
()
self
.
_root
.
find
(
"
SEN2CHAIN_PROCESSING_VERSION
"
).
text
=
Config
().
get
(
"
sen2chain_processing_version
"
)
self
.
_root
.
find
(
"
SEN2COR_VERSION
"
).
text
=
get_Sen2Cor_version
()
self
.
_tree
.
write
(
str
(
self
.
xml_path
),
encoding
=
"
UTF-8
"
,
xml_declaration
=
True
str
(
self
.
xml_path
),
encoding
=
"
UTF-8
"
,
xml_declaration
=
True
)
def
set_metadata
(
self
,
sen2chain_version
:
str
=
None
,
sen2chain_version
:
str
=
None
,
sen2chain_processing_version
:
str
=
None
,
sen2cor_version
:
str
=
None
,
):
self
.
_root
.
find
(
"
SEN2CHAIN_VERSION
"
).
text
=
(
sen2chain_version
or
sen2chain
.
__version__
)
self
.
_root
.
find
(
"
SEN2CHAIN_PROCESSING_VERSION
"
).
text
=
sen2chain_processing_version
or
Config
().
get
(
"
sen2chain_processing_version
"
)
self
.
_root
.
find
(
"
SEN2COR_VERSION
"
).
text
=
(
sen2cor_version
or
get_current_Sen2Cor_version
()
)
self
.
_root
.
find
(
"
SEN2CHAIN_VERSION
"
).
text
=
sen2chain_version
or
sen2chain
.
__version__
self
.
_root
.
find
(
"
SEN2CHAIN_PROCESSING_VERSION
"
).
text
=
sen2chain_processing_version
or
Config
().
get
(
"
sen2chain_processing_version
"
)
self
.
_root
.
find
(
"
SEN2COR_VERSION
"
).
text
=
sen2cor_version
or
get_Sen2Cor_version
()
self
.
_tree
.
write
(
str
(
self
.
xml_path
),
encoding
=
"
UTF-8
"
,
xml_declaration
=
True
str
(
self
.
xml_path
),
encoding
=
"
UTF-8
"
,
xml_declaration
=
True
)
# >>>>>>> 571a1f934055bd9bc242e2f3dde14e38a7f4b5ca
# =======
# self._root.find("SEN2CHAIN_PROCESSING_VERSION").text = Config().get(
# "sen2chain_processing_version"
# )
# self._root.find("SEN2COR_VERSION").text = get_current_Sen2Cor_version()
# self._tree.write(
# str(self.xml_path), encoding="UTF-8", xml_declaration=True
# )
# def set_metadata(
# self,
# sen2chain_version: str = None,
# sen2chain_processing_version: str = None,
# sen2cor_version: str = None,
# ):
# self._root.find("SEN2CHAIN_VERSION").text = (
# sen2chain_version or sen2chain.__version__
# )
# self._root.find(
# "SEN2CHAIN_PROCESSING_VERSION"
# ).text = sen2chain_processing_version or Config().get(
# "sen2chain_processing_version"
# )
# self._root.find("SEN2COR_VERSION").text = (
# sen2cor_version or get_current_Sen2Cor_version()
# )
# self._tree.write(
# str(self.xml_path), encoding="UTF-8", xml_declaration=True
# )
# >>>>>>> 571a1f934055bd9bc242e2f3dde14e38a7f4b5ca
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment