Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelZe committed Oct 30, 2023
2 parents 3ea5e2b + affdb68 commit 80b844c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 58 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/action_python.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
name: Python package

on:
push:
paths:
- 'src/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create application default credentials
run: |
mkdir -p $HOME/.config/gcloud/
echo "$APP_CRED" >> $HOME/.config/gcloud/application_default_credentials.json
chmod 600 $HOME/.config/gcloud/application_default_credentials.json
shell: bash
env:
APP_CRED: ${{secrets.APPLICATION_DEFAULT_CREDENTIALS}}
- name: Set up wandb api key
run: |
echo "$WANDB_API_KEY" >> $HOME/.netrc
chmod 600 $HOME/.netrc
shell: bash
env:
WANDB_API_KEY: ${{secrets.WANDB_API_KEY}}
- name: Install poetry
run: pipx install poetry
- name: Set up Python and install dependencies
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: install poetry
run: poetry install
- name: Test with pytest
run: |
poetry run pytest --cov=src tests/ --doctest-modules --junitxml=cover/xunit-result.xml --cov-report xml:cover/coverage.xml
poetry run coverage json -o cover/coverage.json
- name: "Extract numbers from cov report"
run: |
export TOTAL=$(python -c "import json;print(json.load(open('cover/coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
- name: "Make badge"
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: e2578f2f3e6322d299f1cb2e294d6b0b
filename: covbadge.json
label: Coverage
message: ${{ env.total }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total }}
name: Python package

on:
push:
paths:
- 'src/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create application default credentials
run: |
mkdir -p $HOME/.config/gcloud/
echo "$APP_CRED" >> $HOME/.config/gcloud/application_default_credentials.json
chmod 600 $HOME/.config/gcloud/application_default_credentials.json
shell: bash
env:
APP_CRED: ${{secrets.APPLICATION_DEFAULT_CREDENTIALS}}
- name: Set up wandb api key
run: |
echo "$WANDB_API_KEY" >> $HOME/.netrc
chmod 600 $HOME/.netrc
shell: bash
env:
WANDB_API_KEY: ${{secrets.WANDB_API_KEY}}
- name: Install poetry
run: pipx install poetry
- name: Set up Python and install dependencies
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: install poetry
run: poetry install
- name: Test with pytest
run: |
poetry run pytest --cov=src tests/ --doctest-modules --junitxml=cover/xunit-result.xml --cov-report xml:cover/coverage.xml
poetry run coverage json -o cover/coverage.json
- name: "Extract numbers from cov report"
run: |
export TOTAL=$(python -c "import json;print(json.load(open('cover/coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
- name: "Make badge"
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: e2578f2f3e6322d299f1cb2e294d6b0b
filename: covbadge.json
label: Coverage
message: ${{ env.total }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total }}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers = [
]

[tool.poetry.dependencies]
# https://stackoverflow.com/a/76647180/5755604
catboost = "^1.1"
click = "^8.1.7"
fastparquet = "^2023.8.0"
Expand All @@ -31,17 +32,16 @@ pandas = "^1.5.1"
pandas-datareader = "^0.10.0"
psutil = "^5.9.5" #needed by w&b
pydantic = {extras = ["dotenv"], version = "^2.4.2"}
pydantic-settings = "^2.0.3"
python = "^3.8"
pyyaml = "^6.0.1"
requests = "^2.31.0"
scikit-learn = "^1.1.3"
seaborn = "^0.12.2"
# https://stackoverflow.com/a/76647180/5755604
torch = ">=2.0.0, !=2.0.1, !=2.1.0"
tqdm = "^4.66.1"
typer = "^0.9.0"
wandb = "^0.13.5"
pydantic-settings = "^2.0.3"


[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 80b844c

Please sign in to comment.