-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
New repo new structure #18
Comments
I definitely prefer this type of layout.
I think its fine to also make it available as
That sure looks a lot cleaner. |
The idea is to prevent that. It's not because |
Thats going to cause me a few headaches as I already migrated a few projects to use this lib, but I also understand why you want to do that. I will bump the major version to 1.0.0 |
@bdraco oh, I didn't realize. I was hoping that nobody is relying on public API just yet… |
Still better to do it now while we still can without creating too many downstream ripples |
Yeah, this is why I rushed to document my thoughts in this issue. Technically, we could keep the imports under a module-level |
I'll get a new release out and start working on the downstream changes since thats going to be urgent to do before the next Home Assistant release. The other changes aren't public facing so they can be done any time. I'm flying to LUX tomorrow so I'll likely pick them up after I get back to the US at the end of the week if I'm not too jet-lagged. |
Fair. I also noticed the CI badge pointing to the old repo location in README (and perhaps other places?) FYI. |
Will fix the badges before I do a release. Is trusted publishing update to the new org name? |
Trusted publishing is supposed to be configured to trust a repo plus workflow and env combo. But I'm not entirely sure it tracks repos post-move. I only know it records the repo ID on first use to prevent resurrection attacks. |
I've added a new trust entry and deleted the old one just now. So you're good to go. |
v1.0.0 moved the public api to propcache.api see aio-libs/propcache#21 see aio-libs/propcache#18 see aio-libs/propcache#19
v1.0.0 moved the public api to propcache.api see aio-libs/propcache#21 see aio-libs/propcache#18 see aio-libs/propcache#19
v1.0.0 moved the public api to propcache.api see aio-libs/propcache#21 see aio-libs/propcache#18 see aio-libs/propcache#19
@webknjaz looks like something went wrong
|
Looks like all the initial requests are completed |
yeah, looks like they are |
I'd like to migrate to some better practices as we embrace new libraries. I've been experimenting with something for work, incorporating some best practices I observed over the years, and now my ideal structure looks like this: https://github.com/ansible/awx_plugins.interfaces.
src/
layout — this essentially means putting the main library importables one level deeper, not in the repo root; this helps with preventing testing the Git checkout modules instead of what's supposed to end up insite-packages/
accidentally (https://blog.ganssle.io/articles/2019/08/test-as-installed.html). Modernsetuptools
with PEP 621 metadata also has interesting auto-discovery when that's used.__init__.py
— this helps deal with weird import loops and import-time side effects. Now, I recommend having anapi.py
as an entry-point module. With this,from propcache.thing import something_else
will not trigger surprise imports that might be also present inpropcache.__init__
. The public API would then be accessible throughfrom propcache.api import a_public_thing
.There's other things I'd want to change across the projects, but I think these three are most impactful long-term.
The text was updated successfully, but these errors were encountered: