Origen-SDK / o2

MIT License
4 stars 0 forks source link

Metal integration #158

Closed coreyeng closed 1 year ago

coreyeng commented 2 years ago

Eventually I'm going to learn how to do more easily digestible PRs… but this ain't the one. Although there's half a billion changes, most are under the umbrella of "moving this thing from origen to origen_metal". With that though, came quite a bit of refactoring and some re-architecting to fully separate the setup and utility-to-utility interactions from assumptions the application would meet. Then, there were more changes needed to get the application to boot properly while allowing sufficient freedom in the setup.

Although there's still global setup required, my mantra is "the utility is there, and its up to the origen_metal user/owner to setup appropriately". For example, in origen_metal, origen_metal.current_user wil not just work - there's some setup required. I believe this is what we want though - full separation and complete control over the utilities being used. The OM user can setup whichever and however they want. All the flexibility desired will hopefully be provided.

origen then takes on the role of pre-configuring origen metal, into a more end-user friendly, albeit rigid, setup. For example, origen.current_user, which calls origen_metal.current_user underneath, will just work (or at least make the necessary complaints) as the setup has already occurred during application boot-up.

That is pretty much what this PR is. Although there are new features and some spec updates, most were made necessary due to this restructuring of both the code and the new origen/origen_metal relationship.

I'm still not sure if we decided to axe Sphinx completely. I'm 50/50 on it myself. Well, I'm actually ~80% in favor of switching to something else but the sunk cost fallacy is making me say 50/50. It may yet be salvable. I say this attempting to justify, mostly to myself, in opening this PR without docs (and nullifying most of the existing stuff). That said, I have tests out the wazoo. There's still some items left, and I've marked as such with TEST_NEEDED, (I use TODO Tree so I can filter and incrementally work on them) but this should give a good baseline for consistent behavior going forward and provide the use cases/examples for everything.

Some other notes:

ginty commented 2 years ago

@redxeth, note that this may break the origen proj command which I think you said may be used within your team.

There's no regression test for that currently, so just be aware of this and if you need/want to upgrade your O2 installation you might need to check if this still works for you (if not we would fix it once we know what's wrong with it).

redxeth commented 1 year ago

Thanks @ginty -- not sure if/when we'll upgrade the O2 for that since no one, at least in NVM, is yet using it. Many are not forward looking as much and I'm not sure

If we did I would say that yes we could contribute to adding a regression test to it. Until then I'll have to remember or find this comment sometime in the future when things break...

@redxeth, note that this may break the origen proj command which I think you said may be used within your team.

There's no regression test for that currently, so just be aware of this and if you need/want to upgrade your O2 installation you might need to check if this still works for you (if not we would fix it once we know what's wrong with it).