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

Create patched YML in place #163

Merged

Conversation

bollwyvl
Copy link
Contributor

@bollwyvl bollwyvl commented Mar 31, 2021

References

Changes

  • creates patched setup-miniconda-patched-{environment.yml} in-place (to restore compatibility with pip: ["-r requirements.txt"] (Environment file with pip dependency file #162) or other cases, e.g. -e . (would also break today)
  • adds some environment-file(-content|-was-patched) outputs about the effective environment-file used
  • adds clean-patched-environment-file (default true) because I don't like actions leaving junk i don't ask for
    • adds output message
  • add some tests (can now add real test for Copy channels before reversing #161)
  • docs for inputs and outputs
  • changelog

@bollwyvl bollwyvl changed the base branch from master to develop March 31, 2021 21:41
@@ -1,6 +1,25 @@
name: "Setup Miniconda"
author: Gonzalo Peña-Castellanos (@goanpeca)
description: "Set up Conda package and environment manager with Miniconda."

runs:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just moved these up top so they were more discoverable

src/outputs.ts Outdated
core.setOutput(constants.OUTPUT_ENV_FILE_PATH, path.resolve(envFile));
core.setOutput(constants.OUTPUT_ENV_FILE_CONTENT, envContent);
core.setOutput(constants.OUTPUT_ENV_FILE_PATCHED, patched ? "true" : "false");
core.saveState(constants.OUTPUT_ENV_FILE_PATCHED, patched);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

gah, i didn't know about saveState... should be using that instead of dynamicOptions or whatever... though it's all anys all the way down.

src/setup.ts Outdated
inputs.cleanPatchedEnvironmentFile === "true" &&
core.getState(constants.OUTPUT_ENV_FILE_PATCHED)
) {
await core.group("Cleaning up patched environment-file...", async () =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

some future refactor could make this into a "post" step...

Copy link
Member

Choose a reason for hiding this comment

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

Mind creating an issue to keep this on the top of our heads @bollwyvl ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

raised #165!

@bollwyvl bollwyvl changed the title [wip] Create patched YML in place Create patched YML in place Apr 1, 2021
@bollwyvl
Copy link
Contributor Author

bollwyvl commented Apr 1, 2021

Tests are up... I don't know how I lose my bash knowledge on a seeming day-to-day basis...

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Apr 1, 2021

gah, didn't add a test for -r requirements.txt...

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Apr 1, 2021

Ok, does the pip: ["-r requirements.txt"] thing in test now.

Copy link
Member

@goanpeca goanpeca left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @bollwyvl !

Works like a charm!

@goanpeca goanpeca merged commit 72a8686 into conda-incubator:develop Apr 1, 2021
@goanpeca
Copy link
Member

goanpeca commented Apr 1, 2021

Will cut a new release!

@goanpeca
Copy link
Member

goanpeca commented Apr 1, 2021

Released 2.1.1 @bollwyvl !

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Apr 1, 2021 via email

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.

Environment file with pip dependency file
2 participants