-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change how annotation formats are listed #92
Comments
another option would be to parse the this doesn't address testing user-installed formats but at least lets us have a single source of truth to test the built-in formats. Feels slightly gross to rely on a file meant for development to test that something works "in prod" -- would rather find some other way to specify built-in formats |
working on 4.0 and realized that if I'm adding a The basic idea is what's described here: but instead of plug-ins, I can use the |
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py with custom __dir__ and __getattr__
- add formats/__init__.py - with `as_list` and `by_name` functions that use module-level constant FORMAT constant built dynamically at imported-time from the `__all__`s of `crowsetta.formats.seq` and `crowsetta.formats.bbox`
rewriting tests and realizing it's not easy to test
formats.show
the one unit test as written now could pass even if
formats.show
does not return any installed formats.i.e. it would "pass" but actually be failing silently, because
formats.show
would return nothing and then we wouldassert
that nothing is in whateverformats.show
returned.there's two separate issues here:
one is how
formats.show
works -- it's weird that itprint
s instead of returning a string or something we can work with programatically / dynamicallthat's what this issue is about -- should it return a list instead
we currently test by just capturing
stdout
and checking what's in the captured output, which can fail silently as just describedthe other is, how do we test the output is correct?
going to open another issue for that
The text was updated successfully, but these errors were encountered: