Skip to content

Commit

Permalink
Move css style related to scwidgets.css_style level (#103)
Browse files Browse the repository at this point in the history
The css style related functions are not essential for creating a
exercise notebook so we move it one level higher. For that we rename the
`_css_style.py` to `css_style.py`.
  • Loading branch information
agoscinski authored Dec 19, 2024
1 parent 441311a commit 4dd3c3d
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/scwidgets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
__version__ = "0.1.0-dev0"
__authors__ = "the scicode-widgets developer team"

from ._css_style import CssStyle, get_css_style
from .check import * # noqa: F403
from .code import * # noqa: F403
from .cue import * # noqa: F403
from .exercise import * # noqa: F403

__all__ = [ # noqa: F405
# css_style
"CssStyle",
"get_css_style",
# cue
"CueWidget",
"CheckCueBox",
Expand Down
2 changes: 1 addition & 1 deletion src/scwidgets/check/_widget_check_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from ipywidgets import Button, HBox, Layout, Output, VBox, Widget

from .._css_style import CssStyle
from .._utils import Formatter
from ..css_style import CssStyle
from ._check import Check, CheckResult


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/scwidgets/exercise/_widget_code_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
from widget_code_input import WidgetCodeInput
from widget_code_input.utils import CodeValidationError

from .._css_style import CssStyle
from .._utils import Formatter
from ..check import Check, CheckableWidget, CheckRegistry, CheckResult
from ..code._widget_code_input import CodeInput
from ..code._widget_parameter_panel import ParameterPanel
from ..css_style import CssStyle
from ..cue import (
CheckCueBox,
CheckResetCueButton,
Expand Down
2 changes: 1 addition & 1 deletion src/scwidgets/exercise/_widget_exercise_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from IPython.display import display
from ipywidgets import Button, Dropdown, HBox, Label, Layout, Output, Text, VBox

from .._css_style import CssStyle
from .._utils import Formatter
from ..css_style import CssStyle


class ExerciseWidget:
Expand Down
2 changes: 1 addition & 1 deletion src/scwidgets/exercise/_widget_text_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from ipywidgets import HTML, HBox, HTMLMath, Layout, Output, Textarea, VBox

from .._css_style import CssStyle
from .._utils import Formatter
from ..css_style import CssStyle
from ..cue import SaveCueBox, SaveResetCueButton
from ._widget_exercise_registry import ExerciseRegistry, ExerciseWidget

Expand Down
4 changes: 2 additions & 2 deletions tests/notebooks/widgets_cue.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
# +
from ipywidgets import Text, VBox

import scwidgets
from scwidgets.css_style import get_css_style
from scwidgets.cue import CheckCueBox, CueBox, ResetCueButton, SaveCueBox, UpdateCueBox

scwidgets.get_css_style()
get_css_style()
# -

# Test 1:
Expand Down

0 comments on commit 4dd3c3d

Please sign in to comment.