summaryrefslogtreecommitdiff
path: root/src/projManagement/Validation.py
diff options
context:
space:
mode:
authornilshah982019-05-28 12:47:00 +0530
committernilshah982019-06-13 12:15:09 +0530
commit7c47d9e2e0458d084ffea649c788a4c2b41520ef (patch)
treec3aeadda1eaa628ca38229241f76eb962ac281b7 /src/projManagement/Validation.py
parent25c6eddcea3c8a62d9750a78435454544d8c7b14 (diff)
downloadeSim-7c47d9e2e0458d084ffea649c788a4c2b41520ef.tar.gz
eSim-7c47d9e2e0458d084ffea649c788a4c2b41520ef.tar.bz2
eSim-7c47d9e2e0458d084ffea649c788a4c2b41520ef.zip
projectManagement documentation added
Diffstat (limited to 'src/projManagement/Validation.py')
-rw-r--r--src/projManagement/Validation.py55
1 files changed, 51 insertions, 4 deletions
diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py
index 11cdcaf9..b0cfb5a1 100644
--- a/src/projManagement/Validation.py
+++ b/src/projManagement/Validation.py
@@ -21,14 +21,27 @@ import os
import re
import distutils.spawn
+"""
+This is Validation class use for validating Project.
+e.g if .proj is present in project directory
+or if new project name is already exist in workspace etc
+"""
+
class Validation:
+
"""
- This is Validation class use for validating Project.
- e.g if .proj is present in project directory
- or if new project name is already exist in workspace etc
- """
+ Takes as input the path of the project and checks if
+ projName.proj file exists
+ projName is same as the folder selected
+ @params
+ :projDir => contains the path of the project folder selected to open
+
+ @return
+ True => If the folder contains the projName.proj file
+ False => If the folder doesn't contain projName.proj file
+ """
def __init__(self):
pass
@@ -45,6 +58,17 @@ class Validation:
else:
return False
+ """
+ Validate new project created
+
+ @params
+ :projDir => Contains path of the new projDir created
+
+ @return
+ :"CHECKEXIST" => If smae project name folder exists
+ :"CHECKNAME" => If space is there in name
+ :"VALID" => If valid project name given
+ """
def validateNewproj(self, projDir):
"""
This Project Validate New Project Information
@@ -61,6 +85,18 @@ class Validation:
else:
return "VALID"
+ """
+ Validate if projDir is set appropriately in the function calling file
+ and if Kicad components are present
+
+ @params
+ :projDir => the path of the project directory, passed from
+ the calling function
+
+ @return
+ True
+ False
+ """
def validateKicad(self, projDir):
"""
This function validate if Kicad components are present
@@ -71,6 +107,17 @@ class Validation:
else:
return True
+ """
+ Validate if cir file present in the directory with the appropriate .cir
+ file name, same as the project directory base
+
+ @params
+ :projDir => the path to the project diretory
+
+ @return
+ True
+ False
+ """
def validateCir(self, projDir):
"""
This function checks if ".cir" file is present.