diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d1584a4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: "pip" # caching pip dependencies + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: test + run: pytest -s \ No newline at end of file diff --git a/.github/workflows/release-pypi-package.yml b/.github/workflows/release-pypi-package.yml new file mode 100644 index 0000000..34263c4 --- /dev/null +++ b/.github/workflows/release-pypi-package.yml @@ -0,0 +1,31 @@ +name: Release PyPI Package + +on: + release: + types: [published] + +jobs: + release_package: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: "pip" # caching pip dependencies + + - name: Build a binary wheel and a source tarball. + run: pip install wheel && python setup.py sdist bdist_wheel + + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index fde9e9a..eeecf65 100644 --- a/README.md +++ b/README.md @@ -27,16 +27,19 @@ Witness the seamless integration of temporal mastery into your coding sanctum! Embark on an odyssey through time as you harness the Timepulse magic. Transform raw time series data into insights that transcend the ordinary. Your code, now a symphony of temporal brilliance! +### How to use timepulse +#### Import ```{python} from timepulse.models.nn import MultivariateDenseWrapper from timepulse.utils.models import run_model +``` +#### Run model +```{python} y_pred, result_metrics = run_model(model_instance, X_train.values, y_train, X_val.values, y_val, verbose=0) - -print( y_pred, results_metrics) - ``` +#### Results example ``` [ 8287547.5 10593171. 12349981. 13229407. 10743349. 8585146. 7701900. 6690604.5 6193717.5 5999759. 5651086.5 5573535.5 diff --git a/requirements.txt b/requirements.txt index 49d105c..4b2e662 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,6 @@ pytest==7.4.3 scikit_learn==1.3.2 setuptools==65.5.0 tensorflow==2.14.0 -tensorflow_macos==2.14.0 +# tensorflow_macos==2.14.0 typer==0.9.0 xgboost==2.0.2