Skip to content
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 py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
semver >= 3.0
jsonlogic-py == 0.2.1
jsonlogic-py == 0.2.1
6 changes: 6 additions & 0 deletions py/src/clippy/backends/fs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ def m(self, *args, **kwargs):
# .. add state
# argdict[STATE_KEY] = self._state
argdict[clippy_constants.STATE_KEY] = getattr(self, clippy_constants.STATE_KEY)

# explicitly add loglevel to state if it doesn't already exist.
argdict[clippy_constants.STATE_KEY][clippy_constants.LOGLEVEL_KEY] = self.logger.getEffectiveLevel()
# Returns python integer that gets converted by cpp


# ~ for key in statedesc:
# ~ statej[key] = getattr(self, key)

Expand Down
3 changes: 2 additions & 1 deletion py/src/clippy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
REFERENCE_KEY = "references"
# key to json entry that holds return data from backend functions.
RETURN_KEY = "returns"

# key inside STATE_KEY that provides state information for the loglevel
LOGLEVEL_KEY = "loglevel"

# these keys are returned from the _help output when creating methods
# for classes.
Expand Down
6 changes: 6 additions & 0 deletions test/run_ipython.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
PROJ_ROOT_DIR=$(pwd)/..
CPP_BUILD_DIR=$PROJ_ROOT_DIR/cpp/build
export PYTHONPATH=$PROJ_ROOT_DIR/py/src:$PYTHONPATH
export CLIPPY_BACKEND_PATH=$CPP_BUILD_DIR/examples
CLIPPY_LOGLEVEL=DEBUG ipython
Loading