-
Notifications
You must be signed in to change notification settings - Fork 6
Add instructions for correct usage of setup_miniconda.sh. #126
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
612cbb4
Add instructions for correct usage of setup_miniconda.sh. Update Pyth…
pirmink d78ea49
Downgrade to Python < 3.11
pirmink 6d6efea
Update README with copier version
clairemerker 33a7a3e
update miniconda version
clairemerker 69ed0d2
fix copier version<8.0
clairemerker ee95319
Merge branch 'fix-jenkins' into setup_miniconda
clairemerker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,30 +8,52 @@ More information on the tools, intended workflow, etc. can be found on | |
| GH pages of this repository (https://meteoswiss-apn.github.io/mch-python-blueprint/). | ||
|
|
||
| ## Preparation | ||
| Ensure that your active Python version is 3.7 or higher. | ||
| The recommended way to manage Python versions is with `Conda` (https://docs.conda.io/en/latest/). On CSCS machines it is recommended to install the leaner `Miniconda` (https://docs.conda.io/en/latest/miniconda.html), which offers enough functionality for most of our use cases. If you don't want to do this step manually, you can also use the script that is provided in the copier template `tmpl/tools/setup_miniconda.sh`. | ||
|
|
||
| Ensure that your active Python version is 3.11 or higher. | ||
| The recommended way to manage Python versions is with `Conda` | ||
| (https://docs.conda.io/en/latest/). | ||
| On CSCS machines it is recommended to install the leaner `Miniconda` | ||
| (https://docs.conda.io/en/latest/miniconda.html), | ||
| which offers enough functionality for most of our use cases. | ||
| If you don't want to do this step manually, you may use the script that is | ||
| provided in the copier template `tmpl/tools/setup_miniconda.sh`. | ||
| The default installation path of this script is the current working directory, | ||
| you might want to change that with the `-p` option to a common location for all | ||
| environments, like e.g. `$SCRATCH`. If you want the script to immediately | ||
| initialize conda (executing `conda init` and thereby adding a few commands at the | ||
| end of your `.bashrc`) after installation, add the `-u` option: | ||
|
|
||
| ```bash | ||
| tmpl/tools/setup_miniconda.sh -p $SCRATCH -u | ||
| ``` | ||
|
|
||
| In case you ever need to uninstall miniconda, do the following: | ||
|
|
||
| ```bash | ||
| conda init --reverse --all | ||
| rm -rf $SCRATCH/miniconda | ||
| ``` | ||
|
|
||
| ## Install Copier | ||
|
|
||
| First you have to install copier and its requirements. Ideally you do it in a conda environment. Either manually | ||
| First you have to install copier and its requirements. Ideally you do this in a conda environment: | ||
| ```bash | ||
| conda create --name blueprint | ||
| conda activate blueprint | ||
| conda install pip | ||
| pip install copier | ||
| conda install copier | ||
| ``` | ||
|
|
||
| ## Create your Python package from our template | ||
| You can now produce your Python package from a copier template by running | ||
| ``` | ||
| conda activate blueprint | ||
| copier [email protected]:MeteoSwiss-APN/mch-python-blueprint.git </path/to/destination> | ||
| copier copy [email protected]:MeteoSwiss-APN/mch-python-blueprint.git </path/to/destination> | ||
clairemerker marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
| If you need to generate your project from a specific commit hash or branch of the blueprint you can run with --vcs-ref | ||
|
|
||
| ``` | ||
| conda activate blueprint | ||
| copier --vcs-ref <branch> [email protected]:MeteoSwiss-APN/mch-python-blueprint.git </path/to/destination> | ||
| copier copy --vcs-ref <branch> [email protected]:MeteoSwiss-APN/mch-python-blueprint.git </path/to/destination> | ||
clairemerker marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| **Warning:** | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.