transition-zero / tz-client

A client repository for accessing FEO data programmatically.
https://docs.feo.transitionzero.org
Apache License 2.0
21 stars 4 forks source link

build: :construction_worker: Add production integration tests #93

Closed joconnor-ecaa closed 9 months ago

joconnor-ecaa commented 9 months ago

Description

Add CI to run tests in production environment once per hour. Send slack alerts if they fail.

Currently this requires some ugly conditionals in the tests since test data in staging and prod are different.

Checklist

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ā†—ļøŽ

Name Status Preview Comments Updated (UTC)
feo-client āœ… Ready (Inspect) Visit Preview šŸ’¬ Add feedback Nov 30, 2023 2:44pm
joconnor-ecaa commented 9 months ago

In general Iā€™m not bothering too much in tests but ā€” situation should be much better in source code.

On 30 Nov 2023, at 14:50, Megan Bates @.***> wrote:

@herdofsheep commented on this pull request.

In tests/CI/test_scenario.py https://github.com/transition-zero/feo-client/pull/93#discussion_r1410789606:

 model = scenario.model

assert isinstance(model, Model) assert model.id == "feo-global-indonesia"

-def test_scenario_str():

  • scenario = Scenario.from_id("feo-global-indonesia:feo-indonesia-current-policies")
  • assert (
  • str(scenario) == "Scenario: FEO Indonesia - Current Policies "
  • "(id=feo-global-indonesia:feo-indonesia-current-policies)"
  • ) +def test_scenario_str(scenario): I've noticed in general there's quite a few functions in the repo without type hints- not one for now while we're rushing but just making a note of it

ā€” Reply to this email directly, view it on GitHub https://github.com/transition-zero/feo-client/pull/93#pullrequestreview-1757658040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOMWXRQPOINMEAVPSXXYWJDYHCMKTAVCNFSM6AAAAABABD6SX2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONJXGY2TQMBUGA. You are receiving this because you authored the thread.