Skip to content

Commit

Permalink
Merge pull request #624 from HeatherSavoy-USDA/main
Browse files Browse the repository at this point in the history
update workshop working directory
  • Loading branch information
HeatherSavoy-USDA authored Jul 19, 2024
2 parents 79039d3 + 2d7484d commit d58a07e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Note: After you create your virtual environment, you no longer need to load the

## Creating and managing virtual environments with `venv`

1. If you are not already in your workshop directory, change to it by running `cd /90daydata/shared/pkg_workshop/$USER/`.
1. If you are not already in your workshop directory, change to it by running `cd /project/scinet_workshop1/$USER/`.
1. Use the `venv` module and command to create a new virtual environment: `python -m venv demo_venv`.
1. You should now see a new folder called `demo_venv`. Let's take a look inside and explore a bit!
1. You now have a virtual environment that is ready to use. The easiest way to use the environment is to _activate_ it. Run `source demo_venv/bin/activate`. After running this command, notice that the command prompt has changed to indicate that you are working in the virtual environment named "demo_venv".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Multiple R versions are available in the environment module system. Note that mo

To use `renv` for package management, it needs to be associated with an R project. This could be an empty directory if you are just starting a project or it could be one or more R scripts within a directory. Either way, the scope of the `renv` environment will be dictated by the working directory in which it is initialized. To initialize an `renv` environment, you use the `renv::init()` command. **For getting started and for this workshop, we recommend passing two arguments when initializing the environment: `renv::init(settings = list(use.cache = FALSE, ppm.enabled = FALSE))`.** These arguments keep package installations within the project directory instead of your home directory and prevent some potentially faulty URL translations from happening when packages are downloaded from repositories.

1. If you are not already in your workshop directory, change into it by running `cd /90daydata/shared/pkg_workshop/$USER/`.
1. If you are not already in your workshop directory, change into it by running `cd /project/scinet_workshop1/$USER/`.
1. Create and change directory to a project directory:
```
mkdir project1
Expand Down
4 changes: 2 additions & 2 deletions sn_collections/_events/2024-07-19-package-env-workshop.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Steps to prepare for the tutorial sessions:

1. **Create a workshop working directory** by running the following commands. Note: you do not have to edit the commands with your username as it will be determined by the `$USER` variable.
```bash
mkdir /90daydata/shared/pkg_workshop/$USER/
cd /90daydata/shared/pkg_workshop/$USER/
mkdir /project/scinet_workshop1/$USER/
cd /project/scinet_workshop1/$USER/
```


Expand Down

0 comments on commit d58a07e

Please sign in to comment.