Closed longshuicy closed 11 months ago
Hmm no item is collected... Did I test it correctly? I am using this command python -m pytest tests/pyincore/analyses/buildingdamage/test_buildingdamage_offline.py
Hmm no item is collected... Did I test it correctly? I am using this command
python -m pytest tests/pyincore/analyses/buildingdamage/test_buildingdamage_offline.py
Ah all the test against analyses are not "pytest". you might just want to run them as a normal python script.
Not for this PR, but I wonder if we need to check for offline mode so someone doesn't try to use an offline client to do operations like create an EQ.
Not for this PR, but I wonder if we need to check for offline mode so someone doesn't try to use an offline client to do operations like create an EQ.
Good catch. I will create a task.
What is the meaning of "Add allowed demand information to pyglobals" in the main description? I mean what is working with pyglobals. Also, the only hazardservice uses the offline, because this PR is only for "get allowed demands" method?
What is the meaning of "Add allowed demand information to pyglobals" in the main description? I mean what is working with pyglobals. Also, the only hazardservice uses the offline, because this PR is only for "get allowed demands" method?
What is the meaning of "Add allowed demand information to pyglobals" in the main description? I mean what is working with pyglobals. Also, the only hazardservice uses the offline, because this PR is only for "get allowed demands" method?
The name is what was originally planned (putting the demand types in globals), but after discussion, it seemed better closer to the hazard service since it impacted the hazard service.
It was discovered that when running with local data, the hazard service still needed to talked to the service to get the allowed demand types. But if a user is offline, that is not available. This adds them to pyincore so they are available for offline mode so now a user should be able to run pyincore entirely offline.
This PR:
hazardservice.py
To test:
tests/pyincore/analyses/buildingdamage/test_buildingdamage_offline.py