WIP: split core functionality into UnitfulBase #428
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.
This PR adresses issue #424 and issue #359.
I have moved all the files except "pkgdefaults.jl" and "dates.jl" into a subdirectory package UnitfulBase.
I also moved the definitions of radian, steradian and degrees into UnitfulBase. The reason for that was the extension of the function
mod2pi
which uses degrees. I have decided to move degrees into UnitfulBase instead of keepingmod2pi
extension in Unitful. Since radian and steradian are dimensionless and thematically connected to degrees, I have moved them as well.Unitful is now a registered extension of UnitfulBase.
I have edited the tests so they work with the splitted UnitfulBase. I have run the tests on my computer: they run successfully with the exception of the single test for issue @u_str macro hygiene? #272 (see these lines). The problem is that if @u_str is imported without at least importing Unitful, Unitful is not registered as an extension of UnitfulBase.
Since UnitfulBase is not a registered package yet, the only way to add it to Unitful project environment was to
dev
it. The information about the path to UnitfulBase was stored only in Manifest.toml, which I did not commit. As a result, the tests might be broken in CI for now. If this PR will ever get merged, the problem will disappear once UnitfulBase is registered as a package.I did not touch the docs yet. I would like to hear your opinion about the contents of this PR first.