Skip to content

Fire CLI does not convert types #157

Description

@j08lue

I stumbled over passing a boolean flag to the fire-generated CLI and it getting passed to the Python API as a string.

e.g. when you do

os_climate_hazard degree_days_indicator --store /input-data --source_dataset UKCP18 --source_dataset_kwargs "{'resolution':'60km','domain':'uk'}" --gcm_list "[ukcp18]" --scenario_list "[rcp85]" --threshold_list "[]" --threshold_temperature 28 --central_year_list "[2030,2040,2050,2060,2070,2080,2090]" --central_year_historical 2005 --window_years 20 --dask_cluster_kwargs "{'n_workers': 1, 'threads_per_worker': 1}" --write_xarray_compatible_zarr false

the flag --write_xarray_compatible_zarr false internally gets passed on as the string "false", which evaluates to True... 🤦

I read there is a drop-in replacement for fire called afire https://github.com/zqqqqz2000/afire

Perhaps worth considering to change to that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions