Skip to content

Conversation

@bdillahu
Copy link

@bdillahu bdillahu commented Feb 7, 2017

Proposed addition to address Issue #195

Adds an option to enable this feature.

@CLAassistant
Copy link

CLAassistant commented Feb 7, 2017

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Feb 7, 2017

Coverage Status

Coverage decreased (-0.7%) to 92.155% when pulling 146bf0d on bdillahu:location into 56f0b1e on jmathai:master.

Copy link
Owner

@jmathai jmathai left a comment

Choose a reason for hiding this comment

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

@bdillahu thanks for this PR. Sorry it's taken me so long to get to it. Looks great. Do you mind addressing my comments? I'd also like to get some tests to cover these changes.

elodie.py Outdated
return True

config = load_config()
if ('Location' in config) and (config['Location'].getboolean('write_location')):
Copy link
Owner

Choose a reason for hiding this comment

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

For consistency can you remove the parens?

if 'Location' in config and config['Location'].getboolean('write_location'):

Copy link
Author

Choose a reason for hiding this comment

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

Done

elodie.py Outdated
if ('Location' in config) and (config['Location'].getboolean('write_location')):
# If config says to update locations
log.info(u'Human readable location = %s' % (location_name))
print('Human readable location = %s' % (location_name))
Copy link
Owner

Choose a reason for hiding this comment

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

Remove debug lines.

Copy link
Author

Choose a reason for hiding this comment

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

Done

if(not self.is_valid()):
return None

print('DEBUG - location = %s' % location)
Copy link
Owner

Choose a reason for hiding this comment

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

Remove debug line.

Copy link
Author

Choose a reason for hiding this comment

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

Done

self.reset_cache()
return status

def set_address(self, location):
Copy link
Owner

Choose a reason for hiding this comment

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

I think this should be named differently. We're specifically setting tags with address information, right?

I propose set_address_tags.

Copy link
Author

Choose a reason for hiding this comment

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

Done

elodie.py Outdated
return True

config = load_config()
if ('Location' in config) and (config['Location'].getboolean('write_location')):
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of doing the check here I think it belongs in media.set_location. This way when you set the location on a file it will always add the tags.

Copy link
Author

Choose a reason for hiding this comment

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

Not sure I follow you... I was thinking the idea was to not always add the tags, if that config option isn't set. Otherwise I don't need the config option.

self.city_key: location['city']
}

status = self.__set_tags(tags)
Copy link
Owner

Choose a reason for hiding this comment

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

Can we or have we confirmed that this won't overwrite existing tags if they exist? We should include a test that covers this.

Copy link
Author

Choose a reason for hiding this comment

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

Again, not sure I concur... If we are setting the value, shouldn't we be overwriting existing tags? If I can never overwrite a tag, then I can't "fix one" that's wrong.

Maybe I misunderstand.

@bdillahu
Copy link
Author

Sorry for delay... kind of swamped with other things.

I don't disagree that it needs tests added, but not sure I have the skills/understanding/time. If I get that far, I will, but wanted to at least get you this back.

@bdillahu bdillahu closed this Mar 28, 2017
@bdillahu bdillahu reopened this Mar 28, 2017
@coveralls
Copy link

coveralls commented Mar 28, 2017

Coverage Status

Coverage decreased (-0.5%) to 92.372% when pulling b033d32 on bdillahu:location into 56f0b1e on jmathai:master.

@coveralls
Copy link

coveralls commented Mar 28, 2017

Coverage Status

Coverage decreased (-0.5%) to 92.372% when pulling b033d32 on bdillahu:location into 56f0b1e on jmathai:master.

@jmathai
Copy link
Owner

jmathai commented Apr 13, 2017

@bdillahu understandable about tests. I'll see if I can get to tests as well. Always appreciate PRs submitted early so they can be iterated upon.

@jmathai jmathai force-pushed the master branch 4 times, most recently from 3276ccf to 12c17c9 Compare July 12, 2019 08:45
@jmathai jmathai force-pushed the master branch 2 times, most recently from bbdb460 to ec11497 Compare October 29, 2025 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants