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

Rewrite TvbProfile and TVBSettings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.3
    • Component/s: None
    • Labels:
      None

      Description

      New usage:

      from tvb.basic.profile import TvbProfile
      TvbProfile.set_profile(TvbProfile.WEB_PROFILE)
      TvbProfile.current.TVB_STORAGE

      TvbProfile.current will be an instance of one of the classes defined in tvb.basic.config.profile_settings.py or tvb.config.profile_settings.py.

      The hierarchy of ProfileSettings classes is as follows:

      BaseSettingsProfile
      //
      LibrarySettingsProfile WebSettingsProfile

      //
      Test LibraryProfile TestSQLiteProfile CommandSettingsProfile

      TestPostgresProfile

      And there is even a third layer: BaseSettingsProfile refers classes from tvb.basic.config.settings.py.
      These classes are mainly meant to hold basic settings grouped and organized, they are not really intenged to be used outside of a SettingsProfile instance (so it is composition not just aggregation).

      VersionSettings
      ClusterSettings
      DBSettings
      WebSettings
      WebAdminSettings

      One of the important differences with the new implementation is the fact that DEPLOYMENT vs DEVELOPMENT is decided by TvbProfile internally, and no longer specified through a specific profile, as it was before.
      Internally, we determine that, by questioning the file system related to python modules, and searching for specific files written at package time.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              lia.domide Lia Domide
              Reporter:
              lia.domide Lia Domide
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 4 hours Original Estimate - 2 days, 4 hours
                  2d 4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 3 hours, 30 minutes
                  3d 3h 30m