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

2024-12-17 Custom DC stable release #4800

Merged
merged 31 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bad806d
Removed unused climate_trace, worldbank, and tech soup legacy custom …
dwnoble Dec 2, 2024
4f48263
Removed unused climate_trace, worldbank, and tech soup legacy custom …
dwnoble Dec 2, 2024
98ff7cf
Added child type fetching to dev place API. Improved fetching perform…
dwnoble Dec 4, 2024
a783648
Specify length of short hashes for custom DC image labels (#4767)
hqpho Dec 4, 2024
9bd5e1c
Add script for updating prod tag (#4768)
hqpho Dec 4, 2024
5545946
Reformat NodeJS failure email subject (#4770)
hqpho Dec 4, 2024
3bfa00a
Set up "cron" testing job in staging (#4769)
hqpho Dec 4, 2024
496dd7d
Minor tweaks (#4764)
gmechali Dec 5, 2024
bdef654
Dev place page UI (#4747)
dwnoble Dec 5, 2024
732f6da
Only show the Google Map widget on Place pages for places contained w…
gmechali Dec 6, 2024
1124975
Deflake map tool webdriver tests (#4776)
hqpho Dec 6, 2024
a38ca26
Added dev place page experiment setup (#4773)
dwnoble Dec 6, 2024
4aeefc3
Create script to generate topic cache from mcf. (#4775)
keyurva Dec 9, 2024
e5b9944
Added FAQ entry and updated several others (#4760)
kmoscoe Dec 9, 2024
093cd4e
Global header search (#4740)
nick-next Dec 9, 2024
665f47b
fixed multidict import path (#4778)
dwnoble Dec 9, 2024
480a56e
Improve "place in" box on dev place pages (#4774)
juliawu Dec 9, 2024
4342b8f
Fixed padding on dev place page (#4780)
dwnoble Dec 9, 2024
666e4aa
Filters out deprecated places from the fetch_places helper method. (#…
gmechali Dec 10, 2024
465e0ad
Tiny little fix to stop triggering on 'the '. (#4783)
gmechali Dec 11, 2024
7c4dc36
Remove India and Russia from place page experiment group (#4784)
juliawu Dec 11, 2024
dfe8688
Enable "explore in tool" on dev place pages (#4785)
juliawu Dec 11, 2024
1e5d1d2
Emotion and homepage updates (#4756)
nick-next Dec 11, 2024
0e30e41
Update pinned commits for submodules (#4788)
gmechali Dec 11, 2024
4459240
Home hero updates (#4790)
nick-next Dec 12, 2024
6bfa441
Topics to questions (#4791)
nick-next Dec 12, 2024
e6cef24
Fix python cloudbuild test (#4795)
chejennifer Dec 13, 2024
1202443
Place revamp - minor bug fixes (#4792)
gmechali Dec 13, 2024
97873c0
Fixed sanity test issue to account for homepage redesign (#4794)
dwnoble Dec 13, 2024
e074aba
Moving place revamp test to Base DC only. (#4797)
gmechali Dec 13, 2024
6883b9c
Keep the user's query in the NL search bar when landing on the place …
dwnoble Dec 13, 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
11 changes: 11 additions & 0 deletions build/ci/cloudbuild.py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,20 @@

# Run Python tests, lint, etc.
steps:
# Download the files needed for nl embeddings tests.
- id: download_nl_files
name: python:3.11.3
entrypoint: /bin/sh
args:
- -c
- |
cd tools/nl/download_nl_files
./run.sh

- id: flask_test
name: python:3.11.3
entrypoint: /bin/sh
waitFor: ["download_nl_files"]
args:
- -c
- |
Expand Down
66 changes: 0 additions & 66 deletions deploy/helm_charts/envs/climate_trace.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion deploy/helm_charts/envs/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ cronTesting:
enabled: true
screenshotDomain: "dev.datacommons.org"
nodePool: "default-pool"
schedule: "* * 31 2 *"
schedule: "* * 31 2 *" # invalid day for month -> never run automatically
6 changes: 6 additions & 0 deletions deploy/helm_charts/envs/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@ serviceGroups:

svg:
blocklistFile: ["dc/g/Uncategorized", "oecd/g/OECD"]

cronTesting:
enabled: true
screenshotDomain: "staging.datacommons.org"
nodePool: "default-pool"
schedule: "* * 31 2 *" # invalid day for month -> never run automatically
64 changes: 0 additions & 64 deletions deploy/helm_charts/envs/techsoup.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions deploy/helm_charts/envs/worldbank.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion mixer
Submodule mixer updated 98 files
+12 −12 deploy/storage/base_bigtable_info.yaml
+1 −1 deploy/storage/bigquery.version
+2 −2 internal/server/place/golden/get_related_locations/county.json
+0 −9 internal/server/recon/golden/recognize_entities/result.json
+0 −5 internal/server/recon/golden/resolve_coordinates/result.json
+22 −6 internal/server/spanner/datasource.go
+53,070 −0 internal/server/spanner/golden/query/get_observations_contained_in.json
+18 −4 internal/server/spanner/golden/query_test.go
+81 −0 internal/server/spanner/query.go
+2 −1 internal/server/stat/golden/get_stat_all/branch.json
+86 −0 internal/server/stat/golden/get_stat_all/result.json
+86 −0 internal/server/stat/golden/get_stat_date_within_place/USA_State.json
+20 −20 internal/server/statvar/golden/search_statvar/count_person.json
+0 −17 internal/server/v0/placestatvar/golden/get_place_stat_vars/alb.json
+0 −7 internal/server/v0/placestatvar/golden/get_place_stat_vars/california.json
+0 −11 internal/server/v0/placestatvar/golden/get_place_stat_vars/santa_clara.json
+1 −1 internal/server/v0/statpoint/golden/get_stat_value/umemployed.json
+1 −1 internal/server/v0/triple/golden/get_triples/limit1.json
+0 −14 internal/server/v0/triple/golden/get_triples/place.json
+405 −0 internal/server/v0/triple/golden/get_triples/place_type.json
+1 −981 internal/server/v1/event/golden/event_collection/EarthquakeEvent_CA_202001.json
+1 −36,473 internal/server/v1/event/golden/event_collection/EarthquakeEvent_Earth_202001.json
+1 −293 internal/server/v1/event/golden/event_collection/FireEvent_CA_202210.json
+1 −1,195 internal/server/v1/event/golden/event_collection_date/EarthquakeEvent_CA.json
+1 −1,414 internal/server/v1/event/golden/event_collection_date/EarthquakeEvent_Earth.json
+336 −5 internal/server/v1/info/golden/bulk_variable_info/bulk_bt_and_sql.json
+336 −5 internal/server/v1/info/golden/bulk_variable_info/bulk_result.json
+13 −4 internal/server/v1/info/golden/variable_group_info/demographics.json
+8 −0 internal/server/v1/info/golden/variable_group_info/demographics_gbr.json
+5 −5 internal/server/v1/info/golden/variable_group_info/root.json
+270 −0 internal/server/v1/observationdates/golden/observation_dates_linked/USA_State.json
+21 −0 internal/server/v1/observations/golden/bulk_point/all_2010.json
+25 −4 internal/server/v1/observations/golden/bulk_point/all_latest.json
+10 −4 internal/server/v1/observations/golden/bulk_point/preferred_latest.json
+260 −4 internal/server/v1/observations/golden/bulk_point_linked/all_Country.json
+51 −0 internal/server/v1/observations/golden/bulk_point_linked/all_FRA_AA2_2016.json
+261 −0 internal/server/v1/observations/golden/bulk_point_linked/all_US_State.json
+6 −0 internal/server/v1/observations/golden/bulk_point_linked/preferred_Country.json
+6 −0 internal/server/v1/observations/golden/bulk_point_linked/preferred_FRA_AA2_2016.json
+6 −0 internal/server/v1/observations/golden/bulk_point_linked/preferred_US_State.json
+438 −1 internal/server/v1/observations/golden/bulk_series/all_result.json
+9 −1 internal/server/v1/observations/golden/bulk_series/preferred_result.json
+1,676 −437 internal/server/v1/observations/golden/bulk_series_linked/all_FRA_AA2_2016.json
+0 −1 internal/server/v1/page/golden/place_page/asm.Crime.json
+0 −1 internal/server/v1/page/golden/place_page/asm.Demographics.json
+11 −7 internal/server/v1/page/golden/place_page/asm.Economics.json
+0 −1 internal/server/v1/page/golden/place_page/asm.Education.json
+0 −1 internal/server/v1/page/golden/place_page/asm.Energy.json
+0 −267 internal/server/v1/page/golden/place_page/asm.Environment.json
+0 −1 internal/server/v1/page/golden/place_page/asm.Equity.json
+4 −3 internal/server/v1/page/golden/place_page/asm.Health.json
+0 −1 internal/server/v1/page/golden/place_page/asm.Housing.json
+15 −9 internal/server/v1/page/golden/place_page/asm.Overview.json
+12 −5 internal/server/v1/page/golden/place_page/ca.Economics.json
+0 −124 internal/server/v1/page/golden/place_page/ca.Environment.json
+12 −5 internal/server/v1/page/golden/place_page/ca.Overview.json
+12 −6 internal/server/v1/page/golden/place_page/county.Overview.json
+1 −4,385 internal/server/v1/propertyvalues/golden/bulk_property_values_in/containedIn1.json
+1 −377 internal/server/v1/propertyvalues/golden/bulk_property_values_in/containedIn2.json
+253 −0 internal/server/v1/propertyvalues/golden/bulk_property_values_in/typeOf.json
+1 −4,001 internal/server/v1/propertyvalues/golden/property_values_in/containedIn1.json
+1 −377 internal/server/v1/propertyvalues/golden/property_values_in/containedIn2.json
+2 −4,008 internal/server/v1/triples/golden/bulk_triples_in/result1.json
+2 −4,008 internal/server/v1/triples/golden/bulk_triples_in/result2.json
+1 −4,009 internal/server/v1/triples/golden/triples_in/BiologicalSpecimen1.json
+1 −4,009 internal/server/v1/triples/golden/triples_in/BiologicalSpecimen2.json
+0 −14 internal/server/v1/variables/golden/bulk_variables/california.json
+0 −14 internal/server/v1/variables/golden/bulk_variables/california_and_santa_clara_union.json
+0 −17 internal/server/v1/variables/golden/variables/alb.json
+1 −981 internal/server/v2/event/golden/event_collection/EarthquakeEvent_CA_202001.json
+1 −36,473 internal/server/v2/event/golden/event_collection/EarthquakeEvent_Earth_202001.json
+1 −293 internal/server/v2/event/golden/event_collection/FireEvent_CA_202210.json
+1 −1,195 internal/server/v2/event/golden/event_collection_date/EarthquakeEvent_CA.json
+1 −1,414 internal/server/v2/event/golden/event_collection_date/EarthquakeEvent_Earth.json
+9 −0 internal/server/v2/facet/golden/contained_in_facet/IND_AA1.json
+9 −0 internal/server/v2/facet/golden/contained_in_facet/US_State.json
+9 −0 internal/server/v2/facet/golden/contained_in_facet/country.json
+18 −0 internal/server/v2/facet/golden/series_facet/series_facet.json
+87 −0 internal/server/v2/observation/golden/contained_in_2015/FRA_AA2.json
+1,761 −495 internal/server/v2/observation/golden/contained_in_all/FRA_AA2.json
+459 −3 internal/server/v2/observation/golden/contained_in_latest/Country.json
+42 −0 internal/server/v2/observation/golden/direct/2010.json
+42 −0 internal/server/v2/observation/golden/direct/2015.json
+451 −5 internal/server/v2/observation/golden/direct/all.json
+18 −0 internal/server/v2/observation/golden/direct/filter.json
+50 −8 internal/server/v2/observation/golden/direct/latest.json
+18 −0 internal/server/v2/observation/golden/direct/multi_filter.json
+1 −4,001 internal/server/v2/propertyvalues/golden/simple/containedIn1.json
+1 −377 internal/server/v2/propertyvalues/golden/simple/containedIn2.json
+2 −4,009 internal/server/v2/propertyvalues/golden/triple_in/result1.json
+2 −4,009 internal/server/v2/propertyvalues/golden/triple_in/result2.json
+12 −0 internal/server/v3/observation/golden/observation_test.go
+6,025 −0 internal/server/v3/observation/golden/observations_contained_in.json
+50 −0 scripts/update_prod_tag.sh
+7 −0 test/statvar_ranking/missing_Earth_country_rankings.json
+7 −0 test/statvar_ranking/missing_USA_city_rankings.json
+7 −0 test/statvar_ranking/missing_USA_county_rankings.json
+7 −0 test/statvar_ranking/missing_USA_state_rankings.json
34 changes: 34 additions & 0 deletions packages/client/src/data_commons_web_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import {
ApiNodePropvalOutResponse,
ObservationDatesApiResponse,
PlaceChartsApiResponse,
PointApiResponse,
RelatedPlacesApiResponse,
SeriesApiResponse,
} from "./data_commons_web_client_types";
import { parseWebsiteApiRoot, toURLSearchParams } from "./utils";
Expand Down Expand Up @@ -203,6 +205,38 @@ class DataCommonsWebClient {
const response = await fetch(url);
return (await response.json()) as ObservationDatesApiResponse;
}

/**
* Gets place charts for the given category
* Uses /api/dev-place/charts/<placeDcid> endpoint
* @param params.category [optional] place category
* @param params.placeDcid place dcid to fetch data for
*/
async getPlaceCharts(params: {
category?: string;
placeDcid: string;
}): Promise<PlaceChartsApiResponse> {
const url = `${this.apiRoot || ""}/api/dev-place/charts/${
params.placeDcid
}${params.category ? "?category=" + params.category : ""}`;
const response = await fetch(url);
return (await response.json()) as PlaceChartsApiResponse;
}

/**
* Gets related place info charts for the given place
* Uses /api/dev-place/related-places/<placeDcid> endpoint
* @param params.placeDcid place dcid to fetch data for
*/
async getRelatedPLaces(params: {
placeDcid: string;
}): Promise<RelatedPlacesApiResponse> {
const url = `${this.apiRoot || ""}/api/dev-place/related-places/${
params.placeDcid
}`;
const response = await fetch(url);
return (await response.json()) as RelatedPlacesApiResponse;
}
}

export { DataCommonsWebClient };
44 changes: 44 additions & 0 deletions packages/client/src/data_commons_web_client_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,47 @@ export type ObservationDatesApiResponse = {
};
};
};

type ChartType = "BAR" | "LINE" | "MAP" | "RANKING";
export interface Chart {
type: ChartType;
title: string;
category: string;
description: string;
statisticalVariableDcids: string[];
topicDcids: string[];
denominator?: string; // Optional
unit?: string; // Optional
scaling?: number; // Optional
}

export interface Place {
dcid: string;
name: string;
types: string[];
}

/**
* Website API response for /api/dev-place/charts/<place_dcid>
*/
export interface PlaceChartsApiResponse {
charts: Chart[];
childPlaceType: string;
childPlaces: Place[];
nearbyPlaces: Place[];
place: Place;
similarPlaces: Place[];
translatedCategoryStrings: Record<string, string>;
}

/**
* Website API response for /api/dev-place/related-places/<place_dcid>
*/
export interface RelatedPlacesApiResponse {
childPlaceType: string;
childPlaces: Place[];
nearbyPlaces: Place[];
place: Place;
similarPlaces: Place[];
parentPlaces: Place[];
}
16 changes: 15 additions & 1 deletion run_website_sanity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,22 @@ set -e

# DC Instance domain like: "dev.datacommons.org", "datacommons.org"
domain=$1
# Check if the domain is set
if [[ -z "$domain" ]]; then
echo "Error: Domain is not set."
echo "Usage: $0 <domain> [NO_PIP]"
echo "Example: $0 autopush.datacommons.org"
exit 1
fi

# Prepend https:// if no protocol is specified
if [[ ! "$domain" =~ ^http:// && ! "$domain" =~ ^https:// ]]; then
domain="https://$domain"
fi

echo "Domain: $domain"

# Set to true if you don't want to install the dependencies
NO_PIP=$2

export FLASK_ENV=webdriver
Expand All @@ -32,6 +46,6 @@ if [[ $NO_PIP != "true" ]]; then
fi

date_str=$(TZ="America/Los_Angeles" date +"%Y_%m_%d_%H_%M_%S")
python3 server/webdriver/tests/standalone/sanity.py --mode=home --url="https://$domain"
python3 server/webdriver/tests/standalone/sanity.py --mode=home --url="$domain"
gsutil cp ./output/*.csv gs://datcom-website-sanity/$domain/$date_str/
rm ./output/*.csv
8 changes: 4 additions & 4 deletions scripts/get_commits_label.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

# Optionally use the commit before HEAD for the main repo.
if [[ "$1" == "--head-is-temporary" ]]; then
website_rev="$(git rev-parse --short HEAD~1)"
website_rev="$(git rev-parse --short=7 HEAD~1)"
else
website_rev="$(git rev-parse --short HEAD)"
website_rev="$(git rev-parse --short=7 HEAD)"
fi
mixer_rev="$(git rev-parse --short HEAD:mixer)"
import_rev="$(git rev-parse --short HEAD:import)"
mixer_rev="$(git rev-parse --short=7 HEAD:mixer)"
import_rev="$(git rev-parse --short=7 HEAD:import)"
image_label="${website_rev}-${mixer_rev}-${import_rev}"

echo "$image_label"
Loading
Loading