Skip to content

Releases: Aypac/SetupVariableTracker

Release v0.0.5

20 Jan 15:53
c1b0ca4
Compare
Choose a tag to compare

Add testing for python v3.9

0.0.4

07 Oct 13:52
068e6fe
Compare
Choose a tag to compare

SetupVariableTracker 0.0.4

Very simple library to track and log the declaration of new (setup) variables.

Usage example:

from SetupVariableTracker import SetupVariableTracker
vtrack = SetupVariableTracker(locals())

##################################################
# Define parameters for this script
setup_variable_1 = "Hello"
setup_variable_2 = "World!"
foo = 1
bar = None
##################################################
# Create a summary of all newly defined variables
summary_content = vtrack.save(locals(), sort=True)
print(summary_content)

This will print an overview of the declared variables (setup_variable_1, setup_variable_2, foo, and bar) as well as save them in a timestamped .log file.

I know there are more elegant ways to achieve this, but I found this an elegant way to add this functionality to legacy code with very little effort. Hope it'll be useful to others.


Updates: Add unit tests and fix date format issue in log file name.

0.0.3

07 Oct 13:25
9f59afa
Compare
Choose a tag to compare

SetupVariableTracker

Very simple library to track and log the declaration of new (setup) variables.

Usage example:

from SetupVariableTracker import SetupVariableTracker
vtrack = SetupVariableTracker(locals())

##################################################
# Define parameters for this script
setup_variable_1 = "Hello"
setup_variable_2 = "World!"
foo = 1
bar = None
##################################################
# Create a summary of all newly defined variables
summary_content = vtrack.save(locals(), sort=True)
print(summary_content)

This will print an overview of the declared variables (setup_variable_1, setup_variable_2, foo, and bar) as well as save them in a timestamped .log file.

I know there are more elegant ways to achieve this, but I found this an elegant way to add this functionality to legacy code with very little effort. Hope it'll be useful to others.


Updates: Add hash option and unittests

0.0.2

07 Oct 12:53
Compare
Choose a tag to compare

Initial release.