Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-729

CONSOLE_DEFAULT attributes are evaluated when a class is first importer (__new__). Because of this, if we want to change for example Connectivity_data.default = file(different_path), the console_defaults are still from the old reference.

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.0.3
    • Traits
    • None

    Description

      Proposal:

      class Connectivity(Type):

      default = reader.File("zip_path")

      region_labels = basic.StringArray(label="bla bla", default.read_data(name="centres.txt.bz2", usecols=(0,), dtype="string", field="region_labels"))

      c = Connectivity()
      c.default.load("different_zip_path", c)

      reader.File().... will maintain inside a map between every field loaded through "read_data" method, thus being able to re-load from a different zip file.

      A different implementation reader.Table should also be build, to be used when loading LookupTable attributes.

      Gliffy Diagrams

        Attachments

          Activity

            People

              lia.domide Lia Domide
              lia.domide Lia Domide
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d