Metadata-Version: 2.4
Name: gds_risk_tools
Version: 0.1.1
Summary: Bootstrapped wind/load risk calculations
Author: Geoffrey De Sena
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scipy

Student: Geoffrey De Sena

This package represents the final project for the course Advanced Scientific
Programming with Python. In the project directory some data, some tests, and
a driver script are provided for showing the functionality of the package. 

For context, this package performs some of the final calculations needed for
an ongoing research project in which I propose a method for estimating the risk
that a certain penetration of offshore wind energy will lead to a shortage of
electricity generation. The sample data are based on some exaggerated power
flow modeling, so the probabilities are much higher than any sane system 
planner would ever accept. But it gives an indication of what the method does.

GenAI declaration: basically all of the code here was written by ChatGPT. Do I
understand every line? No, but I built the code with Chat piece by piece, 
requiring it to provide checks at each stage to ensure that the functions were 
performing as desired. This also doesn't make the course any less valuable. 
Previously, my code quickly became unmanageable monoliths of complexity. After
last week's course, I started paying much more attention to code structure.
What you see here is a major improvement over previous projects, which is 
important because I will want to share this code as supplementary material 
for the article I'm working on.


The following course topics are addressed:

Git
- This project has obviously been pushed to the Github repository where you
found it.

Modularity
- Functions have been broken into modules within the risk_tools package
- Functions are called by other modules instead of repeating code

Linting and formatting
- ran ruff and black on all the code
    - it didn't actually do much (ruff caught nothing) because Chat already
    writes clean code
    
Debugging
- I have a new method of debugging that is superior to everything you showed us:
    Ask Chat to regenerate the code. Works every time.
    
Profiling
- I asked Chat to generate some code and decorate the functions to help identify
    which operations were taking the most amount of time
- It turned out that the main bottleneck is fitting distributions to the massive
    wind speed data set. I think the only way to speed that up is to create my
    own optimized fitting algorithm, which I think is safely beyond the scope
    of this course.
- I have left the decorators and Chat's profiling function so that you can see
    it, but I will remove them when I continue developing this code.

Testing
- in the test/ directory, there are some tests for each of the functions
- these mostly just test that the outputs are the right shape because
    these are all statistical operations that a) depend on the input data
    and b) don't have a deterministic answer
- If I have time, I'll add some more detailed tests, but that's gonna take
    some thinking

Documentation
- all modules and functions have docstrings according to the numpydoc format
- Documentation is available at https://geoffrey-aspp-risk-tools.readthedocs.io/en/latest/

Packaging
- The package has been published on PyPI
- You might even be reading this here: https://pypi.org/project/gds-risk-tools/0.1.0/

Pandas
- I'll put this in here because it was part of the course, but I was already 
    working primarily with pandas before the course so most of the data is handled
    using dataframes.

