Skip to content

Releasing Origen Core #138

@coreyeng

Description

@coreyeng

Hello,

I'm working on the release process for the core itself. I got it working well on Windows and moved on to trying to automate it so I can get a Linux build (more on this in a minute) but I can't trigger manual workflows on a branch. In retrospect, I could've temporarily made it on a push or something, but I the changes themselves are small and other than the update to Poetry 1.1.6, there's no actual changes to the core. See #137 for the "PR". I opened this issue here as a discussion on this. I'll keep working on the publish script on master so we can monitor the progress here.

I went a different direction with how @ginty I think was packaging originally. I looked up using maturin but it ultimately looked like we'd have three different packages: origen CLI, (which you'd download yourself, I guess?), origen, the Python frontend which would have a dependency on origen_pyapi, which was the built backend. Instead of this, I packaged all three together in the same release, with the caveat that the CLI is (potentially) masked by poetry. But, I actually think

  1. this is good, and
  2. this gets us closer to O1 actually.

Currently, I renamed the executable o2 but we can add a origen case too when we're ready to replace o1, or users can alias origen to o2 themselves.

I've only uploaded to the test server so far with the Windows build, and the publishing debug will try that first. But, you can do pip install -i https://test.pypi.org/simple/ origen and this'll pull down the wheel. The wheel includes all three components. So, origen, _origen, and the CLI (invoked via o2) are all available.

This looks like O1 now, where you just need to download Ruby and run gem install origen. Now, just download Python and run pip install origen to get the basics.

From there, you can run o2 env setup to do the rest. Now, the one caveat here is if you're using poetry in the apps, which you should be, o2 will still point to the global CLI installed from pip. But, poetry run o2 will run the CLI from whatever version the application wanted. And, a caveat to the caveat is if you run o2 globally through poetry, then the global CLI is lost within the application. But, this latter case matches O1, so, I don't think its a problem - just something to be aware of. Actually, we could likely add a case to the O2 CLI to check if its in an app and, if so, kick off the CLI from the app then exit. I believe the original proposal would have apps always starting from the global CLI.

This scheme seems to working alright on Windows 10 with Python 3.8, and based on the results here it looks like the actions servers managed to build everything, so I'll work on the release steps. My plan here is no publishing will actually take place locally and the publish command will be updated (for the python core only, so probably a new command) to instead just update the version/do all the boiler plate stuff, but kick off the publish action across the OS/Python version matrix to build each version and upload. The build step can still be done locally, but its just called as part of the publishing action, so it should be one-to-one, for the OS and python version under development.

A note on Linux - I tried this same scheme on WSL. It built alright but wouldn't let me install the built wheel. It kept saying it didn't support the version. But, not only is this WSL, but its WSL v1 (work computer can't go to WSL v2 yet) and I'm at least 75% sure that this, at least part of, the problem, as WS1 v1 support has been dropping all over the place. We can install other libraries though, so my plan is to focus on the automation and see if building on a real Linux system fixes this for WSL v1.

Metadata

Metadata

Assignees

Labels

feature discussionDiscussion on a feature's requirements or implementationfeature requiredDescribes a feature which should be added

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions