Conversation
…dig down in every file like I did
| *.whl | ||
| .vscode | ||
| docs/build | ||
| pynumdiff/_version.py |
There was a problem hiding this comment.
@Jacob-Stevens-Haas had a whole other .gitignore file for this, which I don't think is actually necessary.
|
|
||
| ## Structure | ||
|
|
||
| PyNumDiff/ |
There was a problem hiding this comment.
Having a file structure like this isn't super informative, because a user can just go click down and navigate the structure to see what's there. If we go beyond the names to say what things are meant to contain and be, to share our organizational conceptualization, that can be more helpful.
|
|
||
| ### Prerequisite | ||
|
|
||
| PyNumDiff requires common packages like `numpy`, `scipy`, `matplotlib`, `pytest` (for unittests), `pylint` |
There was a problem hiding this comment.
pytest and pylint actually aren't required to run the code, so I've put them in the non-essential section.
|
|
||
| ### Running the tests | ||
|
|
||
| We are using Travis CI for continuous intergration testing. You can check out the current status |
There was a problem hiding this comment.
Outdated reference to travis, RIP.
| sys.exit(1) | ||
|
|
||
| print("Congratulations! Your code has passed the PEP8 style score threshold: %f!" % THRESHOLD) No newline at end of file | ||
| run = lint.Run([sys.argv[1], f"--fail-under={THRESHOLD}"]) |
There was a problem hiding this comment.
I was having some trouble because the do_exit parameter no longer exists, so Run always does an exit call, which means anything below it doesn't get run. There are ways to catch that exit and continue with a script, but it turns out you can pass the threshold to the Run, and then the exit code returned by python3 linting.py your_file.py is 0 or nonzero as appropriate. I didn't think the last congratulatory or failure message was actually necessary, since if you're running this script you're probably aware of the threshold and can read a pylint printout in all its verbose glory.
| - `kalman_smooth` contains Kalman filtering and smoothing methods, currently constant-derivative methods up to 3rd order (jerk) and a classic linear Kalman Filter based on known dynamics. | ||
| - `linear_model` is a bit of a miscellaneous module, containing methods which work linearly: `lineardiff`, `polydiff`, `savgoldiff`, and `spectraldiff`. | ||
| - `optimize` contains code to find best parameter settings for methods, tuned using Nelder-Mead according to the paper "Numerical differentiation of noisy data: A unifying multi-objective optimization framework" | ||
| - `smooth_finite_difference` contains methods which do a smoothing step followed by simple finite difference. |
There was a problem hiding this comment.
I think we should maybe restructure the modules at some point. smooth_finite_difference and finite_difference can probably be combined. And linear_model may need a different name.
This one is for extra credit, not part of the main work, just a repo touch up.