-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from UBC-MDS/new_dev_working_script
New dev working script
- Loading branch information
Showing
11 changed files
with
151 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# Step 1: Ensure conda is available | ||
if ! command -v conda &> /dev/null | ||
then | ||
echo "Conda could not be found. Please install Miniconda or Anaconda." | ||
exit 1 | ||
fi | ||
|
||
# Step 2: Extract environment name correctly (remove extra quotes) | ||
env_name=$(grep "^name:" environment.yml | awk '{print $2}' | tr -d '"') | ||
|
||
if [ -z "$env_name" ]; then | ||
echo "Error: Could not determine the environment name from environment.yml." | ||
exit 1 | ||
fi | ||
|
||
echo "Checking if the environment '$env_name' exists..." | ||
if conda info --envs | awk '{print $1}' | grep -qx "$env_name"; then | ||
echo "Environment '$env_name' already exists. Skipping creation." | ||
else | ||
echo "Creating the Conda environment: $env_name" | ||
conda env create -f environment.yml | ||
fi | ||
|
||
# Step 3: Ensure Conda is properly initialized | ||
eval "$(conda shell.bash hook)" | ||
|
||
# Step 4: Install dependencies using Poetry | ||
echo "Installing dependencies with Poetry..." | ||
if ! command -v poetry &> /dev/null | ||
then | ||
echo "Poetry is not installed. Installing Poetry..." | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
export PATH="$HOME/.local/bin:$PATH" | ||
fi | ||
|
||
poetry install | ||
|
||
# Step 5: Confirm successful setup | ||
echo "Setup complete! To activate your environment, run:" | ||
echo " conda activate $env_name" |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: "datastructpy" | ||
|
||
channels: | ||
- conda-forge | ||
- defaults | ||
|
||
dependencies: | ||
- python=3.11 | ||
- poetry=2.0.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import sys | ||
import os | ||
|
||
# Get the absolute path to the src directory | ||
src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../src")) | ||
|
||
# Add it to sys.path if not already included | ||
if src_path not in sys.path: | ||
sys.path.insert(0, src_path) |
This file contains 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree | ||
from datastructpy.non_linear.trees.binary_search_tree import BinarySearchTree | ||
|
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree | ||
from datastructpy.non_linear.trees.binary_search_tree import BinarySearchTree |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree | ||
from datastructpy.non_linear.trees.binary_search_tree import BinarySearchTree |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
from datastructpy.non_linear.trees.binary_search_trees import BinarySearchTree | ||
from datastructpy.non_linear.trees.binary_search_tree import BinarySearchTree |
This file was deleted.
Oops, something went wrong.