-
Notifications
You must be signed in to change notification settings - Fork 8
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
Upload file #242
Upload file #242
Conversation
ed751ca
to
da9b14d
Compare
It is not clear from the command help message how should I pass the metadata of the volume that I'm adding. Anyway, the following command
raises:
|
thanks @ael-code that version actually had a small but grave bug about metadata reading. I think that it has been fixed now. About documentation, I think that it is much clearer now: I have added a huge docstring complete with examples. Yes, those may fit better the sphinx documentation or, even better, manpages (see #234 ), but while we wait for those... |
|
@ael-code I think that it is clear enough in boyska@53d02e8#diff-9ff44f258347a5353864b0115b6c2894R130 |
I forgot about it. Sorry man :) |
there is a missing
Moreover I did not understood why Anyway in the REST API if you omit the param |
I cannot attach a file without an extension :| |
ael wrote:
this seems a bug. But, what files have you tried with? My guess is that |
@ael-code I inspected the extension thing better. python builtin |
I'm going to repeat myself: Are you working for Microsoft or what? :) |
ael:
when you get old, you often repeat yourself :P
ahaha. So boyska |
On 03/04/2016 03:09 PM, BoySka wrote:
I think that we are going to far with this. According to the archivant api [1] we've decided that mime-type and I don't know an easy way to do it, but I will make the cli reflects the Otherwise, if you think that mime-type should be mandatory we should [1] |
ael:
your point is correct.
nope, you're right. So I will:
|
I did everything I promised in the previous comment |
Looking at the examples in the help message:
Both the above examples do not work because metadata are missing, in fact they both raise: Then if I pass all parameters correctly and a regular file without extension as attachment an exception is raised:
Naming and typos
Personal taste
|
Ok, I fixed all your issues (I believe) and added some unit testing. It's not even near to be 100% complete, but I think it's not bad either. |
adding documentation, asserts, exceptions
goodbye --mime
remember: calling sys.exit() is bad; raise some click Exception instead
libreant_db -> libreant-db media -> attachment
also, small fixes in documentation
insert-volume has a decent testing, export-volume, search and attach also slightly covered
additional infos can be found here: pallets/click#475
Upload file
the semantics needed to be explained better
This starts where #209 has left us: a quite-working but hard to read code.
In the last commit, I try to make it slightly better.
Please remind me other blockers I have to fix about the previous code.