theupdateframework / theupdateframework/python-tuf
New API: Don't hardcode metadata files extension
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 304
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 17
Beschreibung
Description of issue or feature request:
In a review of a pr adding additional classes in the metadata API, @sechkova noticed that we have hardcoded
the usage of JSON files representing our metadata files after the implementation of abstract (de)serializer here.
For context: Teodoras comment
Current behavior:
Hardcoded *.json file names in a lot of places: https://github.com/theupdateframework/tuf/blob/52207862008cc54db8a43e1543a653be0d0333f7/tuf/api/metadata.py#L468
Expected behavior:
Don't hardcode the file names representing our metadata files with their file extensions.
TODO:
- Remove hardcoded
jsonstrings from the code in all classes. - Fix our documentation to not give examples with JSON files or have a sentence like
For JSON metadata files, here is how it will look like... - Add support for other metadata file types inside the metadata classes.
This could be achieved with a configuration option in aRepositoryclass or helper functions for each of the metadata classes.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Lies tuf/api/metadata.py rund um die verlinkte Verwendung von hartcodiertem JSON und prüfe den verlinkten abstrakten Serializer-PR. Erstelle ein Inventar der JSON-Annahmen in den Metadatenklassen und der Dokumentation; die Aufgabe ist abgeschlossen, wenn diese Annahmen entfernt sind und ein weiterer Metadatendateityp unterstützt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, documentation
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100