Caleydo/lineup_product

Instructions to launch with non-demo data?

Closed this issue · 6 comments

  • Release number or git hash: c726a94
  • Web browser version and OS: chrome mac
  • Environment (local or deployed): local

Continuing conversation from Slack:

chuck:

Hi: We’d like to use taggle here. This much works:

$ cd lineup_product/
$ git checkout taggle
$ npm install
$ npm run build
$ docker run -d -p 8080:80 lineup:1.0.0-20180116-224540

What we’d like now is to be able to launch a given image with data we specify… maybe pass it in via an envvar, or hit some api after it launches. (We’d prefer not to bake the data, or references to the data, into the image.) Does something like that seem feasible?
(Also… If we’ll be extending what this container does, is there an official image already in dockerhub that we should use as a base, or ok to just go ahead and push the image we build?)

marc:

you can mount your datasets as a volume in the docker container.
as an alternative, you could use taggle as a JS library (without the app) and then load your data via the API. if you have further specific questions, please write an issue and sam will get back to you.

holger:

Taggle/LineUp has no backend (= no docker container). please follow these steps:

($ npm install)
$ npm run start:lineup

An npm:install should be done by the phovea:setup-workspace. You start the Taggle/LineUp using npm run start:lineup.


  • I'm a little confused by the statement that Taggle has no backend and no docker container... Is the idea that the container I got from npm run build just something internal, and not something I would want to build on?
  • On the other hand, if I can build on it, and Marc's statement ("you can mount your datasets as a volume in the docker container") is accurate, that would fit my needs well: What path should I mount the data on? Is there documentation I should be referring to?
  • Trying to folger Holger's step's didn't really work for me: (From a checkout of https://github.com/Caleydo/lineup_product.git)
$ yo phovea:setup-workspace lineup_product -b taggle
$ npm install
$ npm run start:lineup
npm ERR! missing script: start:lineup

(I've tried it on the top level, and inside lineup direction... not sure if that should make a difference?)

I'd be happy with the approach of mounting a volume with the container I already have, but if I should try a different direction let me know. (Also, let me know if my end goal doesn't make sense, or it's not something lineup should be able to do.)

for the npm error: which npm version do you have (npm --version) - you should do it in the lineup directory in your root directory (not in lineup/lineup)

You're missing a change directory after setting up the workspace:

$ yo phovea:setup-workspace lineup_product -b taggle
$ cd lineup
$ npm install
$ npm run start:lineup

for the dataset issue: lineup is only a frontend library and has no database server (and therefore no docker container); so if you really want to change/add data, you have two possibilites:

Cool: I was checking out the repo, and then running yo inside of that... which sort-of worked, but really just confused things. Anita's comment about how to get data into it was exactly what I was looking for in that regard. Going forward:

  • We want to try to get this working as a visualization in Refinery: For now, I'm going to work with the hard-coded data and just see if we can run it inside Refinery. (We do some funny proxying, and I'd be surprised if there isn't something we'll need to fix on our end to make it work at all.)
  • As far as getting data in, I think what we'd really like is a new backend which would read command line arguments for the datasources. (From there, whether there's a real DB, or really big data structures in memory doesn't matter to me, at least not right now.)
    • Does that sound possible?
    • Does it sound like something you'd like to do? :)
  • Or, maybe it's better to understand the JS only approach? How hard would it be to get to something like:
<script src="lineup.js"></script>
<script>
  lineup.show([
    ['state', 'capital'],
    ['MA', 'Boston'],
    ...

I think that's enough for now: Feel free to comment here, or it can wait till Linz folks are here in person. Thanks!

@mccalluc If you want to use Taggle inside Refinery then this lineup_product and the lineup will not help you much. You should use the lineupjs library instead. Add a lineupjs dependency to your Refinery package.json as shown here and run npm install. Afterwards you can use lineup as any other frontend library (similar to d3, jquery, ...). You can load the data as you usually do in Refinery and hand over the data in the LineUp format. Initialize the library as shown here.
Try it out and let me know if this works for you. Otherwise can have a Q&A session next week.

:)