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

new release 0.6.1 #101

Merged
merged 27 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f640698
better description of development process (#70)
rwijtvliet Dec 7, 2023
378b84f
Update README.rst (#71)
rwijtvliet Dec 7, 2023
fc70808
feat: bump version to latest release +1 (#69)
stefankeidel Dec 7, 2023
3987b88
Wavgfix (#62)
rwijtvliet Dec 12, 2023
35b0704
additional tests (#74)
rwijtvliet Feb 1, 2024
5a3263b
Portfolyo Release 0.5.10 (#75)
rwijtvliet Feb 1, 2024
7453eec
resolving merge conflicts
rwijtvliet Feb 1, 2024
3133903
Slice (#78)
Pizza2Pizza Feb 9, 2024
47901d6
Standardise sod (#82)
Pizza2Pizza Apr 8, 2024
c619cea
Concat (#83)
Pizza2Pizza Apr 10, 2024
d26f3e9
Toplevelfunctions (#84)
rwijtvliet Apr 17, 2024
ad79fa2
Intersect (#79)
Pizza2Pizza Apr 19, 2024
2666c1f
Plot children (#87)
Pizza2Pizza Apr 30, 2024
cda6bfb
Structure (#90)
Pizza2Pizza May 24, 2024
3ed3974
Portfolyo Release 0.6.0
rwijtvliet May 26, 2024
f0742a3
Portfolyo Release 0.6.0 (#91)
rwijtvliet May 26, 2024
16c4006
Merge branch 'main' into 0.6.0
rwijtvliet May 27, 2024
81e6aa4
0.6.0 (#93)
rwijtvliet May 27, 2024
16e62ca
Merge branch 'develop' into 0.6.0
rwijtvliet May 27, 2024
9684b27
0.6.0 (#94)
rwijtvliet May 27, 2024
6bc2a07
Merge branch 'main' into develop
rwijtvliet May 27, 2024
158b4d6
i did Merge branch 'develop' into 0.6.0
rwijtvliet May 27, 2024
0f49c1f
Merge pull request #95 from rwijtvliet/0.6.0
rwijtvliet May 27, 2024
9364444
Using fixtures (#96)
rwijtvliet May 28, 2024
242936d
Aggregate (#97)
Pizza2Pizza Jul 3, 2024
b8febaa
Pandas fix (#99)
Pizza2Pizza Jul 31, 2024
8cc5986
Portfolyo Release 0.6.1 (#100)
Pizza2Pizza Aug 14, 2024
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
12 changes: 9 additions & 3 deletions .github/workflows/ci-on-pullreq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ on: [pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
env:
MPLBACKEND: Agg
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

python-version: ["3.10", "3.11", "3.12"]
exclude:
# Exclude Python 3.10 on macOS latest
- os: "macos-latest"
python-version: "3.10"
steps:
- name: Checkout source
uses: actions/checkout@v2
Expand All @@ -20,8 +25,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64


- name: Install
- name: Install poetry
run: |
pip install poetry
poetry install --with dev,test
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
test-output.xml
cover/

# Translations
Expand Down Expand Up @@ -160,3 +161,4 @@ cython_debug/
.issues/
.DS_Store
test.xlsx

12 changes: 6 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ build:
tools:
python: "3.10"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually

post_install:
- pip install poetry
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with docs
- poetry export -f requirements.txt --without-hashes --without-urls --with docs -o requirements.txt
- pip install -r requirements.txt
#- pip list


sphinx:
configuration: docs/conf.py
Expand Down
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=========
portfolyo
=========

Expand Down Expand Up @@ -28,6 +29,8 @@ portfolyo
Portfolyo is a Python package to analyse and manipulate timeseries related to power
and gas offtake portfolios.


------------
Installation
------------

Expand All @@ -45,13 +48,16 @@ NB: this package is under active development and the API will change without pri
portfolyo = "x.y.z"
-------------
Documentation
-------------

Documentation is hosted on readthedocs:

https://portfolyo.readthedocs.io/


----------
Repository
----------

Expand All @@ -60,6 +66,7 @@ The git repository is hosted on github:
http://www.github.com/rwijtvliet/portfolyo


----------
Developing
----------

Expand All @@ -74,6 +81,16 @@ the commit hooks.
Feature branches are merged into the ``develop`` branch via pull request.


Internal dependencies
---------------------

Inside the package, modules depend on each other in the following chain. A module may depend on another module if it is further to the left:

tools >> pfline >> pfstate >> tools2


----------
Publishing
----------

Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def sizeof(o):

def benchmark_pfline(df):
for le, ru in tqdm.tqdm(zip(LENGTHS, RUNS)):
i = pd.date_range("2020", periods=le, freq="15T")
i = pd.date_range("2020", periods=le, freq="15min")
for cols in ["q", "p", "qr", "wp"]:
print(f"{le=} {cols=}")
data = pd.DataFrame({c: np.linspace(1, 1000, le) for c in cols}, i)
Expand Down Expand Up @@ -99,7 +99,7 @@ def benchmark_pfline(df):
def benchmark_pfstate(df):
for le, ru in tqdm.tqdm(zip(LENGTHS, RUNS)):
print(f"{le=}")
i = pd.date_range("2020", periods=le, freq="15T")
i = pd.date_range("2020", periods=le, freq="15min")
w_offtake = pf.dev.w_offtake(i)
offtake = pf.PfLine(w_offtake)
unsourced = pf.PfLine(pf.dev.p_marketprices(i))
Expand Down
Empty file modified dev_scripts/sphinx_autorun.sh
100644 → 100755
Empty file.
14 changes: 7 additions & 7 deletions docs/core/interoperability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In the code examples below, the following imports are assumed and variables are

import portfolyo as pf
import pandas as pd
idx = pd.date_range("2023", freq="AS", periods=2)
idx = pd.date_range("2023", freq="YS", periods=2)

---------
One value
Expand Down Expand Up @@ -82,7 +82,7 @@ For timeseries, ``pandas.Series`` are used. These can be "unit-agnostic" (i.e.,
# --- hide: start ---
import portfolyo as pf
import pandas as pd
idx = pd.date_range("2023", freq="AS", periods=2)
idx = pd.date_range("2023", freq="YS", periods=2)
# --- hide: stop ---
pd.Series([50, 56.0], idx, dtype="pint[Eur/MWh]") # unit-aware
# --- hide: start ---
Expand All @@ -103,7 +103,7 @@ To pass several timeseries, we can use:
# --- hide: start ---
import portfolyo as pf
import pandas as pd
idx = pd.date_range("2023", freq="AS", periods=2)
idx = pd.date_range("2023", freq="YS", periods=2)
# --- hide: stop ---
{"p": pd.Series([50, 56], idx), "w": pd.Series([120, 125], idx, dtype="pint[MW]")}
# --- hide: start ---
Expand All @@ -118,7 +118,7 @@ To pass several timeseries, we can use:
# --- hide: start ---
import portfolyo as pf
import pandas as pd
idx = pd.date_range("2023", freq="AS", periods=2)
idx = pd.date_range("2023", freq="YS", periods=2)
# --- hide: stop ---
pd.DataFrame({"p": [50, 56], "w": [120, 125]}, idx)
# --- hide: start ---
Expand All @@ -139,7 +139,7 @@ Dictionaries are the most versatily of these objects. They can be used to pass a
# --- hide: start ---
import portfolyo as pf
import pandas as pd
idx = pd.date_range("2023", freq="AS", periods=2)
idx = pd.date_range("2023", freq="YS", periods=2)
# --- hide: stop ---
d1 = {"p": 50}
d2 = {"p": 50, "w": 120}
Expand Down Expand Up @@ -194,7 +194,7 @@ Footnotes
.. code-block:: python
:emphasize-lines: 3,4

>>> idx = pandas.date_range("2023", freq="AS", periods=2)
>>> idx = pandas.date_range("2023", freq="YS", periods=2)
>>> s_agn = pandas.Series([50, 56], idx) # unit-agnostic
>>> s1 = s_agn.astype("pint[Eur/MWh]") # unit-aware

Expand All @@ -212,7 +212,7 @@ Footnotes
.. code-block:: python
:emphasize-lines: 4, 7

>>> idx = pandas.date_range("2023", freq="AS", periods=2)
>>> idx = pandas.date_range("2023", freq="YS", periods=2)
>>> s_price = pandas.Series([50, 56], idx, dtype="pint[Eur/MWh]")
>>> s_volume = pandas.Series([120, 125], idx, dtype="pint[MW]")
>>> df1 = pandas.DataFrame({"p": s_price, "w": s_volume})
Expand Down
Loading
Loading