Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Jul 7, 2020

This merge removes characters that are sometimes problematic from the directory names of features.

This merge also fixes some incorrect docstrings, adding a missing component and correcting the use of tags for reading features.

This merge removes characters that are sometimes problematic from
the directory names of features.

This merge also fixes some incorrect docstrings, adding a missing
component and correcting the use of tags for reading features.
@xylar xylar added the clean up label Jul 7, 2020
@xylar xylar self-assigned this Jul 7, 2020
@pep8speaks
Copy link

Hello @xylar! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 83:81: E501 line too long (100 > 80 characters)
Line 176:81: E501 line too long (100 > 80 characters)
Line 226:81: E501 line too long (100 > 80 characters)
Line 301:81: E501 line too long (96 > 80 characters)

@xylar
Copy link
Collaborator Author

xylar commented Jul 7, 2020

@proteanplanet, this should make it safe to use the feature names you originally had, in case you want to do that.

@xylar
Copy link
Collaborator Author

xylar commented Jul 7, 2020

Testing

I merged all the features and split them again, proving that none of the existing names is affected by removing these potential problem characters. Here was my script:

#!/usr/bin/env python
from geometric_features import GeometricFeatures, FeatureCollection


gf = GeometricFeatures(cacheLocation='./geometric_data')

fc = FeatureCollection()
for component in ['bedmachine', 'bedmap2', 'iceshelves', 'landice',
                  'natural_earth', 'ocean']:
    for objectType in ['point', 'transect', 'region']:
        if objectType in gf.allFeaturesAndTags[component]:
            print(component, objectType)
            fc.merge(gf.read(componentName=component, objectType=objectType))


gf = GeometricFeatures(cacheLocation='./new_geometric_data')
gf.split(fc)

@xylar xylar merged commit 898bd1e into MPAS-Dev:master Jul 7, 2020
@xylar xylar deleted the fix_feature_dir_names branch July 7, 2020 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants