#metabrainz

/

      • abhinavohri
        @alastairp any python task.
      • Please suggest some normal or easy difficulty task .
      • alastairp
        do you have a general idea of a project that interests you?
      • at the moment I think that troi is still in a bit of a planning stage, and we don't yet have a list of tasks developed
      • we have some tickets with a "good-first-bug" label on them:
      • I guess we haven't tagged any items in CB with that label. the list of tickets that we want to work on next with CB is https://tickets.metabrainz.org/projects/CB/vers...
      • I believe that most of these are quite easy, we're happy to talk about how to do something if a task interests you
      • for CB, I recommend CB-347, CB-334, CB-330, CB-367, CB-390, CB-392
      • BrainzBot
        CB-347: Allow users to browse reviews by new, old and other criteria. https://tickets.metabrainz.org/browse/CB-347
      • CB-334: Give the user an option to unselect their default license choice. https://tickets.metabrainz.org/browse/CB-334
      • CB-330: 'Review has been hidden' message is shown twice when moderator hides a review https://tickets.metabrainz.org/browse/CB-330
      • CB-367: Review page doesn't link to the detail page of the entity https://tickets.metabrainz.org/browse/CB-367
      • CB-390: Shouldn't have to chose a license just to save drafts https://tickets.metabrainz.org/browse/CB-390
      • CB-392: After Saving draft, cannot publish without making some change https://tickets.metabrainz.org/browse/CB-392
      • alastairp
        thank you BrainzBot
      • abhinavohri
        @alastairp ok . I have already looked the lists but i had some doubts. I will review the list once again and select a ticket to work on and ask my doubts.
      • alastairp
        if you want to work on AB, tell me and I can pull up some simple tasks
      • for LB, perhaps ishaanshah or iliekcomputers or shivam-kapila might be able to recommend you something
      • abhinavohri
        I have already opened a pr for CB-367.
      • Please tell some tasks for AB also.
      • alastairp
        I saw the open CB tickets, thanks. I'll get to those soon
      • ruaok
      • shivam-kapila
        abhinavohri: hi. I will be working on some LB tasks tomorrow. Ping me if you neef some tests. If you need some task I can help for lb
      • ruaok
        it can find the patches dir, it starts importing a patch, but then cannot find another module that troi installs.
      • shivam-kapila
        Tasks*
      • ruaok
        but if I import that module by hand, it works.
      • alastairp
        quite possibly black magic due to sys.path and where you run it from
      • abhinavohri
        @shivam-kapila @alastairp ok thank you.
      • alastairp
        I believe that `python` will prepend . to sys.path
      • what is troi.tools.area_lookup.__file__ ?
      • ruaok
        '/Users/robert/metabrainz/troi-recommendation-playground/troi/tools/area_lookup.py'
      • alastairp
        yeah, right
      • compare to
      • File "/Users/robert/metabrainz/troi-recommendation-playground/.test/lib/python3.7/site-packages/troi-0.0.1rc0-py3.7.egg/troi/utils.py", line 22, in discover_patches
      • so it's using the version in the venv
      • and I suspect it's trying to import troi.tools.area_lookup from the egg
      • when you import from a python shell it imports it from the source tree
      • ruaok
        ahh, I see.
      • so add . to path?
      • alastairp
        no, that's a recipe for disaster (and will probably fail when people pip install without having access to the rest of the source tree)
      • did you `pip install -e .` ?
      • ruaok
        no.
      • python setup.py install
      • alastairp
        ah, right
      • it's possible that setuptools didn't find troi.tools properly
      • if you eye over `python setup.py build` does it "look right"? e.g. does it seem like it's finding all of the packages
      • ruaok
        oh, troi.tools actually doesn't seem to be installed.
      • alastairp
        yeah, that's what I was getting at
      • ruaok
        it has no __init__.py
      • ok, onward to the next problem. thanks for yer help.
      • alastairp
        ... that's weird that `import` in a python shell worked, then
      • ruaok
        actually it does make sense -- recent pythons no longer always need __init__.py
      • alastairp
        :( yeah, that sounds familiar
      • ruaok
        ok, now things work as expected.
      • alastairp
        cool
      • ruaok
      • alastairp
        that's pretty awesome
      • how are you planning on running it during development? install as an editable pip, and then use the `troi` executable?
      • ruaok
        yes
      • alastairp
        I _think_ you should also be able to get away with `python -m troi.cli <x>` without using pip install -e or python setup.py something. Let me check that
      • ruaok
        yvanzo: https://github.com/metabrainz/troi-recommendati... did I setup the BrainzGit correctly? I copied the password from another repo. should that work?
      • alastairp
      • ruaok
        nice!
      • alastairp
        ruaok: yeah, no need for pip install -e if you don't want it
      • this goes back to what I was saying before - if you run `python`, it adds . to sys.path, so stuff in the current directory will just work
      • ruaok
        ok, one thing I forgot was the local patch support.
      • so, troi should check for the existence of ./patches and attempt to load them from there as well, yes?
      • BrainzGit
        [listenbrainz-server] MonkeyDo opened pull request #1151 (master…react-error-alerts): Improve error management in BrainzPlayer https://github.com/metabrainz/listenbrainz-serv...
      • alastairp
        right. I guess that's the best way to do it
      • you'll need to exclude it from find_packages in setup.py
      • and there shouldn't be an issue with overlapping patches with the same name, right? Because they'll have different import paths (troi.patches.x vs patches.x)
      • ruaok
        not sure.
      • Mr_Monkey: is the export playlist to spotify features for BP still on your radar?
      • BrainzGit
        [troi-recommendation-playground] mayhem merged pull request #15 (main…setup-improvements): Setup improvements (LB-739) https://github.com/metabrainz/troi-recommendati...
      • BrainzBot
        LB-739: Python packaging and modules with troi.py and troi module, patches, setup.py https://tickets.metabrainz.org/browse/LB-739
      • ruaok
        yisss, the hook is correct.
      • Mr_Monkey
        Yes, but probably after implementing a playlist/queue of sorts in BP.
      • ruaok
        Mr_Monkey: 👍
      • kori has quit
      • kori joined the channel
      • kori has quit
      • kori joined the channel
      • yvanzo
        :)
      • Mr_Monkey
        ruaok: The PR i just opened above is to pass on any extra error information we get from the spotify player, following your report of 'internal server error' messages last Friday. Not sure I'll be able to do anything about the errors themselves (they're thrown by spotify's sdk, not by us), but at least we should have more info displayed in the error message where available.
      • ruaok
        perfect, thanks!
      • alastairp
        yvanzo: remind me the syntax to link PRs to jira?
      • ruaok
        at least this will help us understand what is going on...
      • alastairp
        does it have to be at the beginning of the title?
      • shivam-kapila
        ruaok: Mr_Monkey: This also happen ed with me
      • But consple showed me that unable to refresh token
      • Console*
      • That returned 404 for spotify api
      • yvanzo
        alastairp: Preferably yes, for example: LB-XXX: Trigger BrainzGit!
      • More complex titles are possible: LB-XXX, LB-YYY: Trigger BrainzGit again!
      • alastairp
        why does https://github.com/metabrainz/troi-recommendati... not work? because it's not at the beginning?
      • yvanzo
        that and it must be followed with a colon
      • So that you can reference a related ticket in parenthesis without triggering a transition.
      • alastairp: I just edited PR title accordingly and it triggered a comment to the ticket.
      • alastairp
        ruaok: ^ fyi
      • yvanzo
      • ruaok
        thx
      • alastairp
        what's the best way to say that a PR is related to this ticket (and I want it to show up on the jira list), but I don't want it to close the issue when the PR is merged?
      • yvanzo
        it's not currently implemented in our automation rules.
      • alastairp
        right
      • yvanzo
        It could be changed to still add a comment with a link (if no such link has been posted already) to issues mentioned in parenthesis. (?)
      • alastairp
        ah, I like that idea
      • so it'll link if the issue is mentioned, but will only close it if it has the : ?
      • yvanzo
        yup, I will check if that is doable, cause the scripting syntax is quite limited.
      • ruaok
      • alastairp
        oh, I guess because when you run `troi`, the current directory isn't in sys.path :(
      • ruaok
        python is not able to import patches.do_not_include_this, it can't find the patches dir.
      • hmmm.
      • alastairp
        that's a bit more hairy. in this case I guess it _does_ make sense to add `.` to sys.path, but I think we would have to be really careful about doing it
      • ruaok
        and undoing it asap.
      • alastairp
        unless you can somehow import by absolute file path
      • BrainzGit
        [musicbrainz-server] mwiencek merged pull request #1744 (master…react-guess-case): Convert form_row_name_with_guesscase to React https://github.com/metabrainz/musicbrainz-serve...
      • ruaok
        that seems to work.
      • alastairp
        I see that `importlib.import_module` has a 'package' parameter, not sure if you can specify '.' as that or somethign
      • BrainzGit
        [troi-recommendation-playground] mayhem opened pull request #16 (main…add-local-patches-dir): Add support for loading patches from the patches directory in the current directory. https://github.com/metabrainz/troi-recommendati...
      • ruaok
        nice and productive day. :)
      • thanks alastairp !
      • alastairp
        yeah, you're right that it just required a few days of concentrated effort to pick up a bunch of loose ends
      • alastairp --> away
      • iliekcomputers
        ishaanshah: hey
      • stats look ok now, thanks for the help yesterday
      • ishaanshah
        iliekcomputers they are still wrong for people who import from lastfm
      • I am writing a fix for that
      • iliekcomputers
        Huh
      • Quick explanation on why?
      • ishaanshah
        Theres a bug in incremental dump creation
      • You can check the chatlogs above
      • iliekcomputers
        Created and listened at timestamps are supposed to be different
      • That's by design
      • pristine___
        ruaok: so I was thinking about artist similarity. What would be the training set? [Artist 1 id, artist 2 id, count] i.e how many collaborations artist 1 and artist 2 have. So if artist 1 appeared in let's say 10 collaborations with artist 3 and artist 1 and artist 2 are similar then artist 2 and artist 3 will also be similar, something like that.
      • ruaok
        I was planning a different tack....
      • given a user and all of their listens, we can make a histogram of artists based on their listens.
      • rather than a histogram based in their recordings
      • ishaanshah
        iliekcomputers i know that but while creating incremental dumps we are filtering by listened at rather than created
      • Which wont work for lastfm imports
      • Cause that means only listens from the day when import was done would be included
      • Which is happening with my data, I checked in the dumps
      • pristine___
        ruaok: do we want to solve *what are the artists similar to artist A* or *what are the artists user A might like*?
      • ruaok
        oh. good point. my solution solves the wrong problem. thanks for catching that.
      • I mean that is useful too.
      • pristine___
        Yeah, but one at a time :p
      • ruaok
        in fact, it might work really well. hard to say.
      • pristine___
        We can try both.
      • ruaok
        I'm thinking that the version I described ought to be easy to implement...