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

Simplify gap_to_julia code #276

Merged
merged 1 commit into from
Jul 9, 2019
Merged

Conversation

fingolfin
Copy link
Member

  • use get! with a do-block to simplify some cases
  • remove redundant conversions function that allowed for dealing
    with holes -- they actually did nothing special compared to
    the base versions (which the still-passing tests seem to confirm)

@codecov
Copy link

codecov bot commented Jul 8, 2019

Codecov Report

Merging #276 into master will decrease coverage by 1.21%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
- Coverage   70.21%   68.99%   -1.22%     
==========================================
  Files          51       54       +3     
  Lines        3280     3564     +284     
==========================================
+ Hits         2303     2459     +156     
- Misses        977     1105     +128
Impacted Files Coverage Δ
src/gap_to_julia.jl 95.38% <100%> (+2.4%) ⬆️
pkg/GAPJulia/JuliaInterface/read.g 100% <0%> (ø) ⬆️
pkg/GAPJulia/JuliaInterface/gap/helpstring.g 55.78% <0%> (ø)
test/help.jl 100% <0%> (ø)
src/help.jl 16.66% <0%> (ø)
src/GAP.jl 91.89% <0%> (+2.41%) ⬆️
src/julia_to_gap.jl 95.38% <0%> (+2.84%) ⬆️
src/ccalls.jl 98.38% <0%> (+3.07%) ⬆️
src/gap2.jl 83.67% <0%> (+3.28%) ⬆️
pkg/GAPJulia/JuliaExperimental/julia/gapperm.jl 88.14% <0%> (+5.53%) ⬆️

Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

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

This looks good, apart from the key vs. i issue marked in the code.

translated_obj = gap_to_julia(T,current_obj,recursion_dict)
dict[ i ] = translated_obj
recursion_dict[ current_obj ] = translated_obj
current_obj = getproperty(obj, key)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't key be i?

Copy link
Member Author

@fingolfin fingolfin Jul 9, 2019

Choose a reason for hiding this comment

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

Yes (or rather, the i above should have been key). Fixed now.

- use get! with a do-block to simplify some cases
- remove redundant conversions function that allowed for dealing
  with holes -- they actually did nothing special compared to
  the base versions (which the still-passing tests seem to confirm)
Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

@ThomasBreuer ThomasBreuer merged commit c33988f into oscar-system:master Jul 9, 2019
@fingolfin fingolfin deleted the mh/conv branch July 19, 2019 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants