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

Cleaned up workflow files, Adds PEP 561 compliance #802

Merged
merged 55 commits into from
Jan 12, 2022

Conversation

eddiebergman
Copy link
Contributor

@eddiebergman eddiebergman commented Dec 15, 2021

This PR cleans up the github action workflow files to accomplish few things:

  • Add's PEP 561 compliance (exports types so other packages can be aware of them)
  • Allow manual workflow_dispatch on actions that might require it (can manually trigger them from github UI)
  • Prevent the double trigger of actions by making push and pull_request and more strict.
    • A push to a pull request should no longer cause double the amount of tests to run (along with the other workflows that had on: [push, pull_request]
  • Some general cleanup, giving names to some actions, adding some linebreaks to break up things, ...
  • Disabling the example.yaml workflow as it did nothing but install SMAC. (Also removed the parameterization of it)
  • pytest.yaml:
    • Now scheduled to auto run everyday instead of every week
    • Clean up the body of the steps and move some things to env var
    • Scaffold for matrix that includes windows and mac testing (currently excluded, see comments)
    • Includes tests for Python 3.10
    • Changed the boolean flags in the matrix to just be a categorical, easier to read

Once I figure out how to make the tests work windows and macos, I will create a new PR and enable windows/mac testing.

@codecov
Copy link

codecov bot commented Dec 15, 2021

Codecov Report

Merging #802 (06bfb88) into development (814b034) will increase coverage by 0.03%.
The diff coverage is 89.47%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #802      +/-   ##
===============================================
+ Coverage        87.10%   87.13%   +0.03%     
===============================================
  Files               68       68              
  Lines             6227     6236       +9     
===============================================
+ Hits              5424     5434      +10     
+ Misses             803      802       -1     
Impacted Files Coverage Δ
smac/tae/execute_ta_run_old.py 93.33% <89.47%> (-0.79%) ⬇️
smac/optimizer/smbo.py 91.02% <0.00%> (+0.70%) ⬆️
smac/epm/rfr_imputator.py 95.77% <0.00%> (+1.48%) ⬆️

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 814b034...06bfb88. Read the comment docs.

@benjamc
Copy link
Contributor

benjamc commented Dec 16, 2021

Looks good!
Should we remove .github/workflows/examples.yml?
@renesass @dengdifan @mfeurer @eddiebergman

@eddiebergman
Copy link
Contributor Author

I would remove that file as it doesn't really do anything but I wasn't sure, so I just deactivated it for now

@mfeurer
Copy link
Contributor

mfeurer commented Dec 16, 2021

That file was there to run the commandline examples. It would be better to reactivate this behavior to ensure that these examples are working as expected.

@eddiebergman
Copy link
Contributor Author

That's not what it's doing but isn't that covered with sphinx-gallery in the docs workflow?

@eddiebergman eddiebergman changed the title Cleaned up workflow files Cleaned up workflow files, Adds PEP 561 compliance Dec 16, 2021
@eddiebergman
Copy link
Contributor Author

I also fixed the PEP 561 compliance check and then also added the compliance.

This means a user using SMAC with import smac will have access to the type information of smac's API in their editor when they use it.

@mfeurer
Copy link
Contributor

mfeurer commented Dec 17, 2021

That's not what it's doing but isn't that covered with sphinx-gallery in the docs workflow?

No, sphinx-gallery should only cover the python examples. The command line examples are not covered by that, but should be tested as well. And it used to do this, not sure when this was disabled.

@renesass
Copy link
Collaborator

renesass commented Dec 17, 2021

That's on me. When we integrated the new docs, we couldn't get the tests working and decided to exclude it for now. But yeah, we will integrate them again in 1.1.2.

@renesass renesass merged commit ec4a6b6 into development Jan 12, 2022
@renesass renesass deleted the cleanup_workflow_files branch February 4, 2022 14:52
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.

4 participants