-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: switch from edi-energy.de
and scraping to bdew-mako.de
and a real API; drop support for Python 3.9
#261
base: main
Are you sure you want to change the base?
Conversation
because there's a real API now :)
for the api models
@@ -2,7 +2,7 @@ | |||
__pycache__/ | |||
*.py[cod] | |||
*$py.class | |||
|
|||
foo |
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.
see the mwe.py
edi-energy.de
and scraping to bdew-mako.de
and a real APIedi-energy.de
and scraping to bdew-mako.de
and a real API; drop support for Python 3.9
placeholder_values = { | ||
"publication_date": (self.publicationDate or self.gueltig_ab).strftime("%Y%m%d"), | ||
"from_date": self.gueltig_ab.strftime("%Y%m%d"), | ||
"to_date": self.gueltig_bis.strftime("%Y%m%d"), | ||
"extension": self.file_extension, | ||
"id": str(self.fileId), | ||
"kind": self.file_kind or self.alternative_file_kind, | ||
"edifact_format": (self.edifact_format + "_" if self.edifact_format else ""), | ||
"version": self.document_version or "NV", | ||
} | ||
return "{kind}_{edifact_format}{version}_{to_date}_{from_date}_{publication_date}_{id}.{extension}".format( |
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.
hier könnt ihr frei definieren, was wir alles in den dateinamen reinstecken.
mein innerer konflikt ist:
- entweder wir überladen den dateinamen mit allem was wir so brauchen
- oder wir legen die (aufbereiteten) metadaten in einer extra datei neben den PDFs und DOCx ab und lassen die "clients" diese metadaten dann separat einlesen.
"edifact_format": (self.edifact_format + "_" if self.edifact_format else ""), | ||
"version": self.document_version or "NV", | ||
} | ||
return "{kind}_{edifact_format}{version}_{to_date}_{from_date}_{publication_date}_{id}.{extension}".format( |
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.
beispiel-dateinamen findet ihr im snapshot: https://github.com/Hochfrequenz/edi_energy_scraper/blob/663f891e24545d1d556f9a25a0b200ffa562dc9d/unittests/__snapshots__/test_models.ambr
bitte einmal die
mwe.py
ausführen und überzeugen, dass es gut ist :)bitte insbesondere auf die dateinamen achten, ob da aus eurer sicht alles wesentliche drin ist, zB. dass @hf-krechan @DeltaDaniel und @OLILHR daraus ableiten können, welches das richtige dokument für kohlrahbi, ahlbatross etc. ist.