Skip to content
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

Split out orchestration #79

Merged
merged 16 commits into from
Jul 1, 2024
Merged

Split out orchestration #79

merged 16 commits into from
Jul 1, 2024

Conversation

julianstirling
Copy link
Collaborator

@julianstirling julianstirling commented Jun 19, 2024

In this PR we are splitting out the generic parts of the orchestration and server into a new generic repository called CadOrchestrator

  • Move generic orchestration code to new repo
  • Move server to new repo
  • Modify code to run as before
  • Move generate.py functionality into cadorchestrator repo
  • Create generic way to specify the configuration class (or avoid need for it entirely)
  • Create generic way to specify configuration options to show in server and implement
  • Create generic way to specify server UI options (Text, CSS, Logos) and implement
  • Move nimble specific assembly configuration back to this repo

Closes #63, closes #72

@julianstirling julianstirling marked this pull request as ready for review June 20, 2024 21:19
@julianstirling
Copy link
Collaborator Author

Hi @jmwright

This is the first pass at splitting out most of the orchestration. There is more generalisation to do. And there are especially improvements for how we specify assemblies and sub-assemblies.

As much ass possible has been moved into a new settings file CadOrchestration.yml. There is also an "OrchestratorConfigOptions.json" that sets what the server asks. This has to be generated. Currently this is a bit ad hoc, but to improve it I think we really need to move to a framework for the server.

Anyway we are back to feature parity with where we were at the start of the merge. I think having the CadOrchestrator will sharpen the mind to trying to make things less specific to the nimble.

Now we have a first version, I will start to do Merge requests on the Cad Orchestrator repository too.


Testing this branch.

The CI tests the static generation generate.md has been updated with new methods.

For the server you should be able to:

  • Checkout this branch, and stay in the root directory of the nimble repo
  • run pip install -e . to install everything
  • run gen_nimble_conf_options to generate the correct config options for the server to display
  • run cadorchestrator serve
  • navigate to http://127.0.0.1:8000/ to see the configuration server.

@jmwright
Copy link
Contributor

jmwright commented Jul 1, 2024

@julianstirling Where is gen_nimble_conf_options mentioned in your description above? I don't see it on this branch anywhere.

@julianstirling
Copy link
Collaborator Author

Hi @jmwright , its in nimble_orchestration. It is added to the path as an entrypoint when you run setup.py. You probably need to re-run setup even if you had run it before with -e.

I think that the actual module and folder structure after this split still needs work. But I thought that the work should happen after this PR or it will start becoming unreviewable

@jmwright
Copy link
Contributor

jmwright commented Jul 1, 2024

Ok, I got that to work and the server to run. The original server filtered out any hardware that did not have the HeightUnits field set as this will break the code because the device needs to have this data. The current server seems to have removed that filter and so it is very easy to get a non-working config. Adding the HeightUnits filter back would be a quick way to fix this until #82 is implemented to fix it properly.

@julianstirling
Copy link
Collaborator Author

Yeah non-working cnfigs are a big problem in this branch. I can add that filter in in this PR or start working on #82 straight after merge. Up to you

@jmwright
Copy link
Contributor

jmwright commented Jul 1, 2024

@julianstirling If #82 is going to happen fairly quickly after this merge, I would not divert time into putting my suggested bandaid on this PR.

Copy link
Contributor

@jmwright jmwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few comments. Otherwise it looks good, @julianstirling

generate.md Show resolved Hide resolved
generate.md Outdated Show resolved Hide resolved
nimble_orchestration/configuration.py Outdated Show resolved Hide resolved
nimble_orchestration/configuration.py Outdated Show resolved Hide resolved
nimble_orchestration/shelf.py Outdated Show resolved Hide resolved
nimble_orchestration/shelf.py Outdated Show resolved Hide resolved
nimble_orchestration/shelf.py Outdated Show resolved Hide resolved
nimble_orchestration/shelf.py Outdated Show resolved Hide resolved
@julianstirling julianstirling merged commit de7f7e1 into master Jul 1, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible Move and Refactor of generate.py License followup
2 participants