Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
U
ulysses
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • universe
  • ulysses
  • Issues
  • #1

Closed
Open
Opened May 15, 2020 by Holger Schulz@hschulzOwner

Loader improvements

Created by: iamholger

Hi, I added a loader facility that seems more amenable that having to hardcode what models exist.

The price to pay is one additional member for each class called 'shortname'. For example in eta1DME.py:

def shortname(self): return "1DME"

The nice thing is that uls now knows automatically what models it has and the model selection work through a simple dict {shortname : Class}

This allowed to also push a script bin/uls-models which conveniently lists all the builtin stuff and prints the corresponding doc strings without having to code clumsy if name == "1DME" .... logic.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: universe/ulysses#1