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

Distribute micromamba executable for plugins #1707

Merged
merged 13 commits into from
Jan 6, 2025

Conversation

emlys
Copy link
Member

@emlys emlys commented Dec 11, 2024

Description

Fixes #

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
  • Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@emlys emlys changed the base branch from main to feature/plugins December 11, 2024 22:47
@emlys emlys marked this pull request as ready for review December 11, 2024 23:14
@emlys emlys requested a review from dcdenu4 December 19, 2024 23:40
@emlys
Copy link
Member Author

emlys commented Dec 19, 2024

@dcdenu4 I think the ReadTheDocs failure is unrelated

Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

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

Hey @emlys, this will be great. The install size and time it takes to install InVEST is drastically better with this approach. I had a few questions, but mostly the Windows micromamba executable path still isn't quite right. I left a suggestion for what I think should do it. In the electron config when moving that file, making sure the exe extension remains in the filename.

run: |
curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba
mv bin/micromamba dist/
./dist/micromamba --help
Copy link
Member

Choose a reason for hiding this comment

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

Is this just to make sure the command works, and if it doesn't we'll fail / exit here? If so, it might be nice to have a short comment here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, just testing the executable. Which might not be necessary any more, but I think it's fine to leave in. Added a comment

logger.info(`env info:\n${envInfo}`);
const regex = new RegExp(String.raw`^${envName} +(.+)$`, 'm');
const regex = /env location : (.+)/;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think I've seen this syntax before. Is the /.../ syntax for a regex, without needing it to be wrapped in a string?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's a regex literal. My linter recommended this over a string.

},
{
from: '../dist/micromamba.exe', // windows
to: 'micromamba',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
to: 'micromamba',
to: 'micromamba.exe',

Copy link
Member Author

Choose a reason for hiding this comment

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

Added this in another commit before I saw this

@emlys emlys requested a review from dcdenu4 December 20, 2024 22:05
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

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

Hey @emlys , this works for me now on Windows. I was able to install plugin "foo" and run it. I see one Mac test failed, but it looks like maybe it timed out.

@dcdenu4 dcdenu4 merged commit 595684b into natcap:feature/plugins Jan 6, 2025
27 of 29 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.

2 participants