Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • pygwinc pygwinc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 42
    • Issues 42
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gwinc
  • pygwincpygwinc
  • Merge requests
  • !149

make BudgetItem.freq a property

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Kevin Kuns requested to merge kevin.kuns/pygwinc:BudgetItem-freq into master Jan 05, 2022
  • Overview 5
  • Commits 1
  • Pipelines 2
  • Changes 3

This makes BudgetItem frequency arrays properties instead of attributes. As an attribute, BudgetItem.freq can be set directly but this doesn't update the precomp cache or any of the frequency arrays of the cal_objs and noise_objs for instances of Budget. This is a problem if run is called without any keyword arguments after changing freq. Now that freq is a property, the setter clears the precomp cache and recurses through the cal_objs and noise_objs if applicable.

So this works correctly now

traces1 = budget.run(freq=freq1)
budget.freq = freq2
traces2 = budget.run()
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: BudgetItem-freq