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
Show more breadcrumbs
wtlib
WindEnergyToolbox
Commits
1d4ca7f2
Commit
1d4ca7f2
authored
6 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
another horrible hack to support old pandas version, more test debugging
parent
421b393a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wetb/prepost/simchunks.py
+5
-1
5 additions, 1 deletion
wetb/prepost/simchunks.py
wetb/prepost/tests/test_hawcstab2.py
+4
-0
4 additions, 0 deletions
wetb/prepost/tests/test_hawcstab2.py
with
9 additions
and
1 deletion
wetb/prepost/simchunks.py
+
5
−
1
View file @
1d4ca7f2
...
...
@@ -260,7 +260,11 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
for
db
,
base_name
in
zip
(
db_dir_tags
,
base_name_tags
):
turb_db_dirs
=
df
[
db
]
+
df
[
base_name
]
# When set to None, the DataFrame will have text as None
turb_db_src
=
turb_db_dirs
[
turb_db_dirs
.
str
.
find
(
'
None
'
)
==-
1
]
# FIXME: CI runner has and old pandas version
try
:
turb_db_src
=
turb_db_dirs
[
turb_db_dirs
.
str
.
find
(
'
None
'
)
==-
1
]
except
AttributeError
:
turb_db_src
=
turb_db_dirs
[
turb_db_dirs
.
str
.
findall
(
'
None
'
)
==-
1
]
pbs
+=
'
\n
'
pbs
+=
'
# copy to scratch db directory for %s, %s
\n
'
%
(
db
,
base_name
)
for
k
in
turb_db_src
.
unique
():
...
...
This diff is collapsed.
Click to expand it.
wetb/prepost/tests/test_hawcstab2.py
+
4
−
0
View file @
1d4ca7f2
...
...
@@ -121,13 +121,17 @@ class Tests(unittest.TestCase):
df_data
,
units
=
res
.
load_pwr_df
(
fname
)
data
=
np
.
loadtxt
(
fname
)
self
.
assertEqual
(
data
.
shape
,
df_data
.
shape
)
print
(
fname
)
print
(
data
.
dtype
)
print
(
df_data
.
values
.
dtype
)
for
i
in
range
(
data
.
shape
[
0
]):
a
=
data
[
i
,:]
b
=
df_data
.
values
[
i
,:]
if
not
np
.
allclose
(
a
,
b
):
print
(
i
)
print
(
a
-
b
)
print
(
a
)
print
(
b
)
np
.
testing
.
assert_almost_equal
(
a
,
b
)
np
.
testing
.
assert_almost_equal
(
data
,
df_data
.
values
,
decimal
=
6
)
...
...
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