Skip to content
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

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

DeltaDaniel
Copy link
Contributor

No description provided.

Copy link
Contributor

@hf-krechan hf-krechan left a 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.

@@ -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)
Copy link
Contributor

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":
Copy link
Contributor

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:
Copy link
Contributor

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 ;)

@DeltaDaniel DeltaDaniel merged commit 881e9cc into main Mar 13, 2024
15 checks passed
@DeltaDaniel DeltaDaniel deleted the DDB/add_csv_export branch March 13, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants