This repository was archived by the owner on Nov 7, 2018. It is now read-only.
Refactor: Extracts some objects from DataMagic::Config #300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I put through my last pull request with refactoring on the index process, I realized there was likely some fuzziness around the document building process, in the DocumentBuilder, and other parts of the newly extracted indexing code.
When I looked around in that module, I realized that there was a lot of stuff inside Config that was being called from here. I also realized that the Config object was not a value object that helped the rest of the application along, but an incredibly active universe with file loading, logic to switch between S3 and local file access, parsing and normalizing the configuration data. This thing is more like a configuration builder, and I felt like I needed to understand it and take it apart before I could fix the abstraction confusion in the DocumentBuilder.
This set of commits does two main things:
I know the perception is that this is not an area needing a lot of refactor help, or at least not as much as the area I was focused on. If you checkout code climate: https://codeclimate.com/github/18F/open-data-maker/trends. You can see that the Config module is the current file with the combination of greatest churn and lowest code quality. That is a pretty good indication that it is costing active development money through its quality.