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

Refactor ApplicationBuilder into Ligare.programming, removing it from Ligare.web #165

Merged
merged 7 commits into from
Jan 7, 2025

Conversation

aholmes
Copy link
Member

@aholmes aholmes commented Jan 6, 2025

The ApplicationBuilder class currently exists in Ligare.web. This works fine for building web applications, but Ligare is meant to be neutral regarding the type of application a developer wants to build, especially CLI apps. Currently, using ApplicationBuilder means pulling in Ligare.web as a dependency. In order to avoid that, this change refactors ApplicationBuilder to instead be defined in Ligare.programming, removing it from Ligare.web. From there, Ligare.web extends the refactored ApplicationBuilder into its own builder for web applications.

This refactor also required adjustments to the Config system in Ligare.programming to allow more neutral handling of application configuration needs.

The CreateFlaskApp test class has been updated to support the refactors.

Some error messages have been updated to be less obtuse.

Important: the previously deprecated create_app and App[T].create_app methods have been removed. It was not possible to update these methods to support the refactor without muddying other code unnecessarily, so this PR removes them.

This class is partly a copy of the application builder in Ligare.web,
but more generic. This is a precursor to further refactoring and
changing Ligare.web to use the Ligare.programming builder.
This is a breaking change to remove the previously deprecated
`create_app` and `App[T].create_app` functions. Use
`ApplicationBuilder`.
…rogramming`.

This change is necessary to allow non-web applications like CLI apps.
@aholmes aholmes requested a review from a team as a code owner January 6, 2025 21:43
@aholmes aholmes added enhancement New feature or request Ligare.web Any changes related to Ligare.web Ligare.programming Any changes related to Ligare.programming labels Jan 6, 2025
@aholmes aholmes merged commit 700aa65 into aholmes-add-documentation Jan 7, 2025
11 checks passed
@aholmes aholmes deleted the aholmes-refactor-appbuilder branch January 7, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Ligare.programming Any changes related to Ligare.programming Ligare.web Any changes related to Ligare.web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants