Skip to content
Open

haya #889

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Lint
# name: Lint

on: [push, pull_request]
# on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Currently only checking instead of auto formatting
- uses: jpetrucciani/black-check@master
# - uses: psf/black@stable
- name: Install Dependencies
run: pip install -r requirements-test.txt
- name: black check diff
run: black --diff .
# jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# # Currently only checking instead of auto formatting
# - uses: jpetrucciani/black-check@master
# # - uses: psf/black@stable
# - name: Install Dependencies
# run: pip install -r requirements-test.txt
# - name: black check diff
# run: black --diff .
8 changes: 5 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: build

on: [push, pull_request]

# on: [push, pull_request]
on:
workflow_dispatch:

jobs:
build:
# [macos-latest, macos-latest, windows-latest]
Expand All @@ -10,7 +12,7 @@ jobs:
# You can use PyPy versions in python-version.
# For example, pypy2 and pypy3
matrix:
python-version: [3.7, 3.8]
python-version: [3.8]

steps:
- uses: actions/checkout@v2
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/pypi-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
name: Deploy package to PyPI

on:
release:
types: [published]
workflow_dispatch:
# release:
# types: [published]

jobs:
deploy:
Expand All @@ -25,8 +26,21 @@ jobs:
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
# with:
# user: __token__
# password: ${{ secrets.PY_PI }}


- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
password: ${{ secrets.PYPI_TEST }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PY_PI }}
13 changes: 7 additions & 6 deletions tests/orbit/diagnostics/test_wbic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from orbit.models import LGT, DLT, KTR, KTRLite

seed_out=6666

@pytest.mark.parametrize("estimator", ["stan-mcmc", "stan-map"])
def test_wbic_dlt(make_weekly_data, estimator):
Expand All @@ -15,7 +16,7 @@ def test_wbic_dlt(make_weekly_data, estimator):
seasonality=52,
num_warmup=100,
num_sample=100,
seed=6666,
seed=seed_out,
estimator=estimator,
)

Expand All @@ -38,7 +39,7 @@ def test_wbic_lgt(make_weekly_data):
seasonality=52,
num_warmup=100,
num_sample=100,
seed=6666,
seed=seed_out,
estimator="stan-mcmc",
)
wbic_val1 = lgt1.fit_wbic(df=train_df)
Expand All @@ -50,7 +51,7 @@ def test_wbic_lgt(make_weekly_data):
seasonality=52,
num_steps=100,
num_sample=100,
seed=6666,
seed=seed_out,
estimator="pyro-svi",
)
wbic_val2 = lgt2.fit_wbic(df=train_df)
Expand All @@ -62,7 +63,7 @@ def test_wbic_lgt(make_weekly_data):
date_col="week",
regressor_col=list("abcdef"),
seasonality=52,
seed=6666,
seed=seed_out,
estimator="stan-map",
)
lgt3.fit(df=train_df)
Expand All @@ -79,7 +80,7 @@ def test_wbic_ktr(make_weekly_data):
seasonality=52,
num_steps=100,
num_sample=100,
seed=6666,
seed=seed_out,
estimator="pyro-svi",
)

Expand All @@ -94,7 +95,7 @@ def test_wbic_ktrlite(make_weekly_data):
response_col="response",
date_col="week",
seasonality=52,
seed=6666,
seed=seed_out,
estimator="stan-map",
)

Expand Down