Skip to content

Conversation

@ybnd
Copy link
Owner

@ybnd ybnd commented Jan 28, 2021

Implements #25

  • Pull out settings code from shapeflow/__init__.py
  • Clean up a bit
  • Refactor Settings
  • Implement a new field in Settings
  • Update previous tests
  • Test new field

ybnd added 4 commits January 28, 2021 06:52
The current implementation allows more dynamic, complex and circularly dependent definitions for the application settings by decoupling category definitions from the settings class

* shapeflow.core.settings defines settings: Settings
* other modules create Category subclasses (~pydantic)

* settings are loaded from JSON
   * stored in the instance under settings._loaded
   * when a new category is added, check whether it has an entry in settings._loaded. If it does, initialize the category with that state

* requests for settings ~ settings.get(SomeCategory)
   * returns the instance of this category stored in settings
   * if this category doesn't exist yet, an instance is added to settings
@ybnd ybnd force-pushed the dev/setting-default-config branch from fc22ec0 to 7e42b3b Compare January 30, 2021 12:13
@ybnd ybnd changed the base branch from master to main February 6, 2021 09:17
@ybnd ybnd force-pushed the main branch 8 times, most recently from 2cf281f to 4195d86 Compare May 24, 2021 11:27
@ybnd ybnd force-pushed the main branch 4 times, most recently from 70196b7 to 13c6b3f Compare June 6, 2021 22:26
@ybnd ybnd added this to the Optional milestone Aug 5, 2022
@ybnd ybnd modified the milestones: Optional, maybe someday Sep 10, 2022
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