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

Feat: Remove need to import CacheConfig classes in addition to the Cache class #59

Merged
merged 25 commits into from
Feb 22, 2024

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Feb 21, 2024

This refactor streamlines cache creation by cutting in half the number of imports the user needs to deal with.

Instead of:

from airbyte.caches import SnowflakeCache, SnowflakeCacheConfig

cache = SnowflakeCache(
    SnowflakeCacheConfig(
        account=secret["account"],
        username=secret["username"],
        password=secret["password"],
        database=secret["database"],
        warehouse=secret["warehouse"],
        role=secret["role"],
    )
)

The user could just do this:

from airbyte.caches import SnowflakeCache

cache = SnowflakeCache(
    account=secret["account"],
    username=secret["username"],
    password=secret["password"],
    database=secret["database"],
    warehouse=secret["warehouse"],
    role=secret["role"],
)

@aaronsteers aaronsteers marked this pull request as draft February 21, 2024 17:36
@aaronsteers aaronsteers changed the title Refactor cache classes - remove need to import both thees Cache and CacheConfig classes Refactor: Remove need to import the CacheConfig class in addition to the Cache class Feb 21, 2024
@aaronsteers aaronsteers marked this pull request as ready for review February 21, 2024 18:58
@aaronsteers aaronsteers marked this pull request as draft February 21, 2024 18:58
@aaronsteers aaronsteers changed the title Refactor: Remove need to import the CacheConfig class in addition to the Cache class Feature: Remove need to import the CacheConfig class in addition to the Cache class Feb 22, 2024
@aaronsteers aaronsteers changed the title Feature: Remove need to import the CacheConfig class in addition to the Cache class Feature: Remove need to import CacheConfig classes in addition to the Cache class Feb 22, 2024
@aaronsteers aaronsteers changed the title Feature: Remove need to import CacheConfig classes in addition to the Cache class Feat: Remove need to import CacheConfig classes in addition to the Cache class Feb 22, 2024
@aaronsteers aaronsteers marked this pull request as ready for review February 22, 2024 20:24
@aaronsteers aaronsteers merged commit 7b527d0 into main Feb 22, 2024
10 of 12 checks passed
@aaronsteers aaronsteers deleted the aj/refactor-cache-classes branch February 22, 2024 20:35
@aaronsteers aaronsteers self-assigned this Mar 11, 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