Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Oceano2python
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
US191
Oceano2python
Commits
13d54158
Commit
13d54158
authored
2 years ago
by
Jacques Grelet
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
0b3b036b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ascii.py
+2
-1
2 additions, 1 deletion
ascii.py
file_extractor.py
+1
-2
1 addition, 2 deletions
file_extractor.py
with
3 additions
and
3 deletions
ascii.py
+
2
−
1
View file @
13d54158
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
# write hdr and data in ascii files
# write hdr and data in ascii files
import
os
import
os
import
logging
import
tools
import
tools
import
numpy
as
np
import
numpy
as
np
from
datetime
import
datetime
from
datetime
import
datetime
...
@@ -132,7 +133,7 @@ def writeAscii(cfg, device, fe, r):
...
@@ -132,7 +133,7 @@ def writeAscii(cfg, device, fe, r):
fileName
=
"
{}/{}.{}
"
.
format
(
cfg
[
'
global
'
][
'
ascii
'
],
fileName
=
"
{}/{}.{}
"
.
format
(
cfg
[
'
global
'
][
'
ascii
'
],
cfg
[
'
cruise
'
][
'
cycleMesure
'
],
device
.
lower
())
cfg
[
'
cruise
'
][
'
cycleMesure
'
],
device
.
lower
())
print
(
'
writing header file: {}
'
.
format
(
fileName
))
logging
.
debug
(
'
writing header file: {}
'
.
format
(
fileName
))
writeHeader
(
fileName
,
cfg
,
device
.
lower
(),
fe
,
r
,
)
writeHeader
(
fileName
,
cfg
,
device
.
lower
(),
fe
,
r
,
)
fileName
=
"
{}/{}_{}
"
.
format
(
cfg
[
'
global
'
][
'
ascii
'
],
fileName
=
"
{}/{}_{}
"
.
format
(
cfg
[
'
global
'
][
'
ascii
'
],
...
...
This diff is collapsed.
Click to expand it.
file_extractor.py
+
1
−
2
View file @
13d54158
...
@@ -112,9 +112,8 @@ class FileExtractor:
...
@@ -112,9 +112,8 @@ class FileExtractor:
def
update_table
(
self
,
keys
):
def
update_table
(
self
,
keys
):
'''
update table data and add new column from pm (physical parameter)
'''
'''
update table data and add new column from pm (physical parameter)
'''
print
(
keys
,
type
(
keys
))
for
pm
in
keys
:
for
pm
in
keys
:
print
(
f
"
\t
Update table data with new column
{
pm
}
"
)
logging
.
debug
(
f
"
\t
Update table data with new column
{
pm
}
"
)
addColumn
=
f
"
ALTER TABLE data ADD COLUMN
{
pm
}
REAL NOT NULL
"
addColumn
=
f
"
ALTER TABLE data ADD COLUMN
{
pm
}
REAL NOT NULL
"
self
.
db
.
query
(
addColumn
)
self
.
db
.
query
(
addColumn
)
...
...
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