-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GKS hackathon changes tracking (#28)
* Add dependencies to pyproject, and optional dev * Delete .requirements.txt * Add latest ruff as dev dependency * Improve README * Add ci.yaml github action. Add ruff cfg to pyproject * Fix easy lint issues * Format code * Add `pre-commit` script * Type hints and comments * Add templates * Make devready install .[dev] * Delete all json/rst files compiled by tests. Aren't used. --------- Co-authored-by: Liam Mulhall <liammulh@gmail.com> Co-authored-by: Terry ONeill <toneill@broadinstitute.org> Co-authored-by: Liam Mulhall <liammulh@stanford.edu> Co-authored-by: Kori Kuzma <korikuzma@gmail.com>
- Loading branch information
1 parent
2ee0928
commit e019b80
Showing
58 changed files
with
450 additions
and
2,518 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
architecture: 'x64' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[dev]' | ||
- name: Run lint + format | ||
run: | | ||
ruff check src | ||
- name: Run tests | ||
run: pytest |
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 |
---|---|---|
|
@@ -132,4 +132,5 @@ dmypy.json | |
Pipfile* | ||
|
||
# IDEs | ||
.vscode | ||
.vscode | ||
.idea |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
# This pre-commit script should be placed in the .git/hooks/ directory. | ||
# It runs code quality checks prior to a commit. | ||
|
||
|
||
# Get and change to the root of the repo | ||
project_root_dir=`git rev-parse --show-toplevel` | ||
cd "$project_root_dir" || exit 1 | ||
|
||
# Immediately exit if there's an error. | ||
set -e | ||
|
||
ruff check # Run the linter. | ||
ruff check --select I --fix # Sort imports. | ||
ruff format # Run the formatter. | ||
pytest # Run the test suite. |
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,12 +1,15 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import yaml | ||
import json | ||
import sys | ||
|
||
import yaml | ||
|
||
|
||
def cli(): | ||
yaml_schema = yaml.load(sys.stdin, Loader=yaml.SafeLoader) | ||
json.dump(yaml_schema, sys.stdout, indent=3) | ||
|
||
|
||
if __name__ == "__main__": | ||
cli() | ||
cli() |
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.