googlefonts / googlefonts/glyphsLib
Refactor ufo builder
- Dominant language
- Python
- Stars
- 201
- Forks
- 56
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
I just had a look at the `to_ufo` code. That is some nice spaghetti code ;)
It could be much nicer if it would be put into the classes. So that you could ask the masters and/or the instances for an ufo object. That would avoid several of the TODOs in that code path as one could pick what he needs.
I added a branch that starts with this. It is very easy and dirty but on some places it shows that it might make sense.
One question: How did the `to_ufo_names` method is attached to the Builder class? I don't seem to know enough python.
Contributor guide
Research direction
Start by reading the `to_ufo` code path and the `Builder.to_ufo_names` method, then inspect the branch mentioned in the issue. Determine how UFO creation should be exposed by masters or instances and whether moving the logic into classes removes the existing TODOs. Done means the refactoring has a clear class-based design with the relevant behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100