Create and Export Entities
With this Jupyter Notebook you can use all scripts to create and export the following Entities:
Experiments
Instruments
Methods
Persons
Projects
Samples
Each Script requires the following arguments:
source_path: The path to the CSV or Excel file containing the entities you want to create in LOGS; default: None (nothing will be created)
target_path: The path where the CSV or Excel file with the exported entities should be stored; default: None (nothing will be exported)
export_format: Should be set to “.xlsx” if the export format should be an Excel table instead of a CSV file; default: “.csv”
To run this notebook you need to set a jupyter kernel. The kernel is a python environment that runs in the background of the notebook. To set the kernel, run the following command in the terminal:
python -m ipykernel install --user --name env_name --display-name "YourName"
Create and Export Experiments
from LOGS_solutions.CreateExportEntities.CreateExportExperiments.main import main, parse_args, validate_format
import sys
sys.argv = ["main.py",
"--source_path", r"CreateExportExperiments/experiment_csv_files/experiments.csv",
"--target_path", r"CreateExportExperiments/experiment_csv_files",
#"--export_format", ".xlsx",
]
args = parse_args()
validate_format(args)
main(args)
Create and Export Instruments
from LOGS_solutions.CreateExportEntities.CreateExportInstruments.main import main, parse_args, validate_format
import sys
sys.argv = ["main.py",
"--source_path", r"CreateExportInstruments/instrument_csv_files/instruments.csv",
"--target_path", r"CreateExportInstruments/instrument_csv_files",
#"--export_format", ".xlsx",
]
args = parse_args()
validate_format(args)
main(args)
Create and Export Methods
from LOGS_solutions.CreateExportEntities.CreateExportMethods.main import main, parse_args, validate_format
import sys
sys.argv = ["main.py",
"--source_path", r"CreateExportMethods/method_csv_files/methods.csv",
"--target_path", r"CreateExportMethods/method_csv_files",
#"--export_format", ".xlsx",
]
args = parse_args()
validate_format(args)
main(args)
Create and Export Persons
from LOGS_solutions.CreateExportEntities.CreateExportPersons.main import main, parse_args, validate_format
import sys
sys.argv = ["main.py",
"--source_path", r"CreateExportPersons/person_csv_files/person_account.csv",
"--target_path", r"CreateExportPersons/person_csv_files",
#"--export_format", ".xlsx",
]
args = parse_args()
validate_format(args)
main(args)
Create and Export Projects
from LOGS_solutions.CreateExportEntities.CreateExportProjects.main import main, parse_args, validate_format
import sys
sys.argv = ["main.py",
"--source_path", r"CreateExportProjects/project_csv_files/projects_update.csv",
"--target_path", r"CreateExportProjects/project_csv_files",
#"--export_format", ".xlsx",
]
args = parse_args()
validate_format(args)
main(args)
Create and Export Samples
from LOGS_solutions.CreateExportEntities.CreateExportSamples.main import main, parse_args, validate_format
import sys
sys.argv = ["main.py",
"--source_path", r"CreateExportSamples/sample_csv_files/samples.csv",
"--target_path", r"CreateExportSamples/sample_csv_files",
#"--export_format", ".xlsx",
]
args = parse_args()
validate_format(args)
main(args)