Skip to content

Commit

Permalink
Merge pull request #18 from squaredev-io/workflows
Browse files Browse the repository at this point in the history
Added workflows
  • Loading branch information
stavrostheocharis authored Dec 13, 2023
2 parents 70829ba + cdc0bbd commit 03ac525
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions .github/workflows/release-pypi-package.yml
Original file line number Diff line number Diff line change
@@ -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 }}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 03ac525

Please sign in to comment.