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

support for "threads" and "min-optlevel" julia options #493

Merged
merged 13 commits into from
Nov 13, 2022

Conversation

dpinol
Copy link

@dpinol dpinol commented Apr 6, 2022

Added support for "threads" and "min-optlevel" julia options.

Now all long opts are generated with "--arg=val" instead of "--arg val" since julia required arguments support both syntaxes, but optional arguments require the first one

Dani Pinyol added 2 commits April 6, 2022 12:19
now all long opts are generated with "--arg=val" instead of "--arg val"
since julia required arguments support both syntaxes, but optional
arguments require the first one
@mkitti
Copy link
Member

mkitti commented Nov 3, 2022

It's hard to consider this if none of the tests pas

@MilesCranmer
Copy link
Collaborator

Hey @dpinol could you rebase on master? The tests should pass now. Thanks!

@mkitti
Copy link
Member

mkitti commented Nov 9, 2022

Hey @dpinol could you rebase on master? The tests should pass now. Thanks!

@MilesCranmer You might be able to do this yourself.

Copy link
Member

@mkitti mkitti 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

@mkitti mkitti closed this Nov 9, 2022
@mkitti mkitti reopened this Nov 9, 2022
@MilesCranmer
Copy link
Collaborator

Hmm, the tests actually look to be failing for this one @dpinol

src/julia/options.py Outdated Show resolved Hide resolved
@MilesCranmer MilesCranmer self-requested a review November 9, 2022 19:03
src/julia/options.py Outdated Show resolved Hide resolved
args.append(desc.cli_argument_name())
args.append(value)
if len(desc.cli_argument_name()) == 1:
args.append(desc.cli_argument_name() + str(value))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need test case for this branch. (unless there already is one?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Wait, there are no options that could trigger this... Is that correct? So maybe this branch can be removed.

@MilesCranmer
Copy link
Collaborator

Okay I think I got it; everything is working now. Had to another options class to allow threads to be an arbitrary integer.

@mkitti want to give another review?

@MilesCranmer MilesCranmer requested a review from mkitti November 11, 2022 20:29
args.append(desc.cli_argument_name())
args.append(value)
if value is None:
...
Copy link
Collaborator

Choose a reason for hiding this comment

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

I added this new logic to avoid adding arguments if the value is unset. Not sure why this wasn't set up before - @mkitti or @marius311 any idea why?

@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 87.37% // Head: 87.23% // Decreases project coverage by -0.13% ⚠️

Coverage data is based on head (45d1ec3) compared to base (e5b06f1).
Patch coverage: 76.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #493      +/-   ##
==========================================
- Coverage   87.37%   87.23%   -0.14%     
==========================================
  Files          39       39              
  Lines        2320     2342      +22     
==========================================
+ Hits         2027     2043      +16     
- Misses        293      299       +6     
Impacted Files Coverage Δ
src/julia/tests/test_juliaoptions.py 100.00% <ø> (ø)
src/julia/options.py 92.12% <75.00%> (-4.07%) ⬇️
src/julia/tests/test_compatible_exe.py 82.72% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mkitti
Copy link
Member

mkitti commented Nov 11, 2022

Looks like we need to run black?

@mkitti
Copy link
Member

mkitti commented Nov 11, 2022

Can we replace distutils at some point?

@MilesCranmer
Copy link
Collaborator

Can we replace distutils at some point?

Good idea; looks like it will be deprecated for Python 3.12, so we should do it soon.

Copy link
Member

@mkitti mkitti 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 to me. Merge?

@MilesCranmer MilesCranmer merged commit 52dae56 into JuliaPy:master Nov 13, 2022
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.

3 participants