Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Generalise template building further #37

Open
alessandrofelder opened this issue Aug 23, 2024 · 2 comments
Open

[Feature] Generalise template building further #37

alessandrofelder opened this issue Aug 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@alessandrofelder
Copy link
Member

Is your feature request related to a problem? Please describe.
We'd like to minimise work needed to create a new template from new source data.

Describe the solution you'd like
A well-designed and documented way to make a template that

  • uses default methods for each step, to minimise effort
  • avoid duplications by e.g. ensuring default names for files, and writing intermediate files, and the default methods for template generation steps mentioned above.
  • makes it easy to customise steps for which the new data is tricky

Describe alternatives you've considered

\

Additional context
Currently considering decorator, strategy and template pattern, but also might like to think about non-OO approaches to this, that might be simpler.

@alessandrofelder alessandrofelder added the enhancement New feature or request label Aug 23, 2024
@alessandrofelder
Copy link
Member Author

Some pseudocode for idea:

from template_building import TemplatePrepper

# for easy atlases
if __name__ == "__main__":
    crab_template = TemplatePrepper("crab")
    crab_template.run()

#----------------------------------------------------


# for harder atlas
class DifficultTemplatePrepper(TemplatePrepper):
    def __init__(config):
        pass

    def initialRegistrationStep(self):
        # do a fancier initial registration
        pass


# for hard atlases
if __name__ == "__main__":
    crab_template = DifficultTemplatePrepper("crab")
    crab_template.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@alessandrofelder and others