Replies: 1 comment
-
@PhilBrk8 The Limp Bizkit video made my morning. Thank you! Maybe propose refactoring pandas to be higher up in/removed from the pvlib “stack” before taking on typing? I type all my Python code now. However, I’ve largely given up this crusade for pvlib because the documentation is pretty damn good already and there’s no computational performance benefit for doing all the extra work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, I know v.1.0 is a huge proposal that would result in a lot of work for a lot of people - sorry in advance -
but please hear me out on how I got there:
I initially and naively wanted to see pvlib adopt polars for some performance gains, which would result in many breaking changes, so I dropped the idea because it seemed unrealistic.
But I am still 100% backing up the argument of 1926 for a transition from pandas to polars.
A while later I returned to the idea of working through the repo and re-run the command
pip install pvlib -e
with the goal in mind to implement type hints, which I have been proposed several times now. for example in #2062Since I would then go through every function and tough each file with this anyways, I ended up at the idea of bringing the code up to +3.10 syntax in general and reduce some code complexity and remove some legacy code on the way while implementing a more modern way to handle things.
If my goal is to reduce code complexity and improve maintainability, then I would drop support for legacy code and for example not provide input possibilities for pandas and polars timeseries for example.
And I believe the library is old and grown enough that its time to clean up a bit, focus on performance and maintainability,
and allow to ...
BUT - jokes aside:
Obviously this should not be done or taken lightly, so my overarching proposal / question is the following:
Is the community / are the maintainers in favour of setting up a branching strategy in this repo, with at least a development or maybe some form of v.1.0 branch?
I believe this might be a good way to benchmark the v.0xxx and v.1xxx performance against each other somewhere in the future.
here an example of how code could look like with applied changes and ruff formatter:
(compare to the solarposition.py file yourself if you want to check it out)
Beta Was this translation helpful? Give feedback.
All reactions