diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml index 1de193ee..2a5516e2 100644 --- a/.github/workflows/black.yaml +++ b/.github/workflows/black.yaml @@ -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 . \ No newline at end of file +# 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 . diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4623102e..333bedd8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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] @@ -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 diff --git a/.github/workflows/pypi-deploy.yaml b/.github/workflows/pypi-deploy.yaml index 06a4f287..8c8c7928 100644 --- a/.github/workflows/pypi-deploy.yaml +++ b/.github/workflows/pypi-deploy.yaml @@ -6,8 +6,9 @@ name: Deploy package to PyPI on: - release: - types: [published] + workflow_dispatch: +# release: +# types: [published] jobs: deploy: @@ -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 }} \ No newline at end of file + 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 }} diff --git a/tests/orbit/diagnostics/test_wbic.py b/tests/orbit/diagnostics/test_wbic.py index 1c9205b2..f37578c3 100644 --- a/tests/orbit/diagnostics/test_wbic.py +++ b/tests/orbit/diagnostics/test_wbic.py @@ -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): @@ -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, ) @@ -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) @@ -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) @@ -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) @@ -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", ) @@ -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", )