GAP.jl icon indicating copy to clipboard operation
GAP.jl copied to clipboard

Implement iteration over GAP iterators

Open fingolfin opened this issue 1 year ago • 3 comments

fingolfin avatar Feb 15 '24 01:02 fingolfin

Perhaps the differences between iterating in GAP and in Julia can be documented (where is a good place for that?), in order to avoid confusion:

  • Iterating in GAP over an iterator changes the iterator, iterating in Julia doesn't.

I could of course change it so that Julia iteration also "eats up" the GAP iterator. It just seemed less useful and would make it behave less like a Julia iterator.

That said, how would this cause trouble for anyone coming from GAP? Maybe people would copy iterators too often thinking they need to, but that's note a major issue.

  • Iterating in GAP over a list with holes skips the holes, iterating in Julia over a GAP list with holes also iterates over the holes (well, the holes before the end of the list) by returning nothing for each hole.

Ah, good point. Perhaps we should skip holes? I don't think it was a very intentional decision to not skip them.

fingolfin avatar Feb 16 '24 14:02 fingolfin

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.85%. Comparing base (ae2997e) to head (e58a6e9). Report is 80 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #967      +/-   ##
==========================================
+ Coverage   75.80%   75.85%   +0.05%     
==========================================
  Files          51       51              
  Lines        4187     4188       +1     
==========================================
+ Hits         3174     3177       +3     
+ Misses       1013     1011       -2     
Files with missing lines Coverage Δ
src/adapter.jl 72.38% <100.00%> (+1.09%) :arrow_up:
src/constructors.jl 98.71% <100.00%> (ø)
src/wrappers.jl 98.57% <100.00%> (+0.02%) :arrow_up:

... and 1 file with indirect coverage changes

codecov[bot] avatar Feb 16 '24 14:02 codecov[bot]

@fingolfin The message #I The Julia package 'Downloads' cannot be loaded. appears in the test logs, for a failed test as well as for a successful test. I do not understand why this message appears: First, the package should be loadable since it is listed as a dependency. Second, the only function that shows this message is the GAP function JuliaImportPackage from the JuliaInterface package. But who calls this function with the argument "Downloads"?

ThomasBreuer avatar Aug 19 '24 12:08 ThomasBreuer