Esempio n. 1
0
    def test_status(self):
        """Should display status of specified data"""

        df = pd.DataFrame([{'a': 1, 'b': 2, 'c': 3}, {'a': 1, 'b': 2, 'c': 3}])

        source = dict(a=1,
                      b=True,
                      c='Hello',
                      d=(1, 2, 3),
                      e=[{
                          'a': 1
                      }, [1, 2, 3], self],
                      f=df)

        result = render.status(source)
        self.assertGreater(len(result), 0)
Esempio n. 2
0
    def test_status(self):
        """Should display status of specified data"""

        df = pd.DataFrame([
            {'a': 1, 'b': 2, 'c': 3},
            {'a': 1, 'b': 2, 'c': 3}
        ])

        source = dict(
            a=1,
            b=True,
            c='Hello',
            d=(1, 2, 3),
            e=[{'a': 1}, [1, 2, 3], self],
            f=df
        )

        result = render.status(source)
        self.assertGreater(len(result), 0)
Esempio n. 3
0
def workspace(show_values: bool = True, show_types: bool = True):
    """
    Adds a list of the shared variables currently stored in the project
    workspace.

    :param show_values:
        When true the values for each variable will be shown in addition to
        their name.
    :param show_types:
        When true the data types for each shared variable will be shown in
        addition to their name.
    """
    r = _get_report()

    data = {}
    for key, value in r.project.shared.fetch(None).items():
        if key.startswith('__cauldron_'):
            continue
        data[key] = value

    r.append_body(render.status(data, values=show_values, types=show_types))
Esempio n. 4
0
def workspace(show_values: bool = True, show_types: bool = True):
    """
    Adds a list of the shared variables currently stored in the project
    workspace.

    :param show_values:
        When true the values for each variable will be shown in addition to
        their name.
    :param show_types:
        When true the data types for each shared variable will be shown in
        addition to their name.
    """
    r = _get_report()

    data = {}
    for key, value in r.project.shared.fetch(None).items():
        if key.startswith('__cauldron_'):
            continue
        data[key] = value

    r.append_body(render.status(data, values=show_values, types=show_types))