-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Refactor #1
Conversation
I can close my eyes and make believe I don't know anything (or maybe Bernat has an opinion) but to me aren't you a bit uncomfortable without some tests already being in place in appdirs for that kind of refactor? The extent of the tests I saw were basically "assert functions return strings" which is obviously quite rudimentary. Wouldn't things feel a bit more comfortable if we had platform-specific tests (that were skipped on other platforms) but that asserted against the real expected directories via the GHA CI? And which then we could be sure had the same values after this refactor? And yeah tell me to be quiet (or that we should do that later) :) if you just think we should merge this immediately. After all, scanning it, yeah, I'd expect this not to change behavior. |
As a compromise, can the first version of tests merely assert that every API matches what |
Definitely happy with that compromise here! |
(What you're noticing now by the way is that I didn't make CI use the tox.ini, it just uses running the test runner as before -- if you want to just hack in installing appdirs into the workflow file I think that's fine and I'll probably be happy to do it, but of course if you're happy to make that change yourself that's also nice :) |
Passing. Also made #2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray!
@gaborbernat Does this look alright to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to put the calls behind a cache layer. I don't want to run the manifestation on import, would prefer to be run on request but cached 🤔
What would you like cached? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes:
os.path.expanduser
on macOSdict
creations on some Windows logic toif
branchesos.getenv
calls with defaults to checking existence inos.environ