Skip to content

bu-rcs/new_request

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

New Request

Description

As an HPC facilitator I assist researchers with troubleshooting their code or optimizing their code. To keep my work organized I created this bash script that generates a directory structure to support my work for any new request I recieve.

Requirements

Git needs to be installed. For helper scripts generated, they use LMOD module load commands.

Usage

Syntax: new_request.sh CLIENT TICKET DIR
Arguments:
    CLIENT     A client identifier (e.g. username).
    TICKET     Request identifier (e.g. ticket number).
    DIR        Location to create directory hierarchy (if blank defaults to pwd).

The bash script will create a new request directory using the CLIENT and TICKET arguments as unique identifiers. The directory will be initialized as a git repository. For example, running the example command below will create a directory "bob/123456" in the current working directory:

bash new_request.sh bob 123456
Initialized empty Git repository in /projectnb/dvm-rcs/client/bob/123456/.git/

The script will also generate a .gitignore file with the following contents:

https://github.com/milechin/new_request/blob/a57c0438959f6d932095db86f053476db39b7a09/new_request.sh#L74-L76

Additionally, two helper bash scripts will be generated in the env_setup directory.

  • r_env.sh - This bash scripts will load the specified module, create a directory to install packages, install packages that are required for VSCode, and generate an 'r_activate.sh' script for activating the environment (Load the appropriate module and set R_LIBS_USER environment variable.).

Example Usage

   source r_env.sh R/4.4.0
  • env_setup/py_virtenv.sh - This is a helper bash script for creating a new python virtual environment or loading an existing one. The virtual environment created will be named after the python module specified.

Example Usage

    source py_virtenv.sh python3/3.12.4

Directory Structure

Below is the directory structure the bash script will create:

  • data - Directory to store relevant data used by the client's scripts.
  • env_setup - Directory to store scripts files associated with setting up the enviroment for the request at hand.
  • scripts - Directory to store the client's scripts.
  • output - Directory to store the output data generated by the client's scripts.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%