-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issu#136 region #22
Merged
Merged
Issu#136 region #22
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4ed20f1
warn user is a third argument is passed
dnadeau4 f7d503c
autopep8 region.py
dnadeau4 53979f6
warn user is a third argument is passed
dnadeau4 c7ca1fe
Merge branch 'master' into issu#136_region
dnadeau4 0b3661d
add cdat_info to .travis.yml
dnadeau4 cd1a70e
add cdat_info to circleci
dnadeau4 697d12e
change netcdf-fortran version in .travis
dnadeau4 a31e9cc
fix flake8
dnadeau4 0a2be42
remove cdat_info from circleci
dnadeau4 01765b4
comment
dnadeau4 07f387a
no need for necdf-fortran in conda create
dnadeau4 aaec0bb
no need for necdf-fortran in conda create circleci too
dnadeau4 2f1efcb
fix time units year 0 to year 1
dnadeau4 ececaa0
udpate travis.yml
dnadeau4 16aacb6
can't trap stdout in circleci
dnadeau4 0b56ef0
language python
dnadeau4 6e6bd2e
fix comment error in travis file
dnadeau4 31fb055
get rid of 3.6 so test is ran only once
dnadeau4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import cdutil | ||
import cdat_info | ||
import cdms2 | ||
import cdms2,cdutil,sys,MV2,numpy,os,cdat_info | ||
import unittest | ||
import numpy | ||
import tempfile | ||
|
||
class CDUTIL(unittest.TestCase): | ||
|
||
def testRegions(self): | ||
|
||
regionNA = cdutil.region.domain(latitude=(-50.,50.,'ccb')) | ||
f=cdms2.open(cdat_info.get_sampledata_path()+'/clt.nc') | ||
d=f('u', regionNA) | ||
|
||
# -------------------------------------------------------- | ||
# makesure the warning has been displayed for the 3rd args | ||
# -------------------------------------------------------- | ||
|
||
bounds = d.getLatitude().getBounds() | ||
self.assertTrue(numpy.allclose(bounds[0], numpy.array([-50., -49.19124603]))) | ||
self.assertTrue(numpy.allclose(bounds[-1], numpy.array([49.19124603, 50.]))) | ||
|
||
if __name__ == "__main__": | ||
unittest.main() | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnadeau4 why do we need this? Does it run the test twice now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it from UV-CDAT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed python 3.6 since we already do both version in the
conda env
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doutriaux1 Can you merge it?