Hi Ben,
> Excellent work Marco, and thank you for adding in issues too, they're very
> helpful!
>
> If your fixes are in a repo, it'll be great to take a look.
>
I forked Richard's fork and submitted my changes to Bitbucket (
https://bitbucket.org/marcofabiani/python-sword2 ). Observe that I only fixed
issues #1, #4 and #5. The workaround to the etree.xml problems was to install
lxml!
Cheers,
Marco
> Ben
>
> On Apr 3, 2012 1:46 PM, "Marco Fabiani" <marco.fabi...@eecs.qmul.ac.uk> wrote:
> Hi Richard,
>
> I having been testing the latest version of the Python libraries from your
> fork on bitbucket. I added 5 issues to the project, and indicated the causes.
>
> I did small changes on my local copy and everything works now, but I am not
> sure if my solutions are correct or just workarounds, so I prefer to leave it
> to you. In particular, I don't know if errors in parsing the service document
> and the deposit receipts are caused by the DSpace Sword2 server sending
> incorrect information, or by the python client.
>
> Cheers
> Marco
>
> On 29 Mar 2012, at 16:26, Marco Fabiani wrote:
>
>> Hi Richard,
>>
>> I patched this one: https://bitbucket.org/beno/python-sword2 . I will test
>> my code with your version as well, and apply my changes (if needed) to see
>> if everything works. I will let you know.
>>
>> Cheers
>> Marco
>>
>> On 29 Mar 2012, at 16:20, Richard Jones wrote:
>>
>>> Hi Marco,
>>>
>>> Which version of the python-sword2 library have you patched? I have done a
>>> large iteration on it recently (not yet formally released, but soon) at:
>>>
>>> https://bitbucket.org/richardjones/python-sword2
>>>
>>> But if your patch is for that one, or still applicable, I'd be happy to
>>> have it. You could post it to the bitbucket issue tracker for the project.
>>>
>>> Cheers,
>>>
>>> Richard
>>>
>>>
>>> On 29 March 2012 16:14, Marco Fabiani <marco.fabi...@eecs.qmul.ac.uk> wrote:
>>> Hi Richard,
>>>
>>> I created an issue on JIRA as Stuart suggested
>>> (https://jira.duraspace.org/browse/DS-1149). I have never used JIRA before,
>>> so I'm not quite sure how to submit a patch, but I will give it a try.
>>>
>>> On a similar subject, I also had to slightly change the python-sword2
>>> module to make it work with edit-media. Should I submit these changes as
>>> well?
>>>
>>> Cheers
>>> Marco
>>>
>>> On 29 Mar 2012, at 16:09, Richard Jones wrote:
>>>
>>>> That's brilliant, thanks for picking that up. I will apologise in advance
>>>> that I probably won't do anything about this until after Easter, but it is
>>>> on my list ...
>>>>
>>>> Cheers,
>>>>
>>>> Richard
>>>>
>>>>
>>>> On 29 March 2012 15:39, LEWIS Stuart <stuart.le...@ed.ac.uk> wrote:
>>>> Hi Marco,
>>>>
>>>> Thanks - submitting a patch to DSpace via JIRA would be great!
>>>>
>>>> - https://jira.duraspace.org/browse/DS
>>>>
>>>> Many thanks,
>>>>
>>>>
>>>> Stuart
>>>>
>>>>
>>>>
>>>> --
>>>> The University of Edinburgh is a charitable body, registered in
>>>> Scotland, with registration number SC005336.
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Marco Fabiani [mailto:marco.fabi...@eecs.qmul.ac.uk]
>>>> Sent: 29 March 2012 15:37
>>>> To: Richard Jones
>>>> Cc: LEWIS Stuart; sword-app-tech@lists.sourceforge.net
>>>> Subject: Re: [sword-app-tech] SWORD 2 and DSpace
>>>>
>>>> Hi Richard and Stuart,
>>>>
>>>> I was looking at the BinaryContentIngester code to try to make my own
>>>> ingester and I found the ORIGINAL bundle duplication bug:
>>>>
>>>> > Interesting - that looks like a bug with the DSpace implementation
>>>> > (ORIGINAL bundle duplication). I have some time scheduled to work on
>>>> > this implementation over the next month to six weeks, so will look for
>>>> > this and try to put in a fix. Also, I'll look into whether the content
>>>> > type can be put into the bitstream format field.
>>>>
>>>> In BinaryContentIngester, line 138:
>>>>
>>>> Bundle original = null;
>>>>
>>>> is assigned but never used because at lines 148:
>>>>
>>>> Bitstream bs = item.createSingleBitstream(deposit.getInputStream());
>>>>
>>>> which creates a new bundle disregarding the original bundle.
>>>> I this code should solve the problem, and also add the bitstream format
>>>> field:
>>>>
>>>> Bitstream bs = original.createBitstream(deposit.getInputStream());
>>>> BitstreamFormat format =
>>>> this.getFormat(context,deposit.getFilename());
>>>> bs.setFormat(format);
>>>>
>>>> At least from my short testing, this works. Should I submit this as an
>>>> official bug to DSpace?
>>>>
>>>> Cheers
>>>> Marco
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Richard Jones,
>>>>
>>>> Founder, Cottage Labs
>>>> t: @richard_d_jones, @cottagelabs
>>>> w: http://cottagelabs.com
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Richard Jones,
>>>
>>> Founder, Cottage Labs
>>> t: @richard_d_jones, @cottagelabs
>>> w: http://cottagelabs.com
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF email is sponsosred by:
>> Try Windows Azure free for 90 days Click Here
>> http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
>> sword-app-tech mailing list
>> sword-app-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sword-app-tech
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> sword-app-tech mailing list
> sword-app-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sword-app-tech
>
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
sword-app-tech mailing list
sword-app-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-tech