-
Notifications
You must be signed in to change notification settings - Fork 1
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
ENH: Improve KDA API #68
Labels
API
API-related changes
Comments
nawtrey
added a commit
that referenced
this issue
Mar 26, 2024
* Add `core.py` with new class object `KineticModel` used to create and store model information for kinetic diagrams * Add `KineticModel` import to `__init__.py` so new API is accessible by importing `kda` * Addresses issue #68
nawtrey
added a commit
that referenced
this issue
Jun 6, 2024
* Add `core.py` with new class object `KineticModel` used to create and store model information for kinetic diagrams * Add `KineticModel` import to `__init__.py` so new API is accessible by importing `kda` * Addresses issue #68
nawtrey
added a commit
that referenced
this issue
Aug 8, 2024
* Add `core.py` with new class object `KineticModel` used to create and store model information for kinetic diagrams * Add `KineticModel` import to `__init__.py` so new API is accessible by importing `kda` * Addresses issue #68
nawtrey
added a commit
that referenced
this issue
Aug 8, 2024
* Adds `core.py` with new class object `KineticModel` to operate as the main access point to all KDA functions. `KineticModel`s are accessible with a simple import of `kda` and store all system information. * Updates `README` to reflect the simpler API. Also includes details about calculating transition fluxes with the new API. Similar changes are made to `usage.rst` and `kda/__init__.py`. * Updates existing tests to leverage the new API. Also adds tests to cover new class/methods: - `test_3_state_model_symbolic` - `test_3_state_model_numeric` - `test_transition_flux_matching_indices` - `test_transition_flux_mismatched_symbolic` - `test_invalid_inputs` * Fixes issue #68
I'll close this and open new issues targeting specific API improvements (net cycle fluxes, plotting, input graph files like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
The KDA API could use a great deal of improvement. Right now things are a bit clunky and can lead easily to errors.
For example, most diagrams and calculations require the user to use many different functions that all require similar information (this is targeted more specifically in issue #58). There should be a way to minimize the burden on the user while providing the same output. Moving towards an object-oriented approach would likely help with this, where the user creates their "universe" (i.e. graph) and can easily retrieve info about the graph by just calling built-in methods.
Another example -- when generating the net cycle fluxes, you need to know the "order" (i.e. direction) for each cycle (see issue #57), which is input as a pair of nodes in the cycle. Then once the net cycle fluxes are generated, there is no real way of linking one cycle to the next, making it difficult to generate the operational fluxes for a given system. If we can find a way to input more data about the system (or create & store it in the diagram object) up front, we could make this process a lot easier.
API Ideas
Here is an example of a more approachable API where the graph is read in from a graph file (maybe something similar to the
multibind
graph.csv
andstates.csv
files):For the net transition fluxes an API like the following would prove very useful:
The text was updated successfully, but these errors were encountered: