-
Notifications
You must be signed in to change notification settings - Fork 299
Update workflow files #363
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e59f7a9
update workflow files
eddiebergman 88b5c09
Remove double quotes
eddiebergman 2707481
Exclude python 3.10
eddiebergman 0e41e34
Fix mypy compliance check
eddiebergman 913d2f8
Added PEP 561 compliance
eddiebergman 325bc65
Add py.typed to MANIFEST for dist
eddiebergman eb0b123
Update .github/workflows/dist.yml
eddiebergman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,61 @@ | ||
name: dist-check | ||
|
||
on: [push, pull_request] | ||
on: | ||
# Manually triggerable in github | ||
workflow_dispatch: | ||
|
||
# When a push occurs on either of these branches | ||
push: | ||
branches: | ||
- master | ||
- development | ||
|
||
# When a push occurs on a PR that targets these branches | ||
pull_request: | ||
branches: | ||
- master | ||
- development | ||
|
||
schedule: | ||
# Every day at 7AM UTC | ||
- cron: '0 07 * * *' | ||
|
||
jobs: | ||
|
||
dist: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Build dist | ||
run: | | ||
python setup.py sdist | ||
|
||
- name: Twine check | ||
run: | | ||
pip install twine | ||
last_dist=$(ls -t dist/autoPyTorch-*.tar.gz | head -n 1) | ||
twine_output=`twine check "$last_dist"` | ||
if [[ "$twine_output" != "Checking $last_dist: PASSED" ]]; then echo $twine_output && exit 1;fi | ||
|
||
- name: Install dist | ||
run: | | ||
last_dist=$(ls -t dist/autoPyTorch-*.tar.gz | head -n 1) | ||
pip install $last_dist | ||
|
||
- name: PEP 561 Compliance | ||
run: | | ||
pip install mypy | ||
cd .. # required to use the installed version of autosklearn | ||
if ! python -c "import autoPyTorch"; then exit 1; fi | ||
|
||
cd .. # required to use the installed version of autoPyTorch | ||
|
||
# Note this doesn't perform mypy checks, those are handled in pre-commit.yaml | ||
# This only checks if autoPyTorch exports type information | ||
if ! mypy -c "import autoPyTorch"; then exit 1; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,44 @@ | ||
name: pre-commit | ||
|
||
on: [push, pull_request] | ||
on: | ||
# Allow to manually trigger through github API | ||
workflow_dispatch: | ||
|
||
# Triggers with push to these branches | ||
push: | ||
branches: | ||
- master | ||
- development | ||
|
||
# Triggers with push to a pr aimed at these branches | ||
pull_request: | ||
branches: | ||
- master | ||
- development | ||
|
||
jobs: | ||
|
||
run-all-files: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Init Submodules | ||
run: | | ||
git submodule update --init --recursive | ||
|
||
- name: Install pre-commit | ||
run: | | ||
pip install pre-commit | ||
pre-commit install | ||
|
||
- name: Run pre-commit | ||
run: | | ||
pre-commit run --all-files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually why would you like this workflow on a schedule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no real need, there's also no real need to have it on anything but push to master or development. This workflow actually does very little compared to
pytest.yaml
, which is also build a dist version and then runs tests on it. The only difference here is that it runstwine check
which checks that the long description will parse correctly on PyPi, that's it.I would probably remove this workflow entirely upon second though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, upon looking deeper, I think the mypy compliance thing is wrong, I originally submitted a PR to autosklearn before joining the group, which checks for the PEP compliance. I think it got lost in translation to the workflow files in all our repos. It should be
mypy -c "import autoPyTorch"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the compliance check