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

TikzPictures.jl requirement #110

Merged
merged 11 commits into from
Nov 22, 2023

Conversation

d-monnet
Copy link
Contributor

@d-monnet d-monnet commented Nov 3, 2023

Makes TikzPictures.jl a requirement for using export_performance_profile_tikz()

@d-monnet
Copy link
Contributor Author

d-monnet commented Nov 3, 2023

For some reason it looks like TikzPictures.jl functions cannot be called when calling export_performance_profile_tikz() even if the package has been loaded...

using BenchmarkProfiles
export_performance_profile_tikz()

returns

ERROR: Please load TikzPictures.jl package to access this function.

as expected, but

using TikzPictures
export_performance_profile_tikz(rand(25,3),"figure")

returns

ERROR: UndefVarError: TIKZ not defined

while TIKZ is exported by TikzPictures.jl.

This also causes the tests to crash.

@d-monnet d-monnet requested a review from tmigot November 3, 2023 16:31
Copy link
Contributor

github-actions bot commented Nov 3, 2023

Package name latest stable
SolverBenchmark.jl

@d-monnet
Copy link
Contributor Author

d-monnet commented Nov 3, 2023

For some reason it looks like TikzPictures.jl functions cannot be called when calling export_performance_profile_tikz() even if the package has been loaded...

using BenchmarkProfiles
export_performance_profile_tikz()

returns

ERROR: Please load TikzPictures.jl package to access this function.

as expected, but

using TikzPictures
export_performance_profile_tikz(rand(25,3),"figure")

returns

ERROR: UndefVarError: TIKZ not defined

while TIKZ is exported by TikzPictures.jl.

This also causes the tests to crash.

Just fixed the issue, using TikzPictures was missing in tikz_export.jl.

Copy link
Contributor

github-actions bot commented Nov 3, 2023

Package name latest stable
SolverBenchmark.jl

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! It looks essentially good, just one comment

Project.toml Outdated Show resolved Hide resolved
remove unecessary pkg specification in tests
@d-monnet
Copy link
Contributor Author

d-monnet commented Nov 6, 2023

Thanks for the PR! It looks essentially good, just one comment

Thanks for noticing !

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (e639a63) 96.39% compared to head (f99bd6a) 96.09%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/BenchmarkProfiles.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   96.39%   96.09%   -0.31%     
==========================================
  Files           5        5              
  Lines         305      307       +2     
==========================================
+ Hits          294      295       +1     
- Misses         11       12       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 6, 2023

Package name latest stable
SolverBenchmark.jl

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Just trying to fix the tests

src/BenchmarkProfiles.jl Outdated Show resolved Hide resolved
src/BenchmarkProfiles.jl Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Nov 7, 2023

Package name latest stable
SolverBenchmark.jl

@tmigot
Copy link
Member

tmigot commented Nov 7, 2023

Hi @d-monnet the test fails here. Could you follow the example of ADNLPModels.jl for this?
I think the solution is to remove the test and extra section from the Project.toml and add a Project.toml in the test folder https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl/blob/main/test/Project.toml (so we also add version to packages used in tests)

Copy link
Contributor

github-actions bot commented Nov 7, 2023

Package name latest stable
SolverBenchmark.jl

@d-monnet
Copy link
Contributor Author

d-monnet commented Nov 7, 2023

Hi @d-monnet the test fails here. Could you follow the example of ADNLPModels.jl for this? I think the solution is to remove the test and extra section from the Project.toml and add a Project.toml in the test folder https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl/blob/main/test/Project.toml (so we also add version to packages used in tests)

It doesn't seem to solve the problem...

Copy link
Contributor

Package name latest stable
SolverBenchmark.jl

Copy link
Contributor

Package name latest stable
SolverBenchmark.jl

Copy link
Contributor

Package name latest stable
SolverBenchmark.jl

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Hey @d-monnet ! It finally works :). When you use Require you no longer do the using

UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"

[compat]
LaTeXStrings = "^1.3"
Copy link
Member

Choose a reason for hiding this comment

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

Could you add the missing entries here?

Copy link
Contributor Author

@d-monnet d-monnet Nov 21, 2023

Choose a reason for hiding this comment

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

Thanks @tmigot ! Sure, on it ! I was wondering what default versions are used for the [extra] entry of the main Project.toml, since the tests were working with whatever these versions were before I added the requirement feature ?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should compat for test.jl be added there too ?

Copy link
Contributor

Package name latest stable
SolverBenchmark.jl

Copy link
Member

@tmigot tmigot 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 @d-monnet ! (Please don't forget to ''squash and merge'')

@d-monnet d-monnet merged commit 03e00f5 into JuliaSmoothOptimizers:main Nov 22, 2023
16 of 18 checks passed
@d-monnet d-monnet deleted the tikz-dep-require branch November 22, 2023 19:19
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