Skip to content

Refactoring suggestions #36

Closed
Closed
@rouson

Description

@rouson

@milancurcic would you be open to a pull request with some refactoring that is minor but global? If so, I would submit one or more pull requests with the changes described below. In all honesty, one of the main reasons I do steps like these is because it walks me through the project in a way that keeps my brain actively involved in consuming and understanding the code, but there are potential inherent benefits to the project in the parenthetical descriptions below. If you like some ideas but not others, you could check the ones you like. Otherwise, I can check them off as the pull requests get reviewed and merged.

Increase modularity

  • Separate procedure definitions into submodules, keeping interface bodies in modules (which more succinctly exposes the API and reduces compilation cascades)

Adopt more functional style

  • Use associate wherever possible to ensure immutability (which reduces chances of mistaken data modifications)
  • Use constructor functions that return fully-defined, whole objects (which reduces chances of mistakenly using undefined components and eliminates the need for setters) (done as of v0.3.0)
  • Look for opportunities to employ the functional-fortran library (as of Read Conv2D, MaxPooling2D, and Flatten layers from Keras #85 it's now a dependency; using reverse in one or two places)

Leverage Vegetables in the Tests

  • Make passing tests more quiet (less output)
  • Make test output read like a specification

Note: Not using vegetables but essentially resolved as of v0.3.0.

Generate & Deploy Documentation

  • Add a FORD project file.
  • Add PlantUML diagrams
  • Add a CI script that deploys the documentation to GitHub Pages

Continuous Integration Testing

Nomenclature

This is a style that Brad (@everythingfunctional) and I adopted in recent code:

  • Module name suffix _m
  • Type name suffix _t
  • Submodule name suffix _submodule

Note: Using _submodule for submodules as of v0.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions