Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc refactorings #2359

Merged
merged 9 commits into from
May 9, 2023
Merged

Misc refactorings #2359

merged 9 commits into from
May 9, 2023

Conversation

lkastner
Copy link
Member

@lkastner lkastner commented May 9, 2023

  • Move includes out of Oscar.jl into subfolders into a more package like structure whenever possible
  • Remove -test from filenames, since these are already in the test folder
  • Extract some parts of Oscar.jl into src/utils.jl (docs, versioninfo)
  • Remove unused exports, related to Add CI tests to our projects looking for "bad" exports #1964 . I have decided to deal with this issue in an independent PR, as not to block the stuff here from arriving at master.

@lkastner lkastner added enhancement New feature or request WIP NOT ready for merging labels May 9, 2023
@lkastner lkastner force-pushed the lk/refactor/misc branch from 42d2c89 to 7e5592e Compare May 9, 2023 09:36
@lkastner lkastner force-pushed the lk/refactor/misc branch from d6189c5 to 8b5be50 Compare May 9, 2023 10:26
@lkastner lkastner marked this pull request as ready for review May 9, 2023 13:19
@lkastner lkastner requested a review from lgoettgens May 9, 2023 13:44
@lkastner lkastner removed the WIP NOT ready for merging label May 9, 2023
@lkastner lkastner marked this pull request as draft May 9, 2023 15:38
@lkastner lkastner removed the request for review from lgoettgens May 9, 2023 15:38
@lkastner lkastner added the WIP NOT ready for merging label May 9, 2023
@lkastner lkastner force-pushed the lk/refactor/misc branch from 8b5be50 to 8ab6e23 Compare May 9, 2023 16:07
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #2359 (8ab6e23) into master (708ce15) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2359   +/-   ##
=======================================
  Coverage   71.62%   71.63%           
=======================================
  Files         377      378    +1     
  Lines       52484    52496   +12     
=======================================
+ Hits        37593    37603   +10     
- Misses      14891    14893    +2     
Impacted Files Coverage Δ
experimental/Schemes/CoherentSheaves.jl 77.77% <ø> (ø)
experimental/Schemes/CoveredProjectiveSchemes.jl 87.25% <ø> (ø)
experimental/Schemes/IdealSheaves.jl 83.42% <ø> (ø)
experimental/Schemes/Sheaves.jl 36.01% <ø> (ø)
experimental/Schemes/WeilDivisor.jl 77.24% <ø> (ø)
...tricIntersections/HomogeneousPolynomialsActions.jl 78.91% <ø> (ø)
src/Oscar.jl 38.33% <ø> (+23.49%) ⬆️
src/Rings/FinField.jl 6.06% <ø> (ø)
src/utils.jl 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

@lkastner lkastner marked this pull request as ready for review May 9, 2023 16:09
@lkastner lkastner removed the WIP NOT ready for merging label May 9, 2023
Copy link
Member

@benlorenz benlorenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for doing this!

@lkastner lkastner merged commit 748403c into master May 9, 2023
@lkastner lkastner deleted the lk/refactor/misc branch May 9, 2023 21:12

include("Groups/Groups.jl")

include("Rings/Rings.jl")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we include this before Groups.jl, and then move this:

include("Groups/group_characters.jl")  # needs some Rings functionality
include("Groups/action.jl")  # needs some PolynomialRings functionality

also into Groups/Groups.jl?

Or is there a dependency in the Rings.jl code on code in Groups.jl that prevents it (if so, perhaps a comment could be added explaining that)

# In a bare repo HEAD will not point to the correct commit so we use the git
# tree-hash that Pkg.jl provides and manually map this to a corresponding
# commit.
function _lookup_commit_from_cache(url::AbstractString, tree::AbstractString)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think also the const globals jll_deps and cornerstones should be moved to utils.jl.

(And perhaps it would make sense to split this into three files, say utils/versioninfo.jl, utils/docs.jl, utils/tests.jl or so -- but I am fine either way, just an idea)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another possible addition to the hypothetical utils dir might be utils/rand.jl with the get_seeded_rng function and friends, also from Oscar.jl.

@@ -70,94 +70,7 @@ end
# force trigger recompile when folder changes
include_dependency("../experimental")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about moving the code from line 31 to here, which deals with experimental, over to ../experimental/Experimental.jl?

@fingolfin
Copy link
Member

Hmm, seems I was too late. Ah well.

@fingolfin
Copy link
Member

Also

const aadir = Base.pkgdir(AbstractAlgebra)
const nemodir = Base.pkgdir(Nemo)
const heckedir = Base.pkgdir(Hecke)

should go to utils.jl (or utils/docs.jl or whatever)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants