Skip to content

Automate Code Generation for New Configuration Settings #433

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

Merged
merged 6 commits into from
Jun 15, 2024

Conversation

samad-yar-khan
Copy link
Contributor

Linked Issue(s)

closes #432

Acceptance Criteria fulfillment

  • Improve setting creation dev experience.
  • Lower dev time for setting creation.
  • Limit required context for setting creation or make a way to provide context for the setting creation flow when needed.

Proposed changes (including videos or screenshots)

  • Added Comments for Code generation in all files which required changes for Setting Creation.
  • Added Script to automate Settings code creation by running python make_new_setting.py
  • After running the script you are prompted to enter a Setting type name followed by the required fields and their types. Enter done once all fields are added.
  • This will:
    • Add new setting type Enum
    • Add new setting dataclass
    • Add new validators
    • Add new adapters
    • Provide you with context where changes need to go 🥇
  • What you need to do:
    • Update imports for the new Setting dataclass (The script does not automaticallly imports as its more prone to errors)
    • Update what defaults you need for the setting fields.
    • Try using the APIs (Things should work 🎉 )
    • Update the boiler plate code if your setting needs it or is more complex and has non primitive types like uuids, some enums etc.
Screen.Recording.2024-06-15.at.3.41.07.PM.mov

Further comments

@samad-yar-khan samad-yar-khan changed the title Automate Boilerplate Code Generation for New Configuration Settings Automate Code Generation for New Configuration Settings Jun 15, 2024
@samad-yar-khan samad-yar-khan merged commit 1688441 into main Jun 15, 2024
3 checks passed
@samad-yar-khan samad-yar-khan deleted the make_settings_easier branch June 15, 2024 12:50
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.

Streamline/Automate the Process for Adding New Configuration Settings
2 participants