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

Fix table display wrapper #103

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beakerx_tabledisplay/beakerx_tabledisplay/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (2, 4, 3)
version_info = (2, 4, 4)
__version__ = '.'.join(map(str, version_info))
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# limitations under the License.

from beakerx_tabledisplay import TableDisplay
from IPython.display import display_html
from IPython.display import display
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR, but I realized this file is misspelled - we should fix that.

import pandas

class TableDisplayWrapper(object):
def __get__(self, model_instance, model_class):
def f():
display_html(TableDisplay(model_instance))
display(TableDisplay(model_instance))

return f

Expand Down
2 changes: 1 addition & 1 deletion beakerx_tabledisplay/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beakerx/beakerx-tabledisplay",
"version": "2.4.3",
"version": "2.4.4",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Versioning ergonomics tangent:

This would be for the front-end which I don't think is strictly required here for this patch? If this is to keep the two versions of the widget pinned together, that seems preferred to me too. Is there a versioning mechanism that other Jupyter projects use in these scenarios, where they can bump both versions without updating the respective lock/requirements files individually?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most Jupyter packages keep frontend and backend versions in sync. We use only the version number in the package.json file for both. The Python version number is generated at release-time.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could technically publish of new version of the Python package of beakerx_tabledisplay without bumping the frontend version indeed. There is a loose requirement for the front-end package, the Python package will work with any front-end extension as long as the widget models are compatible (which is the case in this PR).

"description": "BeakerX: Beaker TableDisplay Extension for Jupyter Notebook and Lab",
"homepage": "http://beakerx.com/",
"keywords": [
Expand Down
Loading