dynotx / liminal-orm

ORM and toolkit to help keep your Benchling schemas and downstream dependencies in sync.
https://dynotx.github.io/liminal-orm/
Apache License 2.0
34 stars 3 forks source link

Exception is always raised when running `liminal <cmd>` #2

Closed sparktx-mark-welsh closed 1 month ago

sparktx-mark-welsh commented 1 month ago

https://github.com/dynotx/liminal-orm/blob/c8e4c7267810deaea237961600b946b1720115f6/liminal/cli/cli.py#L221-L232

I always see the above exception raised unless I run liminal --help, liminal -h, liminal init or liminal <cmd> -h/--help.

For example:

❯ liminal generate-files test-tenant test-path
Starting Liminal CLI...
['/Users/mwelsh/benchliminal/.venv/bin/liminal', 'generate-files', 'test-tenant', 'test-path']
Traceback (most recent call last):
  File "/Users/mwelsh/benchliminal/.venv/bin/liminal", line 5, in <module>
    from liminal.cli.cli import app
  File "/Users/mwelsh/benchliminal/.venv/lib/python3.10/site-packages/liminal/cli/cli.py", line 230, in <module>
    raise Exception(
Exception: No liminal/env.py file found. Run `liminal init` or check your directory.

For what it's worth, liminal/env.py does exist, but I don't think that execption is really relevant to the if/else logic:

if sys.argv[1:] and not sys.argv[1]:
    # this always evals to false
ndamania00 commented 1 month ago

Hey mark, thanks for raising an issue! This was an oversight on my part and has been resolved in the PR linked above. I've released v1.0.1 patch so if you install that, you should be good to go.

Reach out to me or raise another issue if you run into anything else or you have any other questions! I'll be making sure to smooth out the wrinkles for our first couple users.

sparktx-mark-welsh commented 1 month ago

thanks! It's fixed now. I appreciate the timely response