fidelity / spock

spock is a framework that helps manage complex parameter configurations during research and development of Python applications
https://fidelity.github.io/spock/
Apache License 2.0
124 stars 13 forks source link

SavePath #220

Closed da-hon5 closed 2 years ago

da-hon5 commented 2 years ago

hi, i still can't figure out how SavePath is working. The keyword SavePath is not recognised ... i don't have to import something, right?

ncilfone commented 2 years ago

Can you provide an example of your code and what the error is? (also version information etc)

ncilfone commented 2 years ago
from spock import SpockBuilder
from spock import spock
from spock import SavePath

@spock
class Simple:
    only: int
    save_path: SavePath = "/tmp"

def main():
    test = SpockBuilder(Simple, lazy=True)
    test = test.generate()
    print(test)

if __name__ == '__main__':
    main()

This code works on master

da-hon5 commented 2 years ago

thanks! i didn't know i have to import SavePath :)

ncilfone commented 2 years ago

Closing unless you have any other issues