Refactor: Modularized project into src/ layout and integrated pytest-…#2
Conversation
SebastianL18
left a comment
There was a problem hiding this comment.
Hi.
I am happy that the repository has been helpful for you. Thank you in advance for your ideas and contributions. The benchmark functions and files that you have created are really good, and will significantly improve this repository. I would like to add your contributions to the main branch after some discussion and feedback, because some of the implementations you have created are new for me!
I reviwed your files and leave some comments and suggestions. Additionally, I would be really grateful if you help me writhing a brief explanation about the new tests cases you created, that can be included in the README file.
I will be waiting for reply and feedback!
Best regards!
Sebastian Loaiza
| authors = [ | ||
| {name = "Sebastian Loaiza Elejalde", email = "author@example.com"}, | ||
| ] | ||
| dependencies = [ |
There was a problem hiding this comment.
Missing matplotlib dependency? In fact vecfit3.py imports this lib because it is used to plot fitting results. Probably it is necessary to add matplotlib as another dependency.
There was a problem hiding this comment.
oops, indeed i missed matplotlib suggestion
pyproject.toml
Outdated
| readme = "README.md" | ||
| requires-python = ">=3.8" | ||
| authors = [ | ||
| {name = "Sebastian Loaiza Elejalde", email = "author@example.com"}, |
There was a problem hiding this comment.
| {name = "Sebastian Loaiza Elejalde", email = "author@example.com"}, | |
| {name = "Sebastian Loaiza Elejalde", email = "sebloel18@gmail.com"}, |
pyproject.toml
Outdated
|
|
||
| [project] | ||
| name = "vectfit-python" | ||
| version = "0.1.0" |
There was a problem hiding this comment.
| version = "0.1.0" | |
| version = "1.3.1" |
Current version since I wrote the code locally. Just a suggestion
Co-authored-by: Sebastian Loaiza Elejalde <144065519+SebastianL18@users.noreply.github.com>
|
regarding the tests. the other two are recover and vector recover Performance Benchmarks (test_previous.py): Wraps the original real-world use cases (transformer data, 6x6 admittance matrices, etc.) to benchmark execution time . Scalar Recovery (test_recover.py): Generates synthetic data from ground-truth transfer functions to verify the algorithm recovers the known terms. Systematically tests asymptote configurations (asymp=1, 2, and 3) with D and E term recovery Vector Recovery (test_vector_recover.py): Validates correctness in multi-dimensional fitting (4xN). Includes tests with both uniform and randomized weighting arrays to verify the weighting implementation functions correctly. |
Hi!
I've been using your library for my master thesis (it's been of great help! c: ) and wanted to make little changes. Mostly use more vectorized calculations from numpy. So i created a PyTest testsuit, added some test of pole retrieval and let the existing test as benchmark of speed and accuracy.
I have been thinking, are the assert i added meaningful? perhaps i should add something more dynamic?
i also added a toml file to make it more like a python library.
Hope it helps :)