-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Better naming of variables (aggregates v/s jobs v/s aggregate_stores) #370
Comments
Another example: naming is inconsistent between |
@bdice do you think we should rename the private |
@kidrahahjo Using tl;dr @kidrahahjo suggested deprecating the Below, names like job1 = project.open_job(id='abc')
job2 = project.open_job(id='19a')
... Names like agg1 = (job1, job2)
agg2 = (job3, job4, job5)
agg3 = (job6,)
... Case A: One job defined like
|
@kidrahahjo You suggested a counterexample to my proposal before I even posted it, so maybe we need to just talk this through as a team 😂 . Case B would be applicable here but the variadic positional args make no sense for a class. I am fine with |
I stated my position on these naming issues somewhere in Slack recently, I think you're intending to paraphrase my proposal with the |
@vyasr Could you link to that discussion and copy the relevant parts into this issue for posterity? (Also sorry if I took credit for your idea, I don’t remember the conversation you mentioned.) |
No worries, between our various projects I frequently hear my ideas repeated back to me a month or two later (like at dev meeting yesterday), I think you often internalize parts of the ideas and forget the conversations haha. In this case I think you proposed this name and I provided reasoning for how I think many of our objects should be renamed in line with the idea of execution/submission units. I just decided it's probably more helpful best to point out when that happens in the event that the original discussions help jog people's memories and push things along faster. Found the Slack conversation (https://signac.slack.com/archives/CPCMN12EL/p1599749818013000?thread_ts=1599730647.002500&cid=CPCMN12EL). |
And here's the full thread pasted in from Slack: Hardik 3 months ago Bradley Dice 3 months ago Mike 3 months ago Hardik 3 months ago Vyas Ramasubramani 3 months ago Bradley Dice 3 months ago Vyas Ramasubramani 3 months ago Bradley Dice 3 months ago Hardik 3 months ago Hardik 3 months ago Bradley Dice 3 months ago Vyas Ramasubramani 3 months ago Bradley Dice 3 months ago Vyas Ramasubramani 3 months ago Vyas Ramasubramani 3 months ago Bradley Dice 3 months ago Vyas Ramasubramani 3 months ago Vyas Ramasubramani 3 months ago Vyas Ramasubramani 3 months ago Bradley Dice 3 months ago Hardik 3 months ago Vyas Ramasubramani 3 months ago Vyas Ramasubramani 3 months ago Hardik 3 months ago Vyas Ramasubramani 3 months ago Bradley Dice 3 months ago |
I think the action items here are:
|
I agree, let's not discuss any further on this thread. My two cents: I'd actually vote to table this discussion entirely for the moment. At this point we're stuck with enough of these names for a while that I'd recommend that we focus on making more substantive changes to clean up the code base before we try to decide on names. This feels like more of a 1.0 (or at least closer to 1.0) decision to me, especially because I'm not even sure that we know what should be in our public API yet. Once aggregation is done I think we'll need to go through a few minor releases with deprecation cycles so that we can stabilize (and fix the numerous inevitable bugs), then we can revisit this. |
@vyasr The only reason I think we should make a decision (rather than tabling the discussion) is that our choice here has significant effects on how we write docs, error/help messages, and explain the package functionality. It completes definitions like “A bundle is composed of SubmissionTasks” or “the provided job and operation filters determine which ExecutionUnits will be run.” |
I'm sympathetic to that, but my concern is that in the current state the names that I would want will only be semi-accurate, and worse, may have to change again if we don't have the right abstractions in place to begin with. My original proposal was to recognize that an
That's just a handful of examples; looking at some of our other open issues will point to others. I'm not saying that they're necessarily dealbreakers, but in my view they point to lots of code smells and design flaws that we'd want to rework when refactoring, and they are likely to lead to meaningful changes in the API (at least the recommended API, even if we continue to indefinitely support older APIs). At the very least, I think we need to consider this before trying to move forward. In the interest of avoiding exactly what we said we wouldn't do (discuss forever on this thread) I've asked our current community manager @mikemhenry to add this issue to the topic list for our next dev meeting. I'll stop posting responses after this one. |
I think we need some nice overview diagram that demonstrates how all of these components work together. Otherwise the discussion is very different to follow. |
Feature description
The
next
branch has many ambiguous variable names, and anyone could get confused with those names.A specific example would be the use of jobs v/s aggregate in the method parameters
In context with the current code structure, for every operation, an aggregate store is created and to get all the created aggregates (we only support default aggregation for now), we iterate over that aggregate store.
For example, in
run
, for every aggregate, an instance of_JobOperation
is created by initially iterating over the aggregate store for every operation.Proposed solution
A better and consistent naming is required for all private methods for now. I also vote on deprecating the
jobs
argument and replacing it withaggregates
or while keeping thejobs
argument, we could also add anaggregates
argument but it may not be internally consistent as everything is an aggregate now.The text was updated successfully, but these errors were encountered: