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

Adaptations to new copier version and fix to avoid bash scripts being sourced #114

Closed
wants to merge 6 commits into from

Conversation

clairemerker
Copy link
Collaborator

@clairemerker clairemerker commented Apr 5, 2023

This PR includes

  • improved documentation:
    • Users tried to use the tools/setup_miniconda.sh script in sourcing it instead of executing it. This breaks the argument parsing of the script. It relies on OPTIND which is not reset when calling the script again, and the script then ignores the arguments. I included a hint in the documentation at two locations.
    • Updated calls of copier since copier version 8.1.0 (the old commands do not work anymore)
  • adaptation of github actions workflow to new copier version
  • check at the begining of the bash scripts to avoid them being sourced instead of executed

It fixes #117 and ideally also fixes the jenkins plan which is currently failing.

Since the copier commands are not backward compatible, this version of the blueprint now works with the new version. Supporting both adds work...

@clairemerker clairemerker requested a review from twicki April 5, 2023 16:32
@clairemerker
Copy link
Collaborator Author

launch jenkins

Copy link
Contributor

@twicki twicki left a comment

Choose a reason for hiding this comment

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

LGTM

@twicki
Copy link
Contributor

twicki commented Apr 21, 2023

we could add this barrier https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced to the script to prevent the users - in order to make it safer

@clairemerker clairemerker changed the title Add a hint about the bash scripts to the documentation Adaptations to new copier version and fix to avoid bash scripts being sourced Aug 21, 2023
@@ -19,7 +19,7 @@ jobs:
- name: Create new project
run: |
# Note: Make sure python_version is consistent with python-version hardcoded above
conda run --name blueprint copier --force --vcs-ref=HEAD python_version=3.9 copy . ./docs/example_project
conda run --name blueprint copier copy --force --vcs-ref=HEAD . ./docs/example_project
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the python version removed here?

If we really want to / need to remove it, adopt the comment above

@twicki
Copy link
Contributor

twicki commented Oct 23, 2023

closed in favor of #121

@twicki twicki closed this Oct 23, 2023
@twicki twicki deleted the improve-docs branch October 23, 2023 13:23
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.

Wrong command in Readme.md
2 participants