Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Admin message
The Gitlab server is succesfully updated to version 17.10.3
Show more breadcrumbs
Antariksh Dicholkar
WindEnergyToolbox
Compare revisions
master to 41-dlc-highlevel-fails-on-empty-line-in-dlc-sheet
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
acdi/WindEnergyToolbox
Select target project
No results found
41-dlc-highlevel-fails-on-empty-line-in-dlc-sheet
Select Git revision
Swap
Target
toolbox/WindEnergyToolbox
Select target project
toolbox/WindEnergyToolbox
tlbl/WindEnergyToolbox
cpav/WindEnergyToolbox
frza/WindEnergyToolbox
borg/WindEnergyToolbox
mmpe/WindEnergyToolbox
ozgo/WindEnergyToolbox
dave/WindEnergyToolbox
mmir/WindEnergyToolbox
wluo/WindEnergyToolbox
welad/WindEnergyToolbox
chpav/WindEnergyToolbox
rink/WindEnergyToolbox
shfe/WindEnergyToolbox
shfe1/WindEnergyToolbox
acdi/WindEnergyToolbox
angl/WindEnergyToolbox
wliang/WindEnergyToolbox
mimc/WindEnergyToolbox
wtlib/WindEnergyToolbox
cmos/WindEnergyToolbox
fabpi/WindEnergyToolbox
22 results
master
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
maybe fix of failing empty line problem in dlc highlevel
· 818eebb5
Mikkel Friis-Møller
authored
8 years ago
818eebb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
wetb/dlc/high_level.py
+1
-0
1 addition, 0 deletions
wetb/dlc/high_level.py
wetb/dlc/tests/test_files/DLC_test.xlsx
+0
-0
0 additions, 0 deletions
wetb/dlc/tests/test_files/DLC_test.xlsx
wetb/dlc/tests/test_high_level.py
+3
-1
3 additions, 1 deletion
wetb/dlc/tests/test_high_level.py
with
4 additions
and
1 deletion
wetb/dlc/high_level.py
View file @
818eebb5
...
...
@@ -100,6 +100,7 @@ class DLCHighLevel(object):
self
.
dlc_df
=
pd
.
read_excel
(
self
.
filename
,
sheetname
=
'
DLC
'
,
skiprows
=
[
1
])
# empty strings are now nans, convert back to empty strings
self
.
dlc_df
.
fillna
(
''
,
inplace
=
True
)
self
.
dlc_df
.
fillna
(
'
\n
'
,
inplace
=
True
)
# force headers to lower case
self
.
dlc_df
.
columns
=
[
k
.
lower
()
for
k
in
self
.
dlc_df
.
columns
]
if
'
dlc
'
not
in
self
.
dlc_df
.
columns
and
'
name
'
in
self
.
dlc_df
.
columns
:
...
...
This diff is collapsed.
Click to expand it.
wetb/dlc/tests/test_files/DLC_test.xlsx
View file @
818eebb5
No preview for this file type
This diff is collapsed.
Click to expand it.
wetb/dlc/tests/test_high_level.py
View file @
818eebb5
...
...
@@ -31,7 +31,6 @@ class TestDLCHighLevel(unittest.TestCase):
def
test_sensor_info_filter
(
self
):
self
.
assertEqual
(
list
(
self
.
dlc_hl
.
sensor_info
([
'
fatigue
'
]).
m
),
[
4
,
4
,
10
])
def
test_fatigue_distribution_pct
(
self
):
dlc
,
wsp
,
wdir
=
self
.
dlc_hl
.
fatigue_distribution
()[
'
12
'
]
self
.
assertEqual
(
dlc
[
12
],
0.975
)
...
...
@@ -46,6 +45,9 @@ class TestDLCHighLevel(unittest.TestCase):
self
.
assertEqual
(
max
(
wsp
.
keys
()),
25
)
self
.
assertEqual
(
wsp
[
4
],
"
#1000
"
)
def
test_fatigue_distribution_empty_line
(
self
):
self
.
dlc_hl
.
dlc_df
[
'
load
'
]
def
test_file_hour_lst
(
self
):
f
,
h
=
self
.
dlc_hl
.
file_hour_lst
()[
0
]
self
.
assertEqual
(
os
.
path
.
abspath
(
f
),
os
.
path
.
abspath
(
testfilepath
+
'
res/dlc12_iec61400-1ed3/dlc12_wsp04_wdir350_s3001.sel
'
))
...
...
This diff is collapsed.
Click to expand it.