-
Notifications
You must be signed in to change notification settings - Fork 46
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
Cache.state does not correctly reflect the status of a geocache #183
Comments
Thank your for the report. I am actually a bit surprised why
@tomasbedrich What do you think about this? |
@FriedrichFroebel no issue with handling unpublished caches, it was just that my initial proposed solution didn't cover that status. After further research I propose something like this:
Then as you suggest, cache.state could be derived from cache.status: And an update to Status() to follow the Groundspeak API status values:
|
Instead of proposing the changes here, could you please open a pull request which makes it easier to refer to specific details? We might want to add this parsing logic to a |
Hello, while I am not against publishing a new major version to change this API, my preference would be adding |
Does it make sense to create a method in I don't know enough about Python to implement the suggested improvements and create tests for them. I will leave it for someone else to implement these changes. Thank you for the feedback. |
@GeoTime61 the issue is, that if you once implement a new interface – like this one – the ability to convert Confronting myself with "adding new interfaces" argument: I see the move from
This seems to me like a good-enough justification to add a new |
If it's possible, I'd like to implement those changes. |
Yes, please do. I don't have the skills to create a test script or
implement the deprecation proposal.
…On Mon, Mar 28, 2022 at 10:19 AM BelKed ***@***.***> wrote:
If it's possible, I'd like to implement those changes.
So if you, @GeoTime61 <https://github.com/GeoTime61>, agree with that,
I'll take a look at it this week and open a pull request.
—
Reply to this email directly, view it on GitHub
<#183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYLHHJYCUBCILS6FCGCS34LVCHS2XANCNFSM5RLRJV6A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@BelKed Has there been any progress on this from your side? |
I did something a long time ago, but somehow I wasn't able to create tests. I tried, but it didn't work (I guess I wasn't able to record cassettes), so I gave up and almost forgot about it. |
Thanks for your feedback. If you are still interested in helping with this, feel free to open a corresponding PR, so we can actively check how to work around your issues with the tests. It usually is much easier if we have a specific issue which is problematic when creating the tests instead of a generic one. I am open to support you there as well. If you tried to add your tests to existing classes which overwrite |
The Cache.state variable does not correctly reflect the enabled status of a geocache. Geocaches that are disabled or archived return a state of True. The problem seems to be in the
load()
method:Current geocache pages use
<div ...>
withid="ctl00_ContentBody_disabledMessage"
orid="ctl00_ContentBody_archivedMessage"
. Maybe theload()
method should be:This solution wouldn't correctly handle unpublished geocaches, but I don't know if that is a concern.
A geocache can have a status of Unpublished, Active, Disabled, Locked, or Archived. Would it be valuable to make all of these available in
Cache()
? Maybe through a new attribute, possiblyCache.status
?The text was updated successfully, but these errors were encountered: