Wikidatafetcher update

Hi everibody,

I need a little help :

Wikidata changed a little bit their API and the wikidatafetcher service stopped to work . To make it work again, it's needed to update wdtk-client from version 0.5.0 to 0.7.0 . I did it after have revoved the library log4j to avoid conflics . Finaly, i've changed the path in myrobolab -> properties to use this new version .

It work well under eclipse, but if i generate the .jar , this one can't install resources (runtime -> install all) . Any idea ?

I've sent the 0.7.0 to github but i seen a message from Grog " removed httpClient to avoid conflics " . I didn't found this library in wdtk-client-0.7.0 . Can someone do this for me in the new version ? And to avoid mistakes, i didn't modified the libraries path in myrobotlab -> properties, on github .

Thx

Mats's picture

Dependencies

Hi BeetleJuice

I hope I remember all the steps that I had to do when i upgraded the pi4j libraries.

1. Put the new wdtk-client in the repo and push. 

2. There is a new method getMetaData that defines the dependencies that MRL use. If you look at the end of the WikiDataFetcher you will find it. That is one of the places that you need to change and push.

3. There is a build.xml file in the myrobotlab folder. It also needs to be updated and pushed.

4. When you change the Java Build path in Eclipse, a new file containing the paths will be generated. I don't remember the exact name, but you will need to push it also to github, the same way as you do with any other change.

4. MRL keeps track of what's installed in the .myrobotlab folder ( not the dot in the beginning ). You need to delete that folder too to be able to do a new "install all"

/Mats

GroG's picture

If the static getMetaData

If the static getMetaData method was filled out in the Service correctly the serviceData.json will get auto-generated during 'build time' - so there is no further committing or pushing needed.

Below is the file generation sub-task in Ant.  

<java classname="org.myrobotlab.framework.repo.ServiceData">
     <arg value="${build}/classes/resource/framework"/>
     <classpath>
     	<path refid="compile.classpath"/>
     	<path path="${build}/classes"/>	          
     </classpath>
</java>
beetlejuice's picture

Thx for your help Mats and

Thx for your help Mats and Grog, i will do that ! .

EDIT : All is done and work well under eclipse, but i still have the problem of 'install all' when i run the built jar in a new folder . Do You know why MRL can install all under eclipse but can't find the ressources on gitub when it's run from the jar ? i built it just with option JAR in antbuild .

 

another question that i've already asked before, but i forgot the answer .. at the bottom of the runtime tabs, i can't see the categories, there is just the button "all" and all other buttons are just a square .

GroG's picture

You have it all right I think

You have it all right I think Beetle...

If you download the latest jar like I did and test - it looks like the dependencies are happy.

The build on Travis-Ci has the branch name in the environment.  This is important, because a long time ago we split the repos into two branches.  "develop" & "master"

I suspect the local building of the jar does not have access to that envrionment variable - and therefore, it doesn't know to get them from "develop" or "master"

I'll look at the build script and see if I can find a way to build correctly on a local computer...

GroG's picture

Its this line in

Its this line in build.xml

 

	<echo message="version=${version}" />

	<!-- set global properties for this build -->

	<!-- the all powerful branch property if copied to master - will need to be updated -->
>>>>	<property name="branch" value="${env.TRAVIS_BRANCH}"/>

	<property name="fs" location="${file.separator}" />
	<!-- the source code for release -->
	<property name="src" location="src" />
	<!-- unit test source code -->

 

You can change it to  :

<property name="branch" value="develop"/>

And it will work the way you expect, but please do not check it in with develop ;)

Or you preferrably you can create an environment variable on your machine TRAVIS_BRANCH=develop

 

beetlejuice's picture

thx, i've created an

thx, i've created an environmental variable in my run configuration, and that work !

moz4r's picture

Hi all ! Thanks for the fix.

Hi all ! Thanks for the fix. May I migrate to the last Mrl version and adapt my scripts ? I use 1412 at this time.

GroG's picture

That would be great Moz4r

That would be great Moz4r ! 
Maybe do a post asking for kwatters inmoov script ?  
The Arduino MrlComm part of the 'latest' appears to be worky.
We will need more testing !  Let's work together :)

This is the script from kwatters to test, we would like it with settings and configuration externalized - so that the script become more modular.

https://raw.githubusercontent.com/MyRobotLab/pyrobotlab/master/home/kwatters/Harry.py

It would be nice to incorporate WikieDataFetcher into it too