Skip to content

Conversation

@vdonato
Copy link
Collaborator

@vdonato vdonato commented Apr 5, 2023

📚 Context

This PR reworks the API of the st.experimental_connection factory function. After some discussion, we
decided that it'd be better to flip the arguments so that the name of a connection comes before its type.
We also (although this is still being finalized) decided to allow users to specify the types of their connections
either via the corresponding section in the secrets.toml file or via kwarg to the factory function.

Note:

  • static typechecking tools will only be able to infer the exact type of a connection if specified via kwarg.
  • there are still some details about the exact behavior that we're ironing out, but tweaks from here
    should be quite straightforward, so it's worth reviewing this PR now and potentially making changes
    down the line.

@kajarenc
Copy link
Collaborator

kajarenc commented Apr 6, 2023

LGTM 👍

@vdonato vdonato merged this pull request into feature/st.experimental_connection Apr 6, 2023
@vdonato vdonato deleted the vdonato/rework-api branch April 6, 2023 21:55
vdonato added a commit that referenced this pull request Apr 6, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 6, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 10, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 11, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 15, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 17, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 19, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 20, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
vdonato added a commit that referenced this pull request Apr 21, 2023
* Remove the notion of default connection names

* Rework connection factory API

* Name type variable more descriptively

* Change from Union[str, None] to Optional[str]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants