theupdateframework / theupdateframework/python-tuf
New API: Don't hardcode metadata files extension
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 304
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 17
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read tuf/api/metadata.py around the linked hardcoded JSON usage and review the linked abstract serializer PR. Inventory JSON assumptions across metadata classes and documentation; done means those assumptions are removed and another metadata file type is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100