Open trystyncote opened 10 months ago
The way I see it, in order to best facilitate this change, it would be wise to restructure how the code is meant to behave. For instance, the abc
module defines how an adjustment abc.Adjustment
or qualm abc.Qualm
should be defined. In order to best accommodate for customizability, the project needs to be restructured to allow this to work smoothly. For instance, since abc.Adjustment
has activation_time
as an abstract method, it's safe to assume that all adjustment objects will be able to call activation_time
and get an integer, representing time, back. Therefore, it can be called to signify when the adjustment activates. I think the same philosophy applies here, and how it's actually structured may influence how the object-calling works, as per this issue.
As of right now, the structure for various objects is... scattered.
For clarity, I'm not going to restructure some objects that aren't as scattered, if at all. Those being:
qualms
module;_utils
module;_video_crafting
module; and_separating_instructions
,errors
,metadata
)._motion_tree
Firstly, I'd like to contain the
dump()
,parse()
, andwalk()
into a module object, instead of having it externally accessible (this is kind of confusing). So instead, it'd bemotion_tree.dump()
,motion_tree.parse()
, andmotion_tree.walk()
.Secondly, I think that the nodes module could be unpacked, so that instead of, for instance,
_motion_tree.nodes.Continue
, it'd bemotion_tree.Continue
. This is mainly because themotion_tree
module is adjacent in behaviour to an abstract syntax tree, but instead focused on the ordering and abstract details of instruction handling._file_objects
The main problem with the way that the
_file_objects
module is being handled, is that it's largely unpacked and there are many things within it. The vast majority of the public-facing API of Scrivid comes from the_file_objects
module. However, everything is referred to in an unpacked way. So, instead of, say,_file_objects.RootAdjustment
, it's simplyRootAdjustment
.While this saves on typing, this is a very scattered approach. So, instead, I'd like to compress this into more appropriate 'categories', and change various names to match.
The structure could look something like this:
** notes* [1] The respective submodule
core
would be where the classes themselves are stored. [2] Thecreate()
function would be the factory function for the respective object.