[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Oct 5 11:30:37 PDT 2015


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/d5672d69aec0/
Changeset:   d5672d69aec0
Branch:      yt
User:        karraki
Date:        2015-08-31 04:14:16+00:00
Summary:     Automatically find more types of ART files
Affected #:  1 file

diff -r 9acfe15f8b6a998c7817e34706571437ff0eb8dc -r d5672d69aec07e9e6f8c55b48e4786355a9569a6 yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -192,8 +192,9 @@
         Given the AMR base filename, attempt to find the
         particle header, star files, etc.
         """
+        import pdb; pdb.set_trace()
         base_prefix, base_suffix = filename_pattern['amr']
-        aexpstr = 'a'+file_amr.rsplit('a',1)[1].replace(base_suffix,'')
+        numericstr = file_amr.rsplit('_',1)[1].replace(base_suffix,'')
         possibles = glob.glob(os.path.dirname(os.path.abspath(file_amr))+"/*")
         for filetype, (prefix, suffix) in filename_pattern.items():
             # if this attribute is already set skip it
@@ -201,7 +202,10 @@
                 continue
             match = None
             for possible in possibles:
-                if possible.endswith(aexpstr+suffix):
+                if possible.endswith(numericstr+suffix):
+                    if os.path.basename(possible).startswith(prefix):
+                        match = possible
+                elif possible.endswith(suffix):
                     if os.path.basename(possible).startswith(prefix):
                         match = possible
             if match is not None:


https://bitbucket.org/yt_analysis/yt/commits/fa7f3eac8dba/
Changeset:   fa7f3eac8dba
Branch:      yt
User:        karraki
Date:        2015-08-31 04:51:42+00:00
Summary:     Remove pdb
Affected #:  1 file

diff -r d5672d69aec07e9e6f8c55b48e4786355a9569a6 -r fa7f3eac8dbaf573e87527ac7392deeb4b801f4e yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -192,7 +192,6 @@
         Given the AMR base filename, attempt to find the
         particle header, star files, etc.
         """
-        import pdb; pdb.set_trace()
         base_prefix, base_suffix = filename_pattern['amr']
         numericstr = file_amr.rsplit('_',1)[1].replace(base_suffix,'')
         possibles = glob.glob(os.path.dirname(os.path.abspath(file_amr))+"/*")


https://bitbucket.org/yt_analysis/yt/commits/6824ad32014e/
Changeset:   6824ad32014e
Branch:      yt
User:        xarthisius
Date:        2015-10-05 18:30:21+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1764)

[bugfix] Detect more types of ART files (closes #1071)
Affected #:  1 file

diff -r a541ba83d787b19a197045380d7e8229876be1fd -r 6824ad32014e5813f6c8ac3882ba88189ed2753d yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -193,7 +193,7 @@
         particle header, star files, etc.
         """
         base_prefix, base_suffix = filename_pattern['amr']
-        aexpstr = 'a'+file_amr.rsplit('a',1)[1].replace(base_suffix,'')
+        numericstr = file_amr.rsplit('_',1)[1].replace(base_suffix,'')
         possibles = glob.glob(os.path.dirname(os.path.abspath(file_amr))+"/*")
         for filetype, (prefix, suffix) in filename_pattern.items():
             # if this attribute is already set skip it
@@ -201,7 +201,10 @@
                 continue
             match = None
             for possible in possibles:
-                if possible.endswith(aexpstr+suffix):
+                if possible.endswith(numericstr+suffix):
+                    if os.path.basename(possible).startswith(prefix):
+                        match = possible
+                elif possible.endswith(suffix):
                     if os.path.basename(possible).startswith(prefix):
                         match = possible
             if match is not None:

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list