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

Let VersionTracker optionally ignore archive steps #2447

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
22e5dec
Adapt create new snapshots script
pabloarosado Mar 13, 2024
418274d
Fix create_new_snapshots
pabloarosado Mar 14, 2024
7508ad4
Add snapshots and meadow steps, and remove wcad
pabloarosado Mar 14, 2024
79e1784
Remove faostat_gn and fix issues
pabloarosado Mar 14, 2024
3d0eaf2
Fix meadow faostat_sdgb
pabloarosado Mar 14, 2024
ac6e691
Update docs
pabloarosado Mar 14, 2024
17de3c2
Add garden steps and minor improvements on meadow
pabloarosado Mar 14, 2024
273de4f
Fix issues with item code changes in faostat_fs
pabloarosado Mar 14, 2024
6277a02
Add new flag, and increase number of characters for item codes of fao…
pabloarosado Mar 14, 2024
660ed7f
Remove unused excluded country, fix new element mismatch between fbsh…
pabloarosado Mar 14, 2024
a9c5fc4
Fix issue with categorical columns in script that updates custom meta…
pabloarosado Mar 14, 2024
c4169f8
Update custom metadata files
pabloarosado Mar 14, 2024
c7dd40a
Add element amendments for fbsc
pabloarosado Mar 14, 2024
196e9db
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 15, 2024
8a39331
Fix various issues
pabloarosado Mar 15, 2024
9ff00b5
Remove anomaly fix on cocoa beans, which is no longer in the data
pabloarosado Mar 15, 2024
eb45fab
Fix issues with region aggregates in fbsc
pabloarosado Mar 15, 2024
27ffd25
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 18, 2024
d4606b8
Explicitly use regions, population and income groups datasets
pabloarosado Mar 18, 2024
2966376
Fix anomaly of spinach area harvested in China
pabloarosado Mar 18, 2024
91f8f43
Fix errors on missing units
pabloarosado Mar 18, 2024
649303d
Minor fixes
pabloarosado Mar 18, 2024
d906ba8
Fix missing metadata in latest faostat_qv, big refactor
pabloarosado Mar 18, 2024
a109206
Fix changed item in qcl and global food explorer
pabloarosado Mar 19, 2024
e4cc4d7
Add grapher steps (WIP)
pabloarosado Mar 19, 2024
3da102e
Use tables instead of dataframes
pabloarosado Mar 19, 2024
4aad908
Use tables instead of dataframes in fbsc and qcl steps
pabloarosado Mar 19, 2024
38d5a4a
Use tables instead of dataframes in garden metadata step
pabloarosado Mar 19, 2024
eb45770
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 19, 2024
ef0a19a
Improve metadata handling of meadow steps
pabloarosado Mar 19, 2024
deffc1d
Ensure origins are properly propagated
pabloarosado Mar 19, 2024
210f059
Fix various issues to ensure origins are propagated
pabloarosado Mar 19, 2024
da3d6a7
Fix missing origins
pabloarosado Mar 19, 2024
424f50e
Raise warning if domains do not exist any longer in FAOSTAT, and remo…
pabloarosado Mar 20, 2024
1f5c48d
Update docs
pabloarosado Mar 20, 2024
8e2431c
:bug: retry on SSLError
Marigold Mar 20, 2024
3b0c8e4
Remove steps that do not exist anymore in FAOSTAT
pabloarosado Mar 20, 2024
632a27e
Ensure origins are propagated
pabloarosado Mar 20, 2024
5963b81
Fix changed country names
pabloarosado Mar 20, 2024
5b63f9e
Avoid repetitive warning on missing units
pabloarosado Mar 20, 2024
c8f00c5
Check discrepant item name definitions and improve warning messages a…
pabloarosado Mar 20, 2024
5aee362
Improve warning messages
pabloarosado Mar 20, 2024
7ac08af
Inspect remaining warnings and improve warning handling
pabloarosado Mar 20, 2024
acd456a
Add garden and grapher step of additional variables
pabloarosado Mar 20, 2024
5a54af1
Adapt garden and grapher steps of additional variables
pabloarosado Mar 20, 2024
06ae673
Add multi_merge function to owid catalog
pabloarosado Mar 20, 2024
751594c
Update metadata of additional variables dataset
pabloarosado Mar 20, 2024
5de6499
Improve metadata of additional variables dataset
pabloarosado Mar 20, 2024
1b5febd
Improve function that finds dataset id from name
pabloarosado Mar 21, 2024
95c11e4
Improve script to submit faostat chart revisions
pabloarosado Mar 21, 2024
6c28550
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 21, 2024
c98ef24
Fix errors in script that creates chart revisions
pabloarosado Mar 21, 2024
cfc3a5e
Delete unused faostat script
pabloarosado Mar 22, 2024
4f4ecb1
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 22, 2024
a817da2
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 22, 2024
ed19a50
Fix bad format of description_key
pabloarosado Mar 22, 2024
195d7cb
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 22, 2024
c029fd3
Improve snapshot descriptions
pabloarosado Mar 25, 2024
c19fb04
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 25, 2024
f0924be
Update custom metadata files and documentation
pabloarosado Mar 25, 2024
6289859
Improve metadata
pabloarosado Mar 25, 2024
8ea47e2
Merge branch 'master' of github.com:owid/etl into update-faostat-data
pabloarosado Mar 25, 2024
c389835
Fix issue in StepUpdater where archive steps are not really ignored
pabloarosado Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/backport/datasync/datasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any, Dict

import structlog
from botocore.exceptions import EndpointConnectionError
from botocore.exceptions import EndpointConnectionError, SSLError
from owid.catalog import s3_utils
from tenacity import Retrying
from tenacity.retry import retry_if_exception_type
Expand Down Expand Up @@ -32,7 +32,7 @@ def upload_gzip_dict(d: Dict[str, Any], s3_path: str, private: bool = False) ->
for attempt in Retrying(
wait=wait_exponential(min=5, max=100),
stop=stop_after_attempt(7),
retry=retry_if_exception_type(EndpointConnectionError),
retry=retry_if_exception_type((EndpointConnectionError, SSLError)),
):
with attempt:
client.put_object(
Expand Down
2 changes: 1 addition & 1 deletion apps/step_update/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _load_version_tracker(self) -> None:
# It can be used when initializing StepUpdater, but also to reload steps_df after making changes to the dag.

# Initialize version tracker.
self.tracker = VersionTracker()
self.tracker = VersionTracker(ignore_archive=True)

# Update the temporary dag.
_update_temporary_dag(dag_active=self.tracker.dag_active, dag_all_reverse=self.tracker.dag_all_reverse)
Expand Down
297 changes: 297 additions & 0 deletions dag/faostat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,300 @@ steps:
#
data://grapher/faostat/2023-06-12/additional_variables:
- data://garden/faostat/2023-06-12/additional_variables
#
# FAOSTAT meadow steps for version 2024-03-14
#
data://meadow/faostat/2024-03-14/faostat_cahd:
- snapshot://faostat/2024-03-14/faostat_cahd.zip
data://meadow/faostat/2024-03-14/faostat_ei:
- snapshot://faostat/2024-03-14/faostat_ei.zip
data://meadow/faostat/2024-03-14/faostat_ek:
- snapshot://faostat/2024-03-14/faostat_ek.zip
data://meadow/faostat/2024-03-14/faostat_emn:
- snapshot://faostat/2024-03-14/faostat_emn.zip
data://meadow/faostat/2024-03-14/faostat_esb:
- snapshot://faostat/2024-03-14/faostat_esb.zip
data://meadow/faostat/2024-03-14/faostat_fa:
- snapshot://faostat/2024-03-14/faostat_fa.zip
data://meadow/faostat/2024-03-14/faostat_fbs:
- snapshot://faostat/2024-03-14/faostat_fbs.zip
data://meadow/faostat/2024-03-14/faostat_fbsh:
- snapshot://faostat/2024-03-14/faostat_fbsh.zip
data://meadow/faostat/2024-03-14/faostat_fo:
- snapshot://faostat/2024-03-14/faostat_fo.zip
data://meadow/faostat/2024-03-14/faostat_fs:
- snapshot://faostat/2024-03-14/faostat_fs.zip
data://meadow/faostat/2024-03-14/faostat_ic:
- snapshot://faostat/2024-03-14/faostat_ic.zip
data://meadow/faostat/2024-03-14/faostat_lc:
- snapshot://faostat/2024-03-14/faostat_lc.zip
data://meadow/faostat/2024-03-14/faostat_metadata:
- snapshot://faostat/2024-03-14/faostat_metadata.json
data://meadow/faostat/2024-03-14/faostat_qcl:
- snapshot://faostat/2024-03-14/faostat_qcl.zip
data://meadow/faostat/2024-03-14/faostat_qi:
- snapshot://faostat/2024-03-14/faostat_qi.zip
data://meadow/faostat/2024-03-14/faostat_qv:
- snapshot://faostat/2024-03-14/faostat_qv.zip
data://meadow/faostat/2024-03-14/faostat_rfb:
- snapshot://faostat/2024-03-14/faostat_rfb.zip
data://meadow/faostat/2024-03-14/faostat_rfn:
- snapshot://faostat/2024-03-14/faostat_rfn.zip
data://meadow/faostat/2024-03-14/faostat_rl:
- snapshot://faostat/2024-03-14/faostat_rl.zip
data://meadow/faostat/2024-03-14/faostat_rp:
- snapshot://faostat/2024-03-14/faostat_rp.zip
data://meadow/faostat/2024-03-14/faostat_rt:
- snapshot://faostat/2024-03-14/faostat_rt.zip
data://meadow/faostat/2024-03-14/faostat_scl:
- snapshot://faostat/2024-03-14/faostat_scl.zip
data://meadow/faostat/2024-03-14/faostat_sdgb:
- snapshot://faostat/2024-03-14/faostat_sdgb.zip
data://meadow/faostat/2024-03-14/faostat_tcl:
- snapshot://faostat/2024-03-14/faostat_tcl.zip
data://meadow/faostat/2024-03-14/faostat_ti:
- snapshot://faostat/2024-03-14/faostat_ti.zip
#
# FAOSTAT garden steps for version 2024-03-14
#
data://garden/faostat/2024-03-14/faostat_cahd:
- data://meadow/faostat/2024-03-14/faostat_cahd
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_ei:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_ei
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_ek:
- data://meadow/faostat/2024-03-14/faostat_ek
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_emn:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://garden/wb/2024-03-11/income_groups
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://meadow/faostat/2024-03-14/faostat_emn
data://garden/faostat/2024-03-14/faostat_esb:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_esb
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_fa:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://meadow/faostat/2024-03-14/faostat_fa
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_fbsc:
- data://meadow/faostat/2024-03-14/faostat_fbsh
- data://meadow/faostat/2024-03-14/faostat_fbs
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_fo:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_fo
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_food_explorer:
- data://garden/faostat/2024-03-14/faostat_qcl
- data://garden/faostat/2024-03-14/faostat_fbsc
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_fs:
- data://meadow/faostat/2024-03-14/faostat_fs
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_ic:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://meadow/faostat/2024-03-14/faostat_ic
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_lc:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
- data://meadow/faostat/2024-03-14/faostat_lc
data://garden/faostat/2024-03-14/faostat_metadata:
- data://meadow/faostat/2024-03-14/faostat_rt
- data://meadow/faostat/2024-03-14/faostat_scl
- data://meadow/faostat/2024-03-14/faostat_sdgb
- data://meadow/faostat/2024-03-14/faostat_qv
- data://meadow/faostat/2024-03-14/faostat_emn
- data://meadow/faostat/2024-03-14/faostat_ek
- data://meadow/faostat/2024-03-14/faostat_qcl
- data://meadow/faostat/2024-03-14/faostat_fbsh
- data://meadow/faostat/2024-03-14/faostat_tcl
- data://meadow/faostat/2024-03-14/faostat_fa
- data://meadow/faostat/2024-03-14/faostat_fo
- data://meadow/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_fs
- data://meadow/faostat/2024-03-14/faostat_ei
- data://meadow/faostat/2024-03-14/faostat_rl
- data://meadow/faostat/2024-03-14/faostat_ic
- data://meadow/faostat/2024-03-14/faostat_qi
- data://meadow/faostat/2024-03-14/faostat_rfn
- data://meadow/faostat/2024-03-14/faostat_rfb
- data://meadow/faostat/2024-03-14/faostat_esb
- data://meadow/faostat/2024-03-14/faostat_lc
- data://meadow/faostat/2024-03-14/faostat_rp
- data://meadow/faostat/2024-03-14/faostat_cahd
- data://meadow/faostat/2024-03-14/faostat_fbs
- data://meadow/faostat/2024-03-14/faostat_ti
data://garden/faostat/2024-03-14/faostat_qcl:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://meadow/faostat/2024-03-14/faostat_qcl
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_qi:
- data://meadow/faostat/2024-03-14/faostat_qi
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_qv:
- data://meadow/faostat/2024-03-14/faostat_qv
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_rfb:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_rfb
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_rfn:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://meadow/faostat/2024-03-14/faostat_rfn
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_rl:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_rl
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_rp:
- data://meadow/faostat/2024-03-14/faostat_rp
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_rt:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_rt
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_scl:
- data://meadow/faostat/2024-03-14/faostat_scl
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://garden/wb/2024-03-11/income_groups
data://garden/faostat/2024-03-14/faostat_sdgb:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://meadow/faostat/2024-03-14/faostat_sdgb
- data://garden/wb/2024-03-11/income_groups
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
data://garden/faostat/2024-03-14/faostat_tcl:
- data://meadow/faostat/2024-03-14/faostat_tcl
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/wb/2024-03-11/income_groups
- data://garden/regions/2023-01-01/regions
data://garden/faostat/2024-03-14/faostat_ti:
- data://garden/faostat/2024-03-14/faostat_metadata
- data://grapher/demography/2023-03-31/population
- data://garden/regions/2023-01-01/regions
- data://meadow/faostat/2024-03-14/faostat_ti
- data://garden/wb/2024-03-11/income_groups
#
# FAOSTAT grapher steps for version 2024-03-14
#
data://grapher/faostat/2024-03-14/faostat_cahd:
- data://garden/faostat/2024-03-14/faostat_cahd
data://grapher/faostat/2024-03-14/faostat_ei:
- data://garden/faostat/2024-03-14/faostat_ei
data://grapher/faostat/2024-03-14/faostat_ek:
- data://garden/faostat/2024-03-14/faostat_ek
data://grapher/faostat/2024-03-14/faostat_emn:
- data://garden/faostat/2024-03-14/faostat_emn
data://grapher/faostat/2024-03-14/faostat_esb:
- data://garden/faostat/2024-03-14/faostat_esb
data://grapher/faostat/2024-03-14/faostat_fa:
- data://garden/faostat/2024-03-14/faostat_fa
data://grapher/faostat/2024-03-14/faostat_fbsc:
- data://garden/faostat/2024-03-14/faostat_fbsc
data://grapher/faostat/2024-03-14/faostat_fo:
- data://garden/faostat/2024-03-14/faostat_fo
data://grapher/faostat/2024-03-14/faostat_fs:
- data://garden/faostat/2024-03-14/faostat_fs
data://grapher/faostat/2024-03-14/faostat_ic:
- data://garden/faostat/2024-03-14/faostat_ic
data://grapher/faostat/2024-03-14/faostat_lc:
- data://garden/faostat/2024-03-14/faostat_lc
data://grapher/faostat/2024-03-14/faostat_qcl:
- data://garden/faostat/2024-03-14/faostat_qcl
data://grapher/faostat/2024-03-14/faostat_qi:
- data://garden/faostat/2024-03-14/faostat_qi
data://grapher/faostat/2024-03-14/faostat_qv:
- data://garden/faostat/2024-03-14/faostat_qv
data://grapher/faostat/2024-03-14/faostat_rfb:
- data://garden/faostat/2024-03-14/faostat_rfb
data://grapher/faostat/2024-03-14/faostat_rfn:
- data://garden/faostat/2024-03-14/faostat_rfn
data://grapher/faostat/2024-03-14/faostat_rl:
- data://garden/faostat/2024-03-14/faostat_rl
data://grapher/faostat/2024-03-14/faostat_rp:
- data://garden/faostat/2024-03-14/faostat_rp
data://grapher/faostat/2024-03-14/faostat_rt:
- data://garden/faostat/2024-03-14/faostat_rt
data://grapher/faostat/2024-03-14/faostat_scl:
- data://garden/faostat/2024-03-14/faostat_scl
data://grapher/faostat/2024-03-14/faostat_sdgb:
- data://garden/faostat/2024-03-14/faostat_sdgb
data://grapher/faostat/2024-03-14/faostat_tcl:
- data://garden/faostat/2024-03-14/faostat_tcl
data://grapher/faostat/2024-03-14/faostat_ti:
- data://garden/faostat/2024-03-14/faostat_ti
#
# FAOSTAT food explorer step
#
data://explorers/faostat/latest/food_explorer:
- data://garden/faostat/2024-03-14/faostat_food_explorer
#
# FAOSTAT garden step for additional variables
#
data://garden/faostat/2024-03-14/additional_variables:
- data://garden/faostat/2024-03-14/faostat_rl
- data://garden/faostat/2024-03-14/faostat_qi
- data://garden/faostat/2024-03-14/faostat_qcl
- data://garden/faostat/2024-03-14/faostat_sdgb
- data://garden/faostat/2024-03-14/faostat_fbsc
- data://garden/faostat/2024-03-14/faostat_rfn
#
# FAOSTAT grapher step for additional variables
#
data://grapher/faostat/2024-03-14/additional_variables:
- data://garden/faostat/2024-03-14/additional_variables
Loading
Loading