Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package management and update polars #218

Merged
merged 11 commits into from
Oct 16, 2024
Merged
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
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

<!-- Release checklist:
- Update the version in
- [ ] docs/source/conf.py
- [ ] flasc/VERSION
- [ ] pyproject.toml
- [ ] Create a tag in the NREL/FLASC repository
-->
6 changes: 2 additions & 4 deletions flasc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

__author__ = """Bart Doekemeijer, Paul Fleming"""
__email__ = "paul.fleming@nrel.gov, michael.sinner@nrel.gov"
__version__ = "0.1.0"

from pathlib import Path
from importlib.metadata import version

with open(Path(__file__).parent / "version.py") as _version_file:
__version__ = _version_file.read().strip()
__version__ = version("flasc")

# from . import (
# optimization,
Expand Down
4 changes: 2 additions & 2 deletions flasc/analysis/energy_ratio.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def _compute_energy_ratio_single(
index="wd_bin",
aggregate_function="first",
)
.rename({f"energy_ratio_df_name_{n}": n for n in df_names})
.rename({f"count_df_name_{n}": f"count_{n}" for n in df_names})
.rename({f"energy_ratio_{n}": n for n in df_names})
.rename({f"count_{n}": f"count_{n}" for n in df_names})
.sort("wd_bin")
)

Expand Down
1 change: 0 additions & 1 deletion flasc/data_processing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

__author__ = """Bart Doekemeijer, Paul Fleming"""
__email__ = "paul.fleming@nrel.gov, michael.sinner@nrel.gov"
__version__ = "0.1.0"

from pathlib import Path

Expand Down
1 change: 0 additions & 1 deletion flasc/model_fitting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

__author__ = """Bart Doekemeijer, Paul Fleming"""
__email__ = "paul.fleming@nrel.gov, michael.sinner@nrel.gov"
__version__ = "0.1.0"

from pathlib import Path

Expand Down
2 changes: 1 addition & 1 deletion flasc/utilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

__author__ = """Bart Doekemeijer, Paul Fleming"""
__email__ = "paul.fleming@nrel.gov, michael.sinner@nrel.gov"
__version__ = "1.0"


from pathlib import Path

Expand Down
4 changes: 2 additions & 2 deletions flasc/utilities/energy_ratio_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def add_wd(df_: pl.DataFrame, wd_cols: List[str], remove_all_nulls: bool = False
# Add the cosine columns
.with_columns(
[
pl.col(wd_cols).mul(np.pi / 180).cos().suffix("_cos"),
pl.col(wd_cols).mul(np.pi / 180).sin().suffix("_sin"),
pl.col(wd_cols).mul(np.pi / 180).cos().name.suffix("_cos"),
pl.col(wd_cols).mul(np.pi / 180).sin().name.suffix("_sin"),
]
)
)
Expand Down
1 change: 0 additions & 1 deletion flasc/version.py

This file was deleted.

63 changes: 61 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,67 @@
[build-system]
requires = ["setuptools >= 40.6.0", "wheel"]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "flasc"
version = "2.0.1"
description = "FLASC provides a rich suite of analysis tools for SCADA data filtering & analysis, wind farm model validation, field experiment design, and field experiment monitoring."
readme = "README.md"
requires-python = ">=3.9"
authors = [
{ name = "Paul Fleming", email = "paul.fleming@nrel.gov" },
{ name = "Michael (Misha) Sinner", email = "Michael.Sinner@nrel.gov" },
{ name = "Eric Simley", email = "Eric.Simley@nrel.gov" },
]
license = { file = "LICENSE.txt" }
keywords = ["flasc"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
]
dependencies = [
"bokeh>=2, <4",
"floris~=4.0",
"feather-format~=0.0",
"ipympl~=0.9",
"matplotlib~=3.8",
"numpy~=1.20",
"pandas~=2.0",
"SALib~=1.0",
"scipy~=1.1",
"streamlit~=1.0",
"tkcalendar~=1.0",
"seaborn~=0.0",
"polars~=1.0",
"ephem",
"coloredlogs~=15.0",
]

[project.optional-dependencies]
docs = [
"jupyter-book",
"sphinx-book-theme",
"sphinx-autodoc-typehints",
"sphinxcontrib-autoyaml",
"sphinxcontrib.mermaid"
]
develop = [
"pytest",
"pre-commit",
"ruff",
"isort"
]

[tool.setuptools.packages.find]
include = ["flasc*"]

[project.urls]
Homepage = "https://github.com/NREL/flasc"
Documentation = "https://readthedocs.org"


[coverage.run]
# Coverage.py configuration file
Expand All @@ -25,7 +85,6 @@ filterwarnings = [

# Exclude a variety of commonly ignored directories.
exclude = [
"flasc/version.py",
".bzr",
".direnv",
".eggs",
Expand Down
94 changes: 0 additions & 94 deletions setup.py

This file was deleted.

Loading