-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enrollment preprocessing CLI tool (#2011)
Co-authored-by: Richard Ebeling <[email protected]>
- Loading branch information
1 parent
92a92b5
commit f879b1c
Showing
14 changed files
with
311 additions
and
10 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
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
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,4 +1,6 @@ | ||
import csv | ||
import io | ||
from typing import TextIO | ||
|
||
import openpyxl | ||
|
||
|
@@ -198,6 +200,14 @@ | |
] | ||
} | ||
|
||
# user.title, user.last_name, user.first_name, user.email | ||
valid_user_courses_import_users = [ | ||
['', 'Quid', 'Bastius', '[email protected]'], | ||
['', 'Sed', 'Diam', '[email protected]'], | ||
['', 'Manilium', 'Lucilia', '[email protected]'], | ||
['Prof. Dr.', 'Prorsus', 'Christoph', '[email protected]'] | ||
] | ||
|
||
random_file_content = b"Hallo Welt\n" | ||
|
||
|
||
|
@@ -221,3 +231,11 @@ def create_memory_excel_file(data): | |
sheet.cell(row=row_num, column=column_num).value = cell_data | ||
workbook.save(memory_excel_file) | ||
return memory_excel_file.getvalue() | ||
|
||
|
||
def create_memory_csv_file(data) -> TextIO: | ||
memory_csv_file = io.StringIO() | ||
writer = csv.writer(memory_csv_file, delimiter=";", lineterminator="\n") | ||
writer.writerows(data) | ||
memory_csv_file.seek(0) | ||
return memory_csv_file |
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
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
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
Empty file.
Oops, something went wrong.