Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
fix: uncommented add_project
Browse files Browse the repository at this point in the history
Uncommented the "add_project" function as it was triggerin some pylint errors and we currently don't use the function.
  • Loading branch information
victor-wildlife committed Sep 14, 2023
1 parent 890768a commit 900c6f5
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions kso_utils/project_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ def find_project(project_name: str = ""):
return


def add_project(project_info: dict = {}):
"""Add new project information to
project csv using a project_info dictionary
"""
tut_path = os.getcwd()
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
# Specify standard project list location
project_path = "db_starter/projects_list.csv"
# Specify volume allocated by SNIC
snic_path = "/mimer/NOBACKUP/groups/snic2021-6-9"
# def add_project(project_info: dict = {}):
# """Add new project information to
# project csv using a project_info dictionary
# """
# tut_path = os.getcwd()
# abspath = os.path.abspath(__file__)
# dname = os.path.dirname(abspath)
# os.chdir(dname)
# # Specify standard project list location
# project_path = "db_starter/projects_list.csv"
# # Specify volume allocated by SNIC
# snic_path = "/mimer/NOBACKUP/groups/snic2021-6-9"

if not os.path.exists(project_path) and os.path.exists(snic_path):
project_path = os.path.join(snic_path, "db_starter/projects_list.csv")
with open(project_path, "a") as f:
project = [Project(*list(project_info.values()))]
w = DataclassWriter(f, project, Project)
w.write(skip_header=True)
os.chdir(tut_path)
# if not os.path.exists(project_path) and os.path.exists(snic_path):
# project_path = os.path.join(snic_path, "db_starter/projects_list.csv")
# with open(project_path, "a") as f:
# project = [Project(*list(project_info.values()))]
# w = DataclassWriter(f, project, Project)
# w.write(skip_header=True)
# os.chdir(tut_path)

0 comments on commit 900c6f5

Please sign in to comment.