-
yvanzo
Probably not by adding 'data-score' even though it is not needed.
-
score can be accessed through row.original.score
-
rahul24 joined the channel
-
Spread syntax (...) can probably be used to add 'data-score' only when needed.
-
reosarevok
It's not added if it's null though? At least not currently, where we use the same code for instrument collections and those have no data-score
-
yvanzo
Oh great then :)
-
Oops, that was a question! No, it should not be added when it’s null.
-
reosarevok
No, it wasn't (quite) a question :D
-
For InstrumentList I'm doing return <Table columns={columns} data={instruments} />
-
But on InstrumentResults we have "result", with result.instrument and result.score
-
Not sure what'd be the best way to make both use the react-table definitions :)
-
I guess I could map the instruments from results into an instruments-only array, but what about the score?
-
yvanzo
results should be rows
-
accessor can be tuned to get instrument data
-
BrainzGit
-
CatQuest
reeeo
-
reosarevok
But then we have the case where say defineNameColumn would need to know to access either "name" or "instrument.name"
-
CatQuest makes the demanding catnoise
-
(and then it would be "area.name" or whatnot)
-
CatQuest
reeeeoow
-
yvanzo
reosarevok: right, adding a parameter to defineNameColumn should work.
-
reosarevok
So we should have a parameter like isSearch passed to all columns?
-
Wait, no, I'd have to pass the name of the results object
-
pristine__
ruaok: have merged #60 to all-changes-mapping, tests will now have this branch as base
-
reosarevok
Sigh, why haven't we just put the score as part of the instrument or whatnot to make our life easier yet :p
-
CatQuest
instrument?
-
CatQuest reads the scrollback with renewed interesst
-
yvanzo
reosarevok: not isSearch but more likely accessorPrefix, so we can use it for any table (search results, reports, collections, whatnot…)
-
rishikesh has quit
-
bitmap: I would have suggested lens for the above accessorPrefix, but it has been removed months ago. Do you have any other suggestion here?
-
c1e0_ joined the channel
-
c1e0 has quit
-
rahul24 has quit
-
travis-ci joined the channel
-
travis-ci
-
travis-ci has left the channel
-
yvanzo
reosarevok: stupid me, no need of additional dependency, just row[accessorPrefix].name
-
reosarevok
So, would you suggest doing something like accessorPrefix ? row[accessorPrefix].name : name?
-
travis-ci joined the channel
-
travis-ci
-
travis-ci has left the channel
-
bitmap
is it row.name in one case? I'd suggest defineNameColumn should accept a function which returns the name from the row
-
yvanzo
that is accessor :)
-
accessor can be either a string or a function in Column definition
-
bitmap
from what I understood one is row.original.name and the other is row.original.instrument.name
-
one problem is that Flow won't like using a string indexer there at all but it should understand a function fine
-
zas: should the postgres data dir on williams be moved to a home directory? right now it's in /var/lib/docker/volumes
-
yvanzo
-
-
bitmap
yeah, it works now 'cause CoreEntityT | CollectionT both have a 'name' property
-
reosarevok
Well, not just there, but everywhere really
-
Everywhere that we'll need for searches
-
bitmap
but a result object with {instrument, score} doesn't
-
reosarevok
Soooo, what's the suggestion here? :D
-
yvanzo
bitmap: not sure I expressed correctly my suggestion, it is to replace the value 'name' here with an 'accessor' argument passed to 'defineNameColumn'.
-
zas
bitmap: the main problem is Jenkins, built images aren't cleaned, perhaps we should just move jenkins to a VM or smt
-
reosarevok
I mean, I could just pass data={a map of instruments} and scores={[entityId: string]: number}...
-
bitmap
zas: at least mb doesn't use jenkins for tests anymore, though we do use it for building docker images
-
yvanzo
'accessor' argument can default to the string value ''name'' or be passed as either a string or a function
-
bitmap
don't think that creates any volumes I'll check the config to make sure
-
mb could even start using circleci to build docker images, they have a thing to save the docker build cache in their cloud or whatever
-
yvanzo
-
bitmap
yvanzo: that makes sense to me, I'm just not sure Flow will like it defaulting to a string (but I haven't checked)
-
and the Cell would need customizing too since original isn't the entity anymore
-
yvanzo
thus my initial suggestion to just pass an accessorPrefix (or entityPath) but that is probably not flow-friendly.
-
kkmonster joined the channel
-
bitmap
a function that takes row.original and returns the entity should work fine for both
-
then the accessor would be row => getEntity(row.original).name
-
it could default to lodash/identity so you don't have to specify it
-
reosarevok
So how would getEntity work?
-
BrainzGit
-
reosarevok
At first I thought it'd just look whether original.(any entity name) exists, but we have artist.area and whatnot so
-
bitmap
it'd have to be different for each search list
-
reosarevok
Oh, so you define the function and pass it
-
bitmap
yea
-
reosarevok
to Table
-
bitmap
dunno, I forget how it works already :)
-
Wassabi has quit
-
reosarevok
Tsk :p
-
bitmap
if you want you can update react-table to rc.9 in whatever pr you're working on too
-
reosarevok
Any useful changes from it?
-
bitmap
probably just bug fixes, we're on an older beta version rn
-
c1e0_ has quit
-
rahul24 joined the channel
-
rahul24 has quit
-
kkmonster has quit
-
sbvkrishna has quit
-
rahul24 joined the channel
-
yvanzo: we should prob set DBD::Pg to 3.10.0 in the cpanfile too, the json dumps broke without it (it has some fixes for pg 10-12)
-
BrainzGit
-
BrainzBot
-
rahul24 has quit
-
Wassabi joined the channel
-
ruaok
iliekcomputers: we never really followed up on the settings goals/deadlines convo, did we? still want to do that?
-
Wassabi has quit
-
iliekcomputers
ruaok: hi! Yes! Maybe Sunday or after? I'm in SF this week and will probably be really jetlagged Saturday.
-
ruaok
gawd, I know that feeling!
-
I'm off some for xmas market fattening up over the weekend, so that works out well. monday or maybe tuesday evening?
-
iliekcomputers
Either would work for me.
-
ruaok
and at some point I'd love for you to review the messybrainz-labs project.
-
not that there is a PR, but there is a whole new project now.
-
iliekcomputers
Yeah, I've been meaning to get up to speed on that
-
I also had some questions
-
On whether it needs to be a whole new project
-
Or if it could probably stay in the messybrainz repository
-
ruaok
not sure I have an answer yet.
-
iliekcomputers
With the ListenBrainz and labs decomposition, we had to duplicate some work
-
ruaok
for starters I wanted a project that I could noodle about and test some things.
-
iliekcomputers
Like tests for starters
-
ruaok: I agree with you on doing it with a clean slate initially
-
ruaok
luckily the testing worked out and its a real viable project. (one that no longer uses 50GB of ram either!)
-
iliekcomputers
I was more wondering if its worth to try to move it over to the main repo
-
ruaok
but I'm happy to merge it into the msb repo -- it would remove duplication, you're right.
-
MSB or LB "main repo"?
-
iliekcomputers
msb
-
ruaok
yep, agreed.
-
iliekcomputers
To be honest, if we were starting everything rn, I would have maybe argued for keeping EVERYTHING in a big repo
-
ruaok
then I will not implement things like manage.py, since those will magically appear later.
-
iliekcomputers
LB, AB, CB all of it.
-
ruaok
that is what google does and I see it to a degree.
-
I'm certain I dislike the old BB way of having 5 or so repos.
-
iliekcomputers
It would make brainzutils redundant, and sharing code really easy
-
ruaok
confusing as hell.
-
better for security too.
-
iliekcomputers
Indeed
-
Just one place to update
-
ruaok
well, right now that isn't fully possible is it?
-
AB can't be py3 yet can it?
-
which is scary in an of itself.
-
and
-
iliekcomputers
Migrating AB should be a small task, it's the ML libraries behind it (essentia?) that's hard
-
ruaok
exactly.
-
how exactly is that invoked? if that is via the command line, then fine.
-
iliekcomputers
I am not sure.
-
ruaok
if we're liking to python bindings that are 2.x... ugh.
-
I could covert to calling an external binary and move the web base to 3
-
convert
-
iliekcomputers
Hmm, need to get some alastairp time on this, I guess.
-
ruaok
aww yiss. test now all pass.
-
iliekcomputers
To discuss the best way forward
-
ruaok
these tests have been saving my ass in making sure things are working right.
-
might be goo to do that when you are in BCN.
-
iliekcomputers
Yes!
-
Also
-
This maybe a bad idea
-
But
-
Do you think we should evaluate merging labs into LB too
-
CatQuest
iliekcomputers: 🍺
-
ruaok
yay on the shengen visa! that must be a liberating feeling!
-
iliekcomputers
I don't like having duplicated rabbitmq code or having to setup sentry etc