Skip to content

Commit

Permalink
display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdremov committed Mar 22, 2023
1 parent 1e5a073 commit dcc9582
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ build
.idea
.mypy_cache
dist
igogo.egg-info
igogo.egg-info
igogo/__pycache__
10 changes: 10 additions & 0 deletions igogo/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
import sys
from IPython import display


def is_lab_notebook():
import re
import psutil

return any(re.search('jupyter-lab', x)
for x in psutil.Process().parent().cmdline())

class Output:
def __init__(self, kind='text', display_id=None):
if display_id is None:
Expand All @@ -20,6 +28,8 @@ def __init__(self, kind='text', display_id=None):
'markdown': 'text/markdown',
'html': 'text/html',
}
if not is_lab_notebook():
self.display()

def display(self):
self.h.display({'text/plain': ''}, raw=True)
Expand Down
21 changes: 21 additions & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% set version = "1.1.0" %}


package:
name: igogo
version: {{ version }}

source:
git_rev: {{ version }}
git_url: https://github.com/AlexRoar/igogo.git

requirements:
build:
- python
- setuptools

run:
- python

about:
home: https://github.com/AlexRoar/igogo
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "igogo"
version = "0.0.3"
version = "0.0.4"
authors = [
{ name = "Alex Dremov", email = "igogo@alexdremov.me" },
]
Expand Down

0 comments on commit dcc9582

Please sign in to comment.