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

45 save retrofit strategy query parameters #50

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

longshuicy
Copy link
Member

@longshuicy longshuicy commented Mar 12, 2024

  • GET /maestro/{testbed}/datasets/{incore_dataset_id}/rsdetails
  • POST /maestro/{testbed}/datasets/{incore_dataset_id}/rsdetails
    payload
{
        "total": {
            "num_bldg": 3283,
            "num_bldg_no_cost": 42,
            "cost": 117260721.43
        },
        "by_rule": {
            "0": {
                "num_bldg": 3191,
                "num_bldg_no_cost": 40,
                "cost": 94393478.73
            },
            "1": {
                "num_bldg": 90,
                "num_bldg_no_cost": 0,
                "cost": 22867242.7
            },
            "2": {
                "num_bldg": 2,
                "num_bldg_no_cost": 2,
                "cost": 0
            }
        },
        "rules": {
            "testbed": "galveston",
            "rules": 3,
            "zones": ["1P", "1P", "0.2P"],
            "strtypes": ["1", "2", "1"],
            "pcts": [1, 1, 1]
        },
        "retrofits": {
            "ret_keys": ["elevation", "elevation", "elevation"],
            "ret_vals": [5, 10, 5]
        },
        "rsDetailsLayerId": "dummy_layer_id"
    }
  • DELETE /maestro/{testbed}/datasets/{incore_dataset_id}/rsdetails

Test locally by running pytest app/tests/test_retrofit_strategies.py
Also explore the swagger api at: http://localhost:8000/docs#/datasets

@longshuicy longshuicy linked an issue Mar 12, 2024 that may be closed by this pull request
@longshuicy longshuicy self-assigned this Mar 12, 2024
@ylyangtw
Copy link
Contributor

I refer to the test for parameters but only get "detail": "retrofit strategy details not found"}
image
Am I using the correct dataset id?

@longshuicy
Copy link
Member Author

I refer to the test for parameters but only get "detail": "retrofit strategy details not found"} image Am I using the correct dataset id?

Oh i might accidently deleted that dataset. Could you try this id "65fb5320e42f3b0da565d1dc" instead?

Copy link
Contributor

@ylyangtw ylyangtw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested the services, all work well

@Rashmil-1999
Copy link
Contributor

Yes, I've integrated the service in the PR so it works well

@longshuicy longshuicy merged commit 0704f18 into develop Mar 21, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Save retrofit strategy query parameters
3 participants