-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added csv output for Nachrichtenstrukturtabelle #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kleine Änderungswünsche nur. Sonst wieder sehr schön.
Freue mich schon wenn wir die MIG_mose mit in unsere CI Pipeline integrieren.
src/migmose/__main__.py
Outdated
@@ -45,6 +45,7 @@ def main(input_dir: Path, output_dir, message_format: list[EdifactFormat]) -> No | |||
for m_format, file in dict_files.items(): | |||
raw_lines = parse_raw_nachrichtenstrukturzeile(file) | |||
nachrichtenstrukturtabelle = NachrichtenstrukturTabelle.init_raw_table(raw_lines) | |||
nachrichtenstrukturtabelle.output_as_csv(m_format, output_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nur eine Frage des Geschmacks.
In dem dataframes von Pandas gibt es die Methode to_csv
Finde das auch sprechend wenn man schreibt nachrichtenstrukturtabelle.to_csv()
Ist aber nur Frage des Geschmackes
lines: list[NachrichtenstrukturZeile] | ||
|
||
@classmethod | ||
def init_raw_table(cls, raw_lines: list[str]) -> "NachrichtenstrukturTabelle": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vll hier auch analog zu unserer anderen klasse create_nachrichten...
Sehe am Handy gerade nicht mehr wie die Klasse heißt ^^'
collected_lines.append(NachrichtenstrukturZeile.init_raw_lines(raw_line)) | ||
return cls(lines=collected_lines) | ||
|
||
def output_as_csv(self, message_type: EdifactFormat, output_dir: Path) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
analog zu oben vll eher ein to_csv
Und der dictating redet von json ;)
No description provided.