diff --git a/tests/fixtures/stationmeta/stationmeta_global.json b/tests/fixtures/stationmeta/stationmeta_global.json index 6f89972c85c26992abc4ae821bd47df9b1a2e1d4..6e6be3938a28025b0990b22fc5a7b33fcce8988e 100644 --- a/tests/fixtures/stationmeta/stationmeta_global.json +++ b/tests/fixtures/stationmeta/stationmeta_global.json @@ -23,9 +23,6 @@ "max_population_density_25km_year1990":-1.0, "mean_nox_emissions_10km_year2015":-999.0, "mean_nox_emissions_10km_year2000":-999.0, - "wheat_production_year2000":-999.0, - "rice_production_year2000":-999.0, - "omi_no2_column_years2011to2015":-999.0, "toar1_category":0, "station_id":1}, {"mean_topography_srtm_alt_90m_year1994":-999.0, @@ -52,9 +49,6 @@ "max_population_density_25km_year1990":-1.0, "mean_nox_emissions_10km_year2015":-999.0, "mean_nox_emissions_10km_year2000":-999.0, - "wheat_production_year2000":-999.0, - "rice_production_year2000":-999.0, - "omi_no2_column_years2011to2015":-999.0, "toar1_category":0, "station_id":2}, {"mean_topography_srtm_alt_90m_year1994":-999.0, @@ -81,9 +75,6 @@ "max_population_density_25km_year1990":-1.0, "mean_nox_emissions_10km_year2015":-999.0, "mean_nox_emissions_10km_year2000":-999.0, - "wheat_production_year2000":-999.0, - "rice_production_year2000":-999.0, - "omi_no2_column_years2011to2015":-999.0, "toar1_category":0, "station_id":3} ] diff --git a/tests/test_search.py b/tests/test_search.py index 6bc61c38508892aaea3d13945a429ff5a2724c13..9795e60a6f218c42effd659c63570940b6854e0e 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -220,11 +220,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-07-15T19:27:09.463245+00:00', 'description': 'station created', 'old_value': '', @@ -286,11 +283,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-08-15T21:16:20.596545+00:00', 'description': 'station created', 'old_value': '', @@ -359,11 +353,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-08-15T21:16:20.596545+00:00', 'description': 'station created', 'old_value': '', diff --git a/tests/test_stationmeta.py b/tests/test_stationmeta.py index bbf8e428176560fbb362820b80b7882eb1524740..b3b9951e940492ce1994d8858d0722cb693e00ab 100644 --- a/tests/test_stationmeta.py +++ b/tests/test_stationmeta.py @@ -215,11 +215,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-07-05T08:23:04.551645+00:00', 'description': 'station created', 'old_value': '', @@ -259,11 +256,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-07-15T19:27:09.463245+00:00', 'description': 'station created', 'old_value': '', @@ -302,11 +296,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-08-15T21:16:20.596545+00:00', 'description': 'station created', 'old_value': '', @@ -355,11 +346,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-08-15T21:16:20.596545+00:00', 'description': 'station created', 'old_value': '', @@ -444,11 +432,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': [{'datetime': '2023-07-05T08:23:04.551645+00:00', 'description': 'station created', 'old_value': '', diff --git a/tests/test_timeseries.py b/tests/test_timeseries.py index aeec240968cef6bd91db3443ad78ba505221a28b..827261ab67727a6a52adfd0dc064e856384f9f95 100644 --- a/tests/test_timeseries.py +++ b/tests/test_timeseries.py @@ -230,11 +230,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': []}, 'programme': {'id': 0, 'name': '', 'longname': '', 'homepage': '', 'description': ''}}, {'id': 2, @@ -305,11 +302,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'id': 3, 'name': 'Test_China', 'roles': [], @@ -376,11 +370,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': []}, 'programme': {'id': 0, 'name': '', 'longname': '', 'homepage': '', 'description': ''}} assert response.json() == expected_resp @@ -549,11 +540,8 @@ class TestApps: 'mean_topography_srtm_alt_1km_year1994': -999.0, 'mean_topography_srtm_alt_90m_year1994': -999.0, 'min_topography_srtm_relative_alt_5km_year1994': -999.0, - 'omi_no2_column_years2011to2015': -999.0, - 'rice_production_year2000': -999.0, 'stddev_topography_srtm_relative_alt_5km_year1994': -999.0, - 'toar1_category': 'unclassified', - 'wheat_production_year2000': -999.0}, + 'toar1_category': 'unclassified'}, 'changelog': []}, 'variable': {'name': 'toluene', 'longname': 'toluene', 'displayname': 'Toluene', 'cf_standardname': 'mole_fraction_of_toluene_in_air', 'units': 'nmol mol-1', diff --git a/toardb/stationmeta/models_global.py b/toardb/stationmeta/models_global.py index e66ed1898f21b08fb60ef61a45922cac69eb521f..cebd9b8165565c0eb7b1a3c2e94d2652b647bc44 100644 --- a/toardb/stationmeta/models_global.py +++ b/toardb/stationmeta/models_global.py @@ -70,12 +70,6 @@ class StationmetaGlobal(Base): +--------------------------------------------------+------------------------+-----------+----------+------------------------------------------------+ | mean_nox_emissions_10km_year2000 | double precision | | not null | '-999.0'::numeric | +--------------------------------------------------+------------------------+-----------+----------+------------------------------------------------+ - | wheat_production_year2000 | double precision | | not null | '-999.0'::numeric | - +--------------------------------------------------+------------------------+-----------+----------+------------------------------------------------+ - | rice_production_year2000 | double precision | | not null | '-999.0'::numeric | - +--------------------------------------------------+------------------------+-----------+----------+------------------------------------------------+ - | omi_no2_column_years2011to2015 | double precision | | not null | '-999.0'::numeric | - +--------------------------------------------------+------------------------+-----------+----------+------------------------------------------------+ | toar1_category | integer | | not null | '-1'::integer | +--------------------------------------------------+------------------------+-----------+----------+------------------------------------------------+ | station_id | integer | | not null | | @@ -131,9 +125,6 @@ class StationmetaGlobal(Base): max_population_density_25km_year1990 = Column(Integer, nullable=False, server_default=text("'-999.0'::numeric")) mean_nox_emissions_10km_year2015 = Column(Float(53), nullable=False, server_default=text("'-999.0'::numeric")) mean_nox_emissions_10km_year2000 = Column(Float(53), nullable=False, server_default=text("'-999.0'::numeric")) - wheat_production_year2000 = Column(Float(53), nullable=False, server_default=text("'-999.0'::numeric")) - rice_production_year2000 = Column(Float(53), nullable=False, server_default=text("'-999.0'::numeric")) - omi_no2_column_years2011to2015 = Column(Float(53), nullable=False, server_default=text("'-999.0'::numeric")) toar1_category = Column(ForeignKey('tc_vocabulary.enum_val'), nullable=False, server_default=text("'-1'::integer")) # do not use string declaration here (not working for pytest) # use the explicit class name here, diff --git a/toardb/stationmeta/schemas.py b/toardb/stationmeta/schemas.py index 81c2a1133df66ea7f517932e297b71c7dd9e86c8..3585d67245eb201d509ca171626bb5b31da25f34 100644 --- a/toardb/stationmeta/schemas.py +++ b/toardb/stationmeta/schemas.py @@ -289,9 +289,6 @@ class StationmetaGlobalBase(BaseModel): max_population_density_25km_year1990: float = Field(..., description="maximum value within a radius of 25 km around station location of the following data of the year 1990: " + str(provenance['population_density'])) mean_nox_emissions_10km_year2015: float = Field(..., description="mean value within a radius of 10 km around station location of the following data of the year 2015: " + str(provenance['nox_emissions'])) mean_nox_emissions_10km_year2000: float = Field(..., description="mean value within a radius of 10 km around station location of the following data of the year 2000: " + str(provenance['nox_emissions'])) - wheat_production_year2000: float = Field(..., description="no wheat production metadata stored yet") - rice_production_year2000: float = Field(..., description="no rice production metadata stored yet") - omi_no2_column_years2011to2015: float = Field(..., description="no OMI NO2 column metadata stored yet") toar1_category: str = Field(..., description="The station classification for the Tropsopheric Ozone Assessment Report based on the station proxy data that are stored in the TOAR database (see controlled vocabulary: Station TOAR Category)") # station_id: int = Field(..., description="internal station_id to which these global data belong") @@ -350,9 +347,6 @@ class StationmetaGlobalPatch(BaseModel): max_population_density_25km_year1990: float = None mean_nox_emissions_10km_year2015: float = None mean_nox_emissions_10km_year2000: float = None - wheat_production_year2000: float = None - rice_production_year2000: float = None - omi_no2_column_years2011to2015: float = None toar1_category: str = None station_id: int = None @@ -549,9 +543,6 @@ class StationmetaGlobalBaseNested(StationmetaGlobalBase): max_population_density_25km_year1990: float = None mean_nox_emissions_10km_year2015: float = None mean_nox_emissions_10km_year2000: float = None - wheat_production_year2000: float = None - rice_production_year2000: float = None - omi_no2_column_years2011to2015: float = None toar1_category: str = None diff --git a/toardb/timeseries/schemas.py b/toardb/timeseries/schemas.py index 5712290ebe46edc6440338807a848a325b6d6385..4efb122542471cd1b70ad6a105afac72909cd798 100644 --- a/toardb/timeseries/schemas.py +++ b/toardb/timeseries/schemas.py @@ -391,9 +391,6 @@ class Timeseries(TimeseriesBase): max_population_density_25km_year1990: float = None mean_nox_emissions_10km_year2015: float = None mean_nox_emissions_10km_year2000: float = None - wheat_production_year2000: float = None - rice_production_year2000: float = None - omi_no2_column_years2011to2015: float = None toar1_category: str = None class Config: