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

Replace individual max and min values with pairs #47

Closed
Zarquan opened this issue Apr 24, 2024 · 1 comment
Closed

Replace individual max and min values with pairs #47

Zarquan opened this issue Apr 24, 2024 · 1 comment
Assignees

Comments

@Zarquan
Copy link
Member

Zarquan commented Apr 24, 2024

The current document has lots of maxxxxx and minxxxx properties, using the property names to link them together.

resources:
  compute:
  - name: "compute-001"
    type: "https://www.purl.org/ivoa.net/resource-types/generic-compute"
    spec:
      mincores: 8
      maxcores: 16
      minmemory: 16
      maxmemory: 32 

This means each class object has lots of top level minxxx and maxxxx properties associated with it, cluttering up the class interface.

It is better to define maximum and minimum properties as a re-useable element that contains the min and max values as a pair.

resources:
  compute:
  - name: "compute-001"
    type: "https://www.purl.org/ivoa.net/resource-types/generic-compute"
    spec:
      cores:
        min: 8
        max: 16
      memory:
        min: 16
        max: 32 

It cleans up the class interfaces and enables us to automate some validation that checks that the max value is always greater than the min value.

@Zarquan Zarquan self-assigned this Apr 25, 2024
Zarquan added a commit to Zarquan/ExecutionBroker that referenced this issue Apr 30, 2024
@Zarquan
Copy link
Member Author

Zarquan commented Apr 30, 2024

Fixed in #60

@Zarquan Zarquan closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant