forked from logicalclocks/hopsworks-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FSTORE-1371][FSTORE-1346][FSTORE-1212] Migrate to ruff, pyproject.to…
…ml, upgrade doc dependencies (logicalclocks#227) * Upgrade dependencies, contributing.md, workflows * Fix contributing.md * Add minor change to contributing.md * Adapt to new material theme * Add minifier * Migrate to pyproject.toml * Change contributing * Run ruff check and ruff format * Minor mkdocs update * Update ruff and readme minor fix * Fix version typo * Add python version badges + code style changes * Fix import order messed up by merge * Add actual package to what should be installed * Fix color scheme * Add upper limit to the python version * Fix import order
- Loading branch information
Showing
80 changed files
with
653 additions
and
409 deletions.
There are no files selected for viewing
This file contains 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 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 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,27 +1,46 @@ | ||
name: pre-commit | ||
name: python | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
stylecheck: | ||
name: Lint and Stylecheck | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
- name: install deps | ||
run: pip install flake8==3.9.0 black==22.3.0 pre-commit-hooks==2.4.0 | ||
python-version: "3.11" | ||
|
||
- name: black | ||
run: black --check python/hsml | ||
- name: Get all changed files | ||
id: get-changed-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files_yaml: | | ||
src: | ||
- 'python/**/*.py' | ||
- '!python/tests/**/*.py' | ||
test: | ||
- 'python/tests/**/*.py' | ||
- name: install deps | ||
run: pip install ruff==0.4.1 | ||
|
||
- name: flake8 | ||
run: flake8 --config python/.flake8 python/hsml | ||
- name: ruff on python files | ||
if: steps.get-changed-files.outputs.src_any_changed == 'true' | ||
env: | ||
SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }} | ||
run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES | ||
|
||
- name: trailing-whitespace-fixer | ||
run: trailing-whitespace-fixer $(find python/hsml -type f) || exit 1 | ||
- name: ruff on test files | ||
if: steps.get-changed-files.outputs.test_any_changed == 'true' | ||
env: | ||
TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }} | ||
run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES | ||
|
||
- name: end-of-file-fixer | ||
run: end-of-file-fixer $(find python/hsml -type f) || exit 1 | ||
- name: ruff format --check $ALL_CHANGED_FILES | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }} | ||
run: ruff format $ALL_CHANGED_FILES |
This file contains 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 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 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 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 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 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.