#metabrainz

/

      • abhinavohri
        @alastairp any python task.
      • 2020-10-21 29540, 2020

      • abhinavohri
        Please suggest some normal or easy difficulty task .
      • 2020-10-21 29540, 2020

      • alastairp
        do you have a general idea of a project that interests you?
      • 2020-10-21 29520, 2020

      • alastairp
        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
      • 2020-10-21 29508, 2020

      • alastairp
        we have some tickets with a "good-first-bug" label on them:
      • 2020-10-21 29509, 2020

      • alastairp
      • 2020-10-21 29542, 2020

      • alastairp
        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/versio…
      • 2020-10-21 29510, 2020

      • alastairp
        I believe that most of these are quite easy, we're happy to talk about how to do something if a task interests you
      • 2020-10-21 29507, 2020

      • alastairp
        for CB, I recommend CB-347, CB-334, CB-330, CB-367, CB-390, CB-392
      • 2020-10-21 29511, 2020

      • BrainzBot
        CB-347: Allow users to browse reviews by new, old and other criteria. https://tickets.metabrainz.org/browse/CB-347
      • 2020-10-21 29511, 2020

      • BrainzBot
        CB-334: Give the user an option to unselect their default license choice. https://tickets.metabrainz.org/browse/CB-334
      • 2020-10-21 29511, 2020

      • BrainzBot
        CB-330: 'Review has been hidden' message is shown twice when moderator hides a review https://tickets.metabrainz.org/browse/CB-330
      • 2020-10-21 29511, 2020

      • BrainzBot
        CB-367: Review page doesn't link to the detail page of the entity https://tickets.metabrainz.org/browse/CB-367
      • 2020-10-21 29511, 2020

      • BrainzBot
        CB-390: Shouldn't have to chose a license just to save drafts https://tickets.metabrainz.org/browse/CB-390
      • 2020-10-21 29511, 2020

      • BrainzBot
        CB-392: After Saving draft, cannot publish without making some change https://tickets.metabrainz.org/browse/CB-392
      • 2020-10-21 29519, 2020

      • alastairp
        thank you BrainzBot
      • 2020-10-21 29521, 2020

      • 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.
      • 2020-10-21 29538, 2020

      • alastairp
        if you want to work on AB, tell me and I can pull up some simple tasks
      • 2020-10-21 29557, 2020

      • alastairp
        for LB, perhaps ishaanshah or iliekcomputers or shivam-kapila might be able to recommend you something
      • 2020-10-21 29513, 2020

      • abhinavohri
        I have already opened a pr for CB-367.
      • 2020-10-21 29543, 2020

      • abhinavohri
        Please tell some tasks for AB also.
      • 2020-10-21 29503, 2020

      • alastairp
        I saw the open CB tickets, thanks. I'll get to those soon
      • 2020-10-21 29503, 2020

      • ruaok
      • 2020-10-21 29519, 2020

      • 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
      • 2020-10-21 29539, 2020

      • ruaok
        it can find the patches dir, it starts importing a patch, but then cannot find another module that troi installs.
      • 2020-10-21 29545, 2020

      • shivam-kapila
        Tasks*
      • 2020-10-21 29552, 2020

      • ruaok
        but if I import that module by hand, it works.
      • 2020-10-21 29519, 2020

      • alastairp
        quite possibly black magic due to sys.path and where you run it from
      • 2020-10-21 29525, 2020

      • abhinavohri
        @shivam-kapila @alastairp ok thank you.
      • 2020-10-21 29540, 2020

      • alastairp
        I believe that `python` will prepend . to sys.path
      • 2020-10-21 29554, 2020

      • alastairp
        what is troi.tools.area_lookup.__file__ ?
      • 2020-10-21 29526, 2020

      • ruaok
        '/Users/robert/metabrainz/troi-recommendation-playground/troi/tools/area_lookup.py'
      • 2020-10-21 29534, 2020

      • alastairp
        yeah, right
      • 2020-10-21 29536, 2020

      • alastairp
        compare to
      • 2020-10-21 29537, 2020

      • alastairp
        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
      • 2020-10-21 29544, 2020

      • alastairp
        so it's using the version in the venv
      • 2020-10-21 29500, 2020

      • alastairp
        and I suspect it's trying to import troi.tools.area_lookup from the egg
      • 2020-10-21 29509, 2020

      • alastairp
        when you import from a python shell it imports it from the source tree
      • 2020-10-21 29531, 2020

      • ruaok
        ahh, I see.
      • 2020-10-21 29554, 2020

      • ruaok
        so add . to path?
      • 2020-10-21 29529, 2020

      • 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)
      • 2020-10-21 29537, 2020

      • alastairp
        did you `pip install -e .` ?
      • 2020-10-21 29545, 2020

      • ruaok
        no.
      • 2020-10-21 29553, 2020

      • ruaok
        python setup.py install
      • 2020-10-21 29556, 2020

      • alastairp
        ah, right
      • 2020-10-21 29518, 2020

      • alastairp
        it's possible that setuptools didn't find troi.tools properly
      • 2020-10-21 29545, 2020

      • alastairp
        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
      • 2020-10-21 29540, 2020

      • ruaok
        oh, troi.tools actually doesn't seem to be installed.
      • 2020-10-21 29548, 2020

      • alastairp
        yeah, that's what I was getting at
      • 2020-10-21 29559, 2020

      • ruaok
        it has no __init__.py
      • 2020-10-21 29504, 2020

      • ruaok
        ok, onward to the next problem. thanks for yer help.
      • 2020-10-21 29537, 2020

      • alastairp
        ... that's weird that `import` in a python shell worked, then
      • 2020-10-21 29530, 2020

      • ruaok
        actually it does make sense -- recent pythons no longer always need __init__.py
      • 2020-10-21 29542, 2020

      • alastairp
        :( yeah, that sounds familiar
      • 2020-10-21 29546, 2020

      • ruaok
        ok, now things work as expected.
      • 2020-10-21 29549, 2020

      • alastairp
        cool
      • 2020-10-21 29552, 2020

      • ruaok
      • 2020-10-21 29504, 2020

      • alastairp
        that's pretty awesome
      • 2020-10-21 29547, 2020

      • alastairp
        how are you planning on running it during development? install as an editable pip, and then use the `troi` executable?
      • 2020-10-21 29526, 2020

      • ruaok
        yes
      • 2020-10-21 29526, 2020

      • 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
      • 2020-10-21 29549, 2020

      • ruaok
        yvanzo: https://github.com/metabrainz/troi-recommendation… did I setup the BrainzGit correctly? I copied the password from another repo. should that work?
      • 2020-10-21 29522, 2020

      • alastairp
      • 2020-10-21 29537, 2020

      • ruaok
        nice!
      • 2020-10-21 29537, 2020

      • alastairp
        ruaok: yeah, no need for pip install -e if you don't want it
      • 2020-10-21 29503, 2020

      • alastairp
        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
      • 2020-10-21 29546, 2020

      • ruaok
        ok, one thing I forgot was the local patch support.
      • 2020-10-21 29511, 2020

      • ruaok
        so, troi should check for the existence of ./patches and attempt to load them from there as well, yes?
      • 2020-10-21 29548, 2020

      • BrainzGit
        [listenbrainz-server] MonkeyDo opened pull request #1151 (master…react-error-alerts): Improve error management in BrainzPlayer https://github.com/metabrainz/listenbrainz-server…
      • 2020-10-21 29508, 2020

      • alastairp
        right. I guess that's the best way to do it
      • 2020-10-21 29515, 2020

      • alastairp
        you'll need to exclude it from find_packages in setup.py
      • 2020-10-21 29552, 2020

      • alastairp
        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)
      • 2020-10-21 29518, 2020

      • ruaok
        not sure.
      • 2020-10-21 29542, 2020

      • ruaok
        Mr_Monkey: is the export playlist to spotify features for BP still on your radar?
      • 2020-10-21 29521, 2020

      • BrainzGit
        [troi-recommendation-playground] mayhem merged pull request #15 (main…setup-improvements): Setup improvements (LB-739) https://github.com/metabrainz/troi-recommendation…
      • 2020-10-21 29521, 2020

      • BrainzBot
        LB-739: Python packaging and modules with troi.py and troi module, patches, setup.py https://tickets.metabrainz.org/browse/LB-739
      • 2020-10-21 29531, 2020

      • ruaok
        yisss, the hook is correct.
      • 2020-10-21 29532, 2020

      • Mr_Monkey
        Yes, but probably after implementing a playlist/queue of sorts in BP.
      • 2020-10-21 29545, 2020

      • ruaok
        Mr_Monkey: 👍
      • 2020-10-21 29514, 2020

      • kori has quit
      • 2020-10-21 29534, 2020

      • kori joined the channel
      • 2020-10-21 29534, 2020

      • kori has quit
      • 2020-10-21 29534, 2020

      • kori joined the channel
      • 2020-10-21 29512, 2020

      • yvanzo
        :)
      • 2020-10-21 29536, 2020

      • 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.
      • 2020-10-21 29558, 2020

      • ruaok
        perfect, thanks!
      • 2020-10-21 29512, 2020

      • alastairp
        yvanzo: remind me the syntax to link PRs to jira?
      • 2020-10-21 29520, 2020

      • ruaok
        at least this will help us understand what is going on...
      • 2020-10-21 29523, 2020

      • alastairp
        does it have to be at the beginning of the title?
      • 2020-10-21 29524, 2020

      • shivam-kapila
        ruaok: Mr_Monkey: This also happen ed with me
      • 2020-10-21 29547, 2020

      • shivam-kapila
        But consple showed me that unable to refresh token
      • 2020-10-21 29550, 2020

      • shivam-kapila
        Console*
      • 2020-10-21 29527, 2020

      • shivam-kapila
        That returned 404 for spotify api
      • 2020-10-21 29513, 2020

      • yvanzo
        alastairp: Preferably yes, for example: LB-XXX: Trigger BrainzGit!
      • 2020-10-21 29507, 2020

      • yvanzo
        More complex titles are possible: LB-XXX, LB-YYY: Trigger BrainzGit again!
      • 2020-10-21 29514, 2020

      • alastairp
        why does https://github.com/metabrainz/troi-recommendation… not work? because it's not at the beginning?
      • 2020-10-21 29545, 2020

      • yvanzo
        that and it must be followed with a colon
      • 2020-10-21 29527, 2020

      • yvanzo
        So that you can reference a related ticket in parenthesis without triggering a transition.
      • 2020-10-21 29552, 2020

      • yvanzo
        alastairp: I just edited PR title accordingly and it triggered a comment to the ticket.
      • 2020-10-21 29544, 2020

      • alastairp
        ruaok: ^ fyi
      • 2020-10-21 29527, 2020

      • yvanzo
      • 2020-10-21 29548, 2020

      • ruaok
        thx
      • 2020-10-21 29542, 2020

      • 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?
      • 2020-10-21 29529, 2020

      • yvanzo
        it's not currently implemented in our automation rules.
      • 2020-10-21 29534, 2020

      • alastairp
        right
      • 2020-10-21 29525, 2020

      • 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. (?)
      • 2020-10-21 29511, 2020

      • alastairp
        ah, I like that idea
      • 2020-10-21 29530, 2020

      • alastairp
        so it'll link if the issue is mentioned, but will only close it if it has the : ?
      • 2020-10-21 29535, 2020

      • yvanzo
        yup, I will check if that is doable, cause the scripting syntax is quite limited.
      • 2020-10-21 29504, 2020

      • ruaok
      • 2020-10-21 29546, 2020

      • alastairp
        oh, I guess because when you run `troi`, the current directory isn't in sys.path :(
      • 2020-10-21 29546, 2020

      • ruaok
        python is not able to import patches.do_not_include_this, it can't find the patches dir.
      • 2020-10-21 29533, 2020

      • ruaok
        hmmm.
      • 2020-10-21 29536, 2020

      • 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
      • 2020-10-21 29553, 2020

      • ruaok
        and undoing it asap.
      • 2020-10-21 29512, 2020

      • alastairp
        unless you can somehow import by absolute file path
      • 2020-10-21 29528, 2020

      • 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-server/…
      • 2020-10-21 29543, 2020

      • ruaok
        that seems to work.
      • 2020-10-21 29535, 2020

      • alastairp
        I see that `importlib.import_module` has a 'package' parameter, not sure if you can specify '.' as that or somethign
      • 2020-10-21 29519, 2020

      • 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-recommendation…
      • 2020-10-21 29542, 2020

      • ruaok
        nice and productive day. :)
      • 2020-10-21 29544, 2020

      • ruaok
        thanks alastairp !
      • 2020-10-21 29530, 2020

      • alastairp
        yeah, you're right that it just required a few days of concentrated effort to pick up a bunch of loose ends
      • 2020-10-21 29551, 2020

      • alastairp
      • 2020-10-21 29534, 2020

      • alastairp --> away
      • 2020-10-21 29551, 2020

      • iliekcomputers
        ishaanshah: hey
      • 2020-10-21 29500, 2020

      • iliekcomputers
        stats look ok now, thanks for the help yesterday
      • 2020-10-21 29558, 2020

      • ishaanshah
        iliekcomputers they are still wrong for people who import from lastfm
      • 2020-10-21 29504, 2020

      • ishaanshah
        I am writing a fix for that
      • 2020-10-21 29552, 2020

      • iliekcomputers
        Huh
      • 2020-10-21 29502, 2020

      • iliekcomputers
        Quick explanation on why?
      • 2020-10-21 29507, 2020

      • ishaanshah
        Theres a bug in incremental dump creation
      • 2020-10-21 29546, 2020

      • ishaanshah
        You can check the chatlogs above
      • 2020-10-21 29506, 2020

      • iliekcomputers
        Created and listened at timestamps are supposed to be different
      • 2020-10-21 29514, 2020

      • iliekcomputers
        That's by design
      • 2020-10-21 29531, 2020

      • 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.
      • 2020-10-21 29514, 2020

      • ruaok
        I was planning a different tack....
      • 2020-10-21 29541, 2020

      • ruaok
        given a user and all of their listens, we can make a histogram of artists based on their listens.
      • 2020-10-21 29553, 2020

      • ruaok
        rather than a histogram based in their recordings
      • 2020-10-21 29530, 2020

      • ishaanshah
        iliekcomputers i know that but while creating incremental dumps we are filtering by listened at rather than created
      • 2020-10-21 29552, 2020

      • ishaanshah
        Which wont work for lastfm imports
      • 2020-10-21 29516, 2020

      • ishaanshah
        Cause that means only listens from the day when import was done would be included
      • 2020-10-21 29543, 2020

      • ishaanshah
        Which is happening with my data, I checked in the dumps
      • 2020-10-21 29500, 2020

      • pristine___
        ruaok: do we want to solve *what are the artists similar to artist A* or *what are the artists user A might like*?
      • 2020-10-21 29542, 2020

      • ruaok
        oh. good point. my solution solves the wrong problem. thanks for catching that.
      • 2020-10-21 29552, 2020

      • ruaok
        I mean that is useful too.
      • 2020-10-21 29516, 2020

      • pristine___
        Yeah, but one at a time :p
      • 2020-10-21 29518, 2020

      • ruaok
        in fact, it might work really well. hard to say.
      • 2020-10-21 29527, 2020

      • pristine___
        We can try both.
      • 2020-10-21 29549, 2020

      • ruaok
        I'm thinking that the version I described ought to be easy to implement...