Skip to content
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

Process dataset elements with access children #122

Merged
merged 1 commit into from
Mar 21, 2017

Conversation

lesserwhirls
Copy link
Collaborator

@lesserwhirls lesserwhirls commented Mar 18, 2017

Fix #114
Fix #115

@lesserwhirls
Copy link
Collaborator Author

I'm guessing this will have some pep issues...

# access_urls
has_access_element_info = \
any(self.datasets[previous_dataset].access_element_info)
if has_access_element_info:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be if dict...no need for any

@@ -297,8 +328,26 @@ def make_access_urls(self, catalog_url, all_services, metadata=None):
access_urls[service.service_type] = server_url + \
service.base + self.url_path

if any(self.access_element_info):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nuke this line - won't iterate over empty dict

for service_type in self.access_element_info:
url_path = self.access_element_info[service_type]
found_service = None
for service in all_services:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make all_services -> service.name use dict comprehension to clean up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reuse in line 317, too.

@dopplershift
Copy link
Member

Looks like my quote-fixing spree is in conflict. Sorry, dude.

@lesserwhirls
Copy link
Collaborator Author

Nah, that was an easy fix. I'll up updating the PR in the next few minutes.

@lesserwhirls
Copy link
Collaborator Author

@dopplershift have you thought about turning off merge and squash+merge commits and just allowing the rebase and merge option?

@dopplershift
Copy link
Member

I've fallen out of favor with the rebase and merge button--I like seeing the split and merge for each PR.

What I still want is the ability to rebase the branch from the web UI rather than the merge.

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending CI finish.

@dopplershift
Copy link
Member

More pep8. 😢

@dopplershift dopplershift merged commit 152ac7d into Unidata:master Mar 21, 2017
@dopplershift dopplershift modified the milestone: 0.4.1 Mar 31, 2017
@lesserwhirls lesserwhirls deleted the access branch June 4, 2020 20:13
'Test parsing access elements in TDS client catalog'
url = 'http://oceandata.sci.gsfc.nasa.gov/opendap/SeaWiFS/L3SMI/2001/001/catalog.xml'
cat = TDSCatalog(url)
assert len(list(cat.datasets)) != 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh If we had only known and had written the test to check the correct length, which is 174.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants