Code cleanup: remove DatasetfieldDefaultValue and DefaultValueSet
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Overview of the Feature Request
I suggest to remove the classes DatasetfieldDefaultValue and DefaultValueSet and references to these classes, because they appear to be unused.
What kind of user is the feature intended for?
Developer
What inspired the request?
As I'm trying to add unit tests that test the very core data model, I came across these classes that are only referenced from DatasetFieldType and themselves. As far as I can tell without any documentation in the code, there is no interaction with these entities from the UI or the API.
The idea to add unit tests came from @pdurbin – because without them, it's hard to refactor.
In the end, Hacktoberfest inspired me to see if I could contribute a little to Dataverse.
What existing behavior do you want changed?
If my analysis is correct, removing these would not change any behaviour.
Any related open or closed issues to this feature request?
I suggested removing a few other classes in #9009.
My first reference to code quality, including documentation, was probably #775.
@sekmiller is the author of these classes; @landreev may also be interested in cleaning up.
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
Search the Java data model for DatasetfieldDefaultValue, DefaultValueSet, and their references from DatasetFieldType. Check whether the classes are used by the UI, API, tests, or other project code before making changes. Done means removing the unused classes and all references without changing behavior, then running the relevant test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100