Skip to content

Commit c040d5f

Browse files
rodrigo-sobraldiocas
authored andcommitted
swancustomenvironments: Rename makenv argument from repo to repository
1 parent cc6dadb commit c040d5f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

SwanCustomEnvironments/swancustomenvironments/scripts/makenv.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _log () {
1919
fi
2020
}
2121

22-
# Function to ensure a unique git repo name, instead of overwriting an existing one
22+
# Function to ensure a unique git repository name, instead of overwriting an existing one
2323
define_repo_path() {
2424
local folder_name=$1
2525
local counter=0
@@ -48,9 +48,9 @@ define_repo_path() {
4848

4949
# Function for printing the help page
5050
print_help() {
51-
_log "Usage: makenv --repo REPOSITORY --builder BUILDER --builder_version VERSION [--help/-h]"
51+
_log "Usage: makenv --repository REPOSITORY --builder BUILDER --builder_version VERSION [--help/-h]"
5252
_log "Options:"
53-
_log " --repo REPOSITORY Path or http link for a public repository"
53+
_log " --repository REPOSITORY Path or http link for a public repository"
5454
_log " --builder BUILDER Builder to create the environment"
5555
_log " --builder_version VERSION Version of the builder to use (optional)"
5656
_log " --nxcals Install NXCALS package and Spark extensions in the environment (optional)"
@@ -63,7 +63,7 @@ print_help() {
6363
while [ $# -gt 0 ]; do
6464
key="$1"
6565
case $key in
66-
--repo)
66+
--repository)
6767
REPOSITORY=$2
6868
# Check if a repository was provided
6969
if [ -z "$REPOSITORY" ]; then
@@ -125,7 +125,7 @@ if [[ "$REPOSITORY" =~ $REPO_GIT_PATTERN ]]; then
125125
ENV_NAME="${REPO_NAME}_env"
126126

127127
define_repo_path $REPO_NAME
128-
# If the repo was not previous cloned yet, clone it.
128+
# If the repository was not previous cloned yet, clone it.
129129
# Otherwise, use the existing one in the SWAN_projects folder
130130
if [ ! -d "${GIT_REPO_PATH}" ]; then
131131
_log "Cloning the repository from ${REPOSITORY}..."

SwanCustomEnvironments/swancustomenvironments/serverextension.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SwanCustomEnvironmentsApiHandler(APIHandler):
2323
async def get(self):
2424
"""
2525
Gets the arguments from the query string and runs the makenv.sh script with them.
26-
repo (str): The git URL or absolute unix path to the repository.
26+
repository (str): The git URL or absolute unix path to the repository.
2727
builder (str): The builder used for creating the environment.
2828
builder_version (str): The version of the specified builder.
2929
nxcals (bool): Whether to include NXCALS and Spark extensions in the environment.
@@ -40,12 +40,12 @@ async def get(self):
4040

4141
def _launch_makenv(self) -> Popen:
4242
"""Launches the makenv.sh script as a subprocess."""
43-
repository = self.get_query_argument("repo", default="")
43+
repository = self.get_query_argument("repository", default="")
4444
builder = self.get_query_argument("builder", default="")
4545
builder_version = self.get_query_argument("builder_version", default="")
4646
nxcals = self.get_query_argument("nxcals", default="")
4747

48-
arguments = ["--repo", repository, "--builder", builder]
48+
arguments = ["--repository", repository, "--builder", builder]
4949
if builder_version:
5050
arguments.extend(("--builder_version", builder_version))
5151
if nxcals:

SwanCustomEnvironments/swancustomenvironments/templates/customenvs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
}
141141
}
142142

143-
const params = ['repo', 'builder', 'builder_version', 'nxcals'].reduce((acc, key) => ({ ...acc, [key]: urlParams.get(key) || "" }), {});
143+
const params = ['repository', 'builder', 'builder_version', 'nxcals'].reduce((acc, key) => ({ ...acc, [key]: urlParams.get(key) || "" }), {});
144144
fetch(base_url + "api/customenvs?" + new URLSearchParams(params).toString(), {
145145
method: 'GET',
146146
headers: get_jh_auth_header()

0 commit comments

Comments
 (0)