Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace multifunction with class methods for apply_restrictions #274

Closed
wants to merge 18 commits into from

Conversation

mscroggs
Copy link
Member

@mscroggs mscroggs commented Apr 24, 2024

  • Moved functionality in multifunction in algorithms/apply_restrictions.py to methods implemented on each class.
  • Renamed the current dag mapping functions to *_legacy and added copies of these without the legacy that use class methods instead of multifunctions. (Short-to-medium term goal will be to move all other algorithms over to using the non-legacy functions then remove the legacy functions. This may be better done with multiple PRs rather than one huge PR for all algorithms)
  • Added cutoff decorator for class methods and make traversal function use this to check for cutoffs instead of requiring all types to have a typecode.

I think this is a step in the right direction, but other opinions are welcome.

@mscroggs mscroggs marked this pull request as draft April 24, 2024 08:38
@mscroggs mscroggs closed this Jul 20, 2024
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