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

Use at-withprogress etc. in at-progress #14

Merged
merged 7 commits into from
Feb 17, 2020

Conversation

tkf
Copy link
Collaborator

@tkf tkf commented Jan 27, 2020

Once we have more machinery in @logprogress (as done in #13), it makes sense to use it inside @progress. However, this PR as-is has a hygiene issue when combined with #13. I think this because it does not pick up parent ID correctly as the variable name is doubly mangled. When I have hygiene issue I usually just give up and manually gensym. But is there a better way to do it?

@codecov-io
Copy link

codecov-io commented Jan 27, 2020

Codecov Report

Merging #14 into master will increase coverage by 0.79%.
The diff coverage is 56.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   70.98%   71.77%   +0.79%     
==========================================
  Files           1        1              
  Lines         162      163       +1     
==========================================
+ Hits          115      117       +2     
+ Misses         47       46       -1
Impacted Files Coverage Δ
src/ProgressLogging.jl 71.77% <56.17%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90cd0c1...2f3f2ea. Read the comment docs.

@tkf tkf changed the title WIP: Use at-withprogress etc. in at-progress Use at-withprogress etc. in at-progress Feb 7, 2020
@tkf tkf marked this pull request as ready for review February 7, 2020 04:44
@tkf tkf requested a review from pfitzseb February 7, 2020 04:46
@tkf
Copy link
Collaborator Author

tkf commented Feb 7, 2020

@pfitzseb Maybe you want to have a look at it, as I guess Juno users are the main users of @progress?

count_vars,
iter_vars,
ranges,
)]
_id = "progress_$(gensym())"
@gensym count_to_frac val frac lastfrac
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See #13 (comment) for why this horrible manual @gensym and aggressive interpolation below are required. I don't know if there is a better way to do this...

return ys
end

function make_count_to_frac(iterators...)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is factored out as a function (rather than inline code) so that manual @gensym is slightly easier. Also, I think this may generate faster code (not tested).

@tkf tkf mentioned this pull request Feb 7, 2020
@tkf tkf closed this Feb 17, 2020
@tkf tkf reopened this Feb 17, 2020
@tkf tkf merged commit 946e211 into JuliaLogging:master Feb 17, 2020
@tkf tkf deleted the refactor-progress branch February 17, 2020 06:42
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