1) I don't see why the modules need to depend on each other (with Python's dynamic typing)
2) I don't think modules depending on each other is a big problem
yalaforge
re 1) even a "dynamic" dependency is still a dependency that violates your usual design principles
re 2) that's a matter of taste :)
luks
are we talking about the dumb model classes here?
yalaforge
yup
luks
where do you need a reference to the Release class in Artist?
yalaforge
when you request an artist from the web service and set the include parameter to include releases?
then you'll want to access the releases (or release groups) using Artist.releases
luks
and where do you need to call Release in the code?
(I really don't see it, not just acting stupid :))
yalaforge
I don't have to reference the Release symbol from within the Artist class, that's right
hmm.
I think to me a logical dependency is just as bad as a real one. and you don't care, that's the difference :)
in practice there won't be much of a problem, that's where we agree
yalaforge is just looking for a decomposition that would work for strictly typed languages, too
after all, I want to create a reference model again. not just one for python
luks
in java you would simply import Artist in Release.java and Release in Artist.java
in C++ you would need to use forward declarations, like libmb3 already does
yalaforge
yup. but like I said, there are no modules in java (and also none in c++)
in java I'd just throw all model classes into one package and that's it
no need to import anything because it's all the same package
luks
right
but the classes still depend on each other
I honestly don't see the difference :)
yalaforge
if I did cross package boundaries with my imports then you usual architectural metrics reports would detect that
well, what's a package in java is more like a module in python
(and python packages are something else entirely)
that's why pymb2 threw all model classes into one module (1500 LoC, *shudder*)
see what I mean?
luks
what about importing all the subpackages into musicbrainz2.models and leave that as an implementation detail
yalaforge
interesting idea
luks
the individual subpackages would work with models, not the subpackages
yalaforge
hmm, then you'd have bidirectional dependencies between __init__.py and the modules, right?
luks
yes
but that's hidden :)
yalaforge
:)
at least one thing I'm sure of: users of the API should import the package and where the individual classes come from (which modules) shouldn't matter to them
ijabz joined the channel
so even if we have cycles, we don't have them between packages
and that's something really important, IMHO. I guess I can live with a few imperfections on module level
yalaforge will ponder about this some more
thanks luks!
luks
it's basically the same as the java idea
yalaforge
in a way, yes
aCiD2
Hrm, that whole 10-11am thing didn't happen
warp
:)
warp is doing something with revenue taxes
aCiD2
that sounds like heaps of fun
warp
in fact it is
because MetaBrainz isn't paying sales tax over the invoices I send there, but I do get sales tax back from the stuff I'm buying for my company here. (If I understand things correctly).
alastairp joined the channel
philip6137 joined the channel
Leftmost
I'm looking at the schema for NGS and I'm not seeing how subscriptions are stored. I'm assuming I should be including that in my proposal if it's something I'd work on given time.
luks
the current NGS version is very simplified compared to the live version
oh
subscriptions
that's almost identical to the live version
editor_subscribe_artist
or editor_subscribe_label, editor_subscribe_editor
they link to the editor and then the subscribed entity
ah, I see the first few proposals have been submitted, great!
aCiD2: anyway, what can I do regarding edit migration?
aCiD2
warp: read the document!
or if you have, we can get talking
warp
I'm reading it now (at 1.3).
I assume X under Read-only means that edit type is read-only?
aCiD2
yea
warp
aCiD2: so, what now? :)
aCiD2
If you want to jump in, MOD_REMOVE_TRMID might be any easy one
Here's the way I've been developing. Look up the old type of the edit in ModDefs.pm (svn checkout) and then do a "SELECT * FROM public.moderation_closed WHERE type = <type> LIMIT 10"
Then try and create a Dict[] format 'data' in the edit type
Then write sub upgrade. Next, I run ./admin/MigrateEdits (I usually edit MusicBrainz::Script::MigrateEdits->run to only get edits with type = <type>, editing the SELECT)
and keep doing that until it stops erroring
warp
can I do this on master, or should I get a fancy edit-migration branch from you?
aCiD2
Then, I'll go back in and write related_entities, foreign_keys and build_display_data
You should do this off this commit:
a4c9d8603010f4997ed5b50fe16f400cb97443cc
so you might want to do: "git checkout -b read-only-edit-types a4c9d86"
Then "git checkout -b blah read-only-edit-types"
and it seems that REMOVE_TRMID got purged when we dropped them... so... maybe MOD_EDIT_TRACKTIME?
yea, they all are probably - but you'll have to check them out one by one, as each one has its own branch atm
warp
there's five files in that directory now, but those aren't edit types I guess.
aCiD2
one of them is
warp
EditReleaseName
aCiD2
yep
warp
ok
djce
I have a couple of quick q's about how mb_server runs under fcgi...
First q: how horrible would it be if static resources weren't all directly under /static/
say, under /static/$someinteger instead.
?
Next q: how can one restart / reload the fcgi processes (e.g. to get them to re-run any "at first start" code), and how quickly can that happen (e.g. would it interrupt service)?
anthonynonso joined the channel
I think I'm out of questions for now :-)
aCiD2
djce: will $someinteger change?
djce
at release time.
aCiD2
hrm, probably doable...
djce
With regards to static things actually not being static (i.e. at release, they might change), you can do one of two things:
(a) ignore it. Put up with the fact that clients might use stale assets.
(b) Don't change things, e.g. if you want a different foo.js then call it foo2.js, and one release later you can delete foo.js.
(sorry, s/two/three/)
(c) Always include a release ID in the URL, so that at each release, the URLs used are all new, thus not cached by clients.
anthonynonso
hi all, i'm new here. looking to apply for GSoC
djce
I see some code along the lines of 'if href=="/static/..."' though.
warp
djce: if it's just to prevent stale data being served, we can just append ?t=$someinteger, the actual resources don't have to be served any differently.