https://github.com/esss/ww
ww - multiple conda workspaces
https://github.com/esss/ww
Last synced: 5 months ago
JSON representation
ww - multiple conda workspaces
- Host: GitHub
- URL: https://github.com/esss/ww
- Owner: ESSS
- License: mit
- Created: 2021-02-15T20:40:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T20:11:56.000Z (about 2 years ago)
- Last Synced: 2025-01-10T00:54:34.584Z (over 1 year ago)
- Language: Batchfile
- Size: 34.2 KB
- Stars: 5
- Watchers: 20
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ww - The multiple-workspace batch script
## Requirements
You must have a conda installation before continuing.
See [Conda Intallation](https://conda.io/projects/conda/en/latest/user-guide/install/index.html)
## Installing
Run the following command in your conda base environment (that is, you must 'deactivate' from any current environment different from 'base')
```
conda install ww
```
### Change default workspaces location
`ww` will create new workspaces on a default location, but that location must exist. If one does not, you can either create it or tell `ww` you want it to create workspaces on a different (and existent) location. The default location on Windows is the `W:\` and on Linux is `~/w`.
To change the default location, set the environment variable `WW_DEFAULT_PATH`:
Windows:
set WW_DEFAULT_PATH=
Linux:
export WW_DEFAULT_PATH=
## Folder structure of a workspace
- ```workspace_name/``` (Example: 1/)
- ```envs/```
- ```Projects/```
- ```tmp/```
envs/ is used by conda to create local environment
tmp/ dir will override the common temp dir (%TMP% and %TEMP% global environment variables), so watch out for that (It shouldn't be a big deal).
Projects/ dir will contain your projects later.
## Configuration
Environment variables that can be previously defined (Suggestion: Define them as system variables)
```WW_SHARED_DIR```: point to PATH of Shared used by aa. Default: D:\Shared
```WW_PROJECTS_SUBDIR```: subdirectory of workspace where projects are clones. Default: Projects
```WW_QUIET```: if defined, ww will not print normal messages (only error ones).
```WW_CREATE```: if defined, ww will create every PATH it tries to access (but not the root one)
## Usage
### Create workspace
To create a workspace run:
```
ww -c
```
### Activate workspace
Activating a workspace will change your current location to `//Projects` folder
#### Windows
On `Windows` just run:
```
ww
```
#### Linux
On `Linux` you need to `source` the workspace. Just run:
```bash
source ww
cd # Unlike Windows, in Linux you must CD into workspace manually.
```
##### Activate current
It is also possible to activate a workspace from a subdir of a workspace root. If the cwd is at /Projects/myproject for example, just run:
```
source ww .
```
### Get active workspace information
To show detailed information about the current workspace:
```
ww
```