Skip to content

readme roadsigns#103

Merged
pavelkomarov merged 2 commits intomasterfrom
readme-roadsigns
Jun 27, 2025
Merged

readme roadsigns#103
pavelkomarov merged 2 commits intomasterfrom
readme-roadsigns

Conversation

@pavelkomarov
Copy link
Collaborator

This one is for extra credit, not part of the main work, just a repo touch up.

*.whl
.vscode
docs/build
pynumdiff/_version.py
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jacob-Stevens-Haas had a whole other .gitignore file for this, which I don't think is actually necessary.


## Structure

PyNumDiff/
Copy link
Collaborator Author

@pavelkomarov pavelkomarov Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}"])
Copy link
Collaborator Author

@pavelkomarov pavelkomarov Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pavelkomarov pavelkomarov changed the title trying to be more specific about what's what so others don't have to dig down in every file readme roadsigns Jun 25, 2025
@pavelkomarov pavelkomarov merged commit d0f6cd4 into master Jun 27, 2025
1 check passed
@pavelkomarov pavelkomarov deleted the readme-roadsigns branch June 27, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant