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
mimc
WindEnergyToolbox
Commits
a7b67af9
Commit
a7b67af9
authored
6 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
more debugging on why 2 tests on runner are not passing
parent
7e542b22
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
wetb/prepost/simchunks.py
+5
-1
5 additions, 1 deletion
wetb/prepost/simchunks.py
wetb/prepost/tests/test_hawcstab2.py
+7
-3
7 additions, 3 deletions
wetb/prepost/tests/test_hawcstab2.py
with
12 additions
and
4 deletions
wetb/prepost/simchunks.py
+
5
−
1
View file @
a7b67af9
...
@@ -396,7 +396,11 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
...
@@ -396,7 +396,11 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
cc
=
Cases
(
cases
)
cc
=
Cases
(
cases
)
df
=
cc
.
cases2df
()
df
=
cc
.
cases2df
()
# sort on the specified values in the given columns
# sort on the specified values in the given columns
df
.
sort_values
(
by
=
sort_by_values
,
inplace
=
True
)
# sort_valures was only added in Pandas 0.17
try
:
df
.
sort_values
(
by
=
sort_by_values
,
inplace
=
True
)
except
AttributeError
:
df
.
sort
(
columns
=
sort_by_values
,
inplace
=
True
)
# create the directory to store all zipped chunks
# create the directory to store all zipped chunks
try
:
try
:
...
...
This diff is collapsed.
Click to expand it.
wetb/prepost/tests/test_hawcstab2.py
+
7
−
3
View file @
a7b67af9
...
@@ -122,9 +122,13 @@ class Tests(unittest.TestCase):
...
@@ -122,9 +122,13 @@ class Tests(unittest.TestCase):
data
=
np
.
loadtxt
(
fname
)
data
=
np
.
loadtxt
(
fname
)
self
.
assertEqual
(
data
.
shape
,
df_data
.
shape
)
self
.
assertEqual
(
data
.
shape
,
df_data
.
shape
)
print
(
data
.
dtype
)
print
(
data
.
dtype
)
print
(
data
.
values
.
dtype
)
print
(
df_data
.
values
.
dtype
)
print
(
data
)
for
i
in
range
(
data
.
shape
[
0
]):
print
(
data
.
values
)
a
=
data
[
i
,:]
b
=
df_data
.
values
[
i
,:]
if
not
np
.
allclose
(
a
,
b
):
print
(
a
-
b
)
np
.
testing
.
assert_almost_equal
(
a
,
b
)
np
.
testing
.
assert_almost_equal
(
data
,
df_data
.
values
,
decimal
=
6
)
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