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

Simply configuration and overrides #22

Merged
merged 1 commit into from
Dec 12, 2022
Merged

Conversation

chrisbloom7
Copy link
Collaborator

@chrisbloom7 chrisbloom7 commented Dec 10, 2022

Simplifies configuration, prepares for #17

  • removes Annealing::Configuration::Configurator
  • moves config validation into Annealing::Configuration
  • passes around instances of Annealing::Configuration instead of trying to look through different scopes of config options
  • lets Annealing::Configuration instances clone themselves with overrides

This diff is kind of clunky but I couldn't see a way to break it down any further without leaving it messier or broken

Planned next:

  • Normalize custom function interfaces #17
  • Add RDoc(-ish) comments to classes and public methods
  • Add some more built-in cool down/termination condition functions
  • Rename methods/variables in Simulator to be more annealing-like

@chrisbloom7 chrisbloom7 requested a review from 3zcurdia December 10, 2022 03:27
@chrisbloom7 chrisbloom7 self-assigned this Dec 10, 2022
Copy link
Owner

@3zcurdia 3zcurdia left a comment

Choose a reason for hiding this comment

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

In general LGTM since its removing LOC from the configurator

new_temperature = cool_down.call(metal.energy, metal.temperature,
cooling_rate, steps)
# Wrapper for public methods that may use a custom configuration
def with_runtime_config(config_hash)
Copy link
Owner

Choose a reason for hiding this comment

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

Clever solution 💡

@3zcurdia 3zcurdia merged commit 08bbfea into main Dec 12, 2022
@3zcurdia 3zcurdia deleted the chrisbloom7/config-cleanup branch December 12, 2022 04:20
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.

2 participants