Skip to content

Commit

Permalink
feat: polars prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff committed Feb 9, 2024
1 parent dd40429 commit 36e6837
Show file tree
Hide file tree
Showing 49 changed files with 1,115 additions and 1,294 deletions.
1 change: 0 additions & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ inputs:
python-version:
description: "Which Python version to run on"
required: true
default: "3.9"

runs:
using: "composite"
Expand Down
1 change: 0 additions & 1 deletion .github/actions/test_tutorials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ inputs:
python-version:
description: "Which Python version to run on"
required: true
default: "3.9"
runs:
using: "composite"
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main_test_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: [ "3.10", "3.11", "3.12"]

env:
python-version: ${{ matrix.python-version }}
Expand All @@ -37,7 +37,7 @@ jobs:
jupyter-tutorials:
runs-on: ${{ matrix.os }}
env:
python-version: "3.9"
python-version: "3.10"

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_type_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/setup-python@v4
id: setup_python
with:
python-version: "3.9"
python-version: "3.10"

- name: Install dependencies
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ poetry.lock
**/tmp/
**/.tmp/

*nbconvert*
*nbconvert*
.testmondata
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
default_stages: [commit]

repos:
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
rev: v0.2.1
hooks:
- id: ruff
args:
Expand All @@ -19,6 +14,9 @@ repos:
"--fix",
"--exit-non-zero-on-fix",
]
types_or: [ python, pyi, jupyter ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.10

RUN apt-get update && apt-get install -y curl

Expand Down
17 changes: 4 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@
html_show_sourcelink = True


source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}

html_static_path = ["_static"]
html_favicon = "_static/favicon.ico"
Expand All @@ -98,21 +95,15 @@
</svg>
""",
"class": "",
},
}
],
"source_repository": repo_url,
"source_branch": "main",
"source_directory": "docs/",
"light_logo": "icon.png",
"dark_logo": "icon_dark.png",
"light_css_variables": {
"color-brand-primary": "#ff5454",
"color-brand-content": "#ff7575",
},
"dark_css_variables": {
"color-brand-primary": "#ff8f8f",
"color-brand-content": "#ff8f8f",
},
"light_css_variables": {"color-brand-primary": "#ff5454", "color-brand-content": "#ff7575"},
"dark_css_variables": {"color-brand-primary": "#ff8f8f", "color-brand-content": "#ff8f8f"},
"sidebar_hide_name": False,
"navigation_with_keys": True,
}
16 changes: 8 additions & 8 deletions docs/tutorials/01_basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,9 @@
"metadata": {},
"outputs": [],
"source": [
"from timeseriesflattener.feature_specs.single_specs import OutcomeSpec\n",
"from timeseriesflattener.aggregation_fns import maximum\n",
"import pandas as pd\n",
"from timeseriesflattener.aggregation_fns import maximum\n",
"from timeseriesflattener.feature_specs.single_specs import OutcomeSpec\n",
"\n",
"test_df = pd.DataFrame()\n",
"\n",
Expand Down Expand Up @@ -944,9 +944,9 @@
"metadata": {},
"outputs": [],
"source": [
"from timeseriesflattener.feature_specs.single_specs import PredictorSpec, StaticSpec\n",
"from timeseriesflattener.aggregation_fns import mean\n",
"import numpy as np\n",
"from timeseriesflattener.aggregation_fns import mean\n",
"from timeseriesflattener.feature_specs.single_specs import PredictorSpec, StaticSpec\n",
"\n",
"temporal_predictor_spec = PredictorSpec(\n",
" timeseries_df=df_synth_predictors,\n",
Expand Down Expand Up @@ -1116,9 +1116,7 @@
],
"source": [
"sex_predictor_spec = StaticSpec(\n",
" timeseries_df=df_synth_sex,\n",
" feature_base_name=\"female\",\n",
" prefix=\"pred\",\n",
" timeseries_df=df_synth_sex, feature_base_name=\"female\", prefix=\"pred\"\n",
")\n",
"\n",
"df_synth_sex"
Expand Down Expand Up @@ -1185,7 +1183,9 @@
"metadata": {},
"outputs": [],
"source": [
"ts_flattener.add_spec([sex_predictor_spec, temporal_predictor_spec, temporal_interval_predictor_spec, outcome_spec])"
"ts_flattener.add_spec(\n",
" [sex_predictor_spec, temporal_predictor_spec, temporal_interval_predictor_spec, outcome_spec]\n",
")"
]
},
{
Expand Down
Loading

0 comments on commit 36e6837

Please sign in to comment.