Skip to content

Commit

Permalink
updated the converter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tayasherstyukova committed Dec 17, 2024
1 parent 8f65e6c commit a7d32b4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
Binary file added excel2sbol/.DS_Store
Binary file not shown.
10 changes: 8 additions & 2 deletions excel2sbol/excel2sbol/converter.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# from ensurepip import version
import excel2sbol.compiler as e2s
import os


def converter(file_path_in, file_path_out, sbol_version=3, homespace="http://examples.org/", file_format=None):
def converter(file_path_in, file_path_out, sbol_version=3, homespace="http://examples.org/", file_format=None, username=None, password=None, url = None):
"""Convert a given excel file to SBOL
Args:
file_path_in (string): path to excel file
file_path_out (string): desired path to sbol file
sbol_version (int): sbol version number, defaults to 3
"""
if username is not None and password is not None and url is not None:
# print(username, password, url)
os.environ["SBOL_USERNAME"] = username
os.environ["SBOL_PASSWORD"] = password
os.environ["SBOL_URL"] = url
col_read_df, to_convert, compiled_sheets, version_info, homespace2 = e2s.initialise(file_path_in)

if len(homespace2) > 0:
Expand All @@ -33,3 +38,4 @@ def converter(file_path_in, file_path_out, sbol_version=3, homespace="http://exa
e2s.column_parse(to_convert, compiled_sheets, sht_convert_dict,
dict_of_objs, col_read_df, doc, file_path_out,
sbol_version=sbol_version, file_format=file_format)

Binary file added excel2sbol/resources/.DS_Store
Binary file not shown.
Binary file added excel2sbol/tests/.DS_Store
Binary file not shown.

0 comments on commit a7d32b4

Please sign in to comment.