Closed boyanpenkov closed 1 year ago
Confirming all tests pass, but only have tested on linux.
Good point. As a general comment and before seeing the code, I'd argue it would be more useful or usual to have it at the root level papers --version
. Additionally, version number could be added to the header during status printing.
set and set.
Excellent. I'll take another look this evening (CET Berlin/Italy). First impression:
print(papers.__version__)
would work tooparser.exit(0)
to end right after printing with papers --version
statuscmd()
, it would be tidier IMO to write the print inside the Config.status()
method. For example, write it right in the header as papers configuration (global) v2.3.1
, or possibly as footer after the last line. Possibly simply v2.3.1
. I'd need to see it to get a firm impression. What do you say?Excellent. I'll take another look this evening (CET Berlin/Italy). First impression:
* one liner `print(papers.__version__)` would work too
Done.
* might need an `parser.exit(0)` to end right after printing with `papers --version`
I guess, if you want to, since it's meant to be human-readable for stdio, I find the help info useful. If someone starts calling this externally and wants only the string, we can do this then?
* instead of `statuscmd()`, it would be tidier IMO to write the print inside the `Config.status()` method. For example, write it right in the header as `papers configuration (global) v2.3.1`, or possibly as footer after the last line. Possibly simply `v2.3.1`. I'd need to see it to get a firm impression. What do you say?
Done, I just hadn't gotten to reading config.py
yet. I do think the full version string is a better idea, so then folks don't mess up 2.3.1 vs 2.3.1+yourlocalchanges.
This adds a tiny convenience function, so that
will show you the version of the currently installed
papers
you have, so that you can figure out ifpapers
in $PATH is what you think it is.