Skip to content

Commit

Permalink
Update GH actions and vcr cassettes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Aug 4, 2024
1 parent 6084c31 commit 4ad38a2
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 31 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

permissions: read-all

Expand Down
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,19 @@ citation("nasapower")

## To cite package 'nasapower' in publications use:
##
## Sparks A (2024). _nasapower: NASA-POWER Data from R_.
## doi:10.5281/zenodo.1040727 <https://doi.org/10.5281/zenodo.1040727>,
## R package version 4.2.1,
## <https://CRAN.R-project.org/package=nasapower>.
##
## Sparks A (2018). "nasapower: A NASA POWER Global Meteorology, Surface
## Solar Energy and Climatology Data Client for R." _The Journal of Open
## Source Software_, *3*(30), 1035. doi:10.21105/joss.01035
## <https://doi.org/10.21105/joss.01035>.
##
## A BibTeX entry for LaTeX users is
##
## @Article{,
## author = {Adam H. Sparks},
## title = {nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R},
## doi = {10.21105/joss.01035},
## year = {2018},
## month = {oct},
## publisher = {The Open Journal},
## volume = {3},
## number = {30},
## pages = {1035},
## journal = {The Journal of Open Source Software},
## }
## To see these entries in BibTeX format, use 'print(<citation>,
## bibtex=TRUE)', 'toBibtex(.)', or set
## 'options(citation.bibtex.max=999)'.

## References

Expand Down
7 changes: 3 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# nasapower 4.2.0
# nasapower 4.2.1

## R CMD check results

### Checked under

* Windows - R Under development (unstable) (2024-01-29 r85841 ucrt) via Winbuilder
* Windows - R version 4.3.2 (2023-10-31) -- "Eye Holes" aarch64-apple-darwin20 (64-bit) via Winbuilder
* MacOS - R version 4.3.2 (2023-10-31) -- "Eye Holes" aarch64-apple-darwin20 (64-bit)
* Windows - R Under development (unstable) (2024-05-17 r86565 ucrt) via Winbuilder
* MacOS - R version 4.4.0 (2024-04-24) -- "Puppy Cup"

0 errors | 0 warnings | 1 note

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/adjusted_air_pressure.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&site-elevation=0&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"912","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:11 GMT","status":"HTTP/2 200 ","via":"1.1 e62a87f5c9a3d08f66598e0db6768fd4.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7RnHqKvHcErnA=","x-amz-cf-id":"Abv9FMy-s62MfJPOcAs7Or3In8radFQp-cwmqERnZ2nt8cyVULC2vg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"381e68a7-86af-4a8d-8d18-0195049f91e5","x-amzn-trace-id":"Root=1-65bb0c0a-6b26273533677f5a2aba02d0","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.297","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.016","x-process-time":"0.16","x-service-time":"1.474"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nPSC MERRA-2 Corrected Atmospheric Pressure (Adjusted For Site Elevation) (kPa) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,PSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,101.38\n"}},"recorded_at":"2024-02-01 03:12:11 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]}
{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&site-elevation=0&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.7.1 r-curl/5.2.1 crul/1.5.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"912","content-type":"text/csv","date":"Sun, 04 Aug 2024 04:31:12 GMT","status":"HTTP/2 200 ","via":"1.1 4ae3e3a5c48b45cacd83dbaeabcd3076.cloudfront.net (CloudFront), 1.1 4574c0224474f0e2381f9ad25426b186.cloudfront.net (CloudFront)","x-amz-apigw-id":"b92SWHIHvHcEbAA=","x-amz-cf-id":"Z7GEKlmIkDMMDxrDoftS7gTy2fA6-MXm04Lnzo7YQm6kCCizf9oVsA==","x-amz-cf-pop":["PER50-P1","PER50-P1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"98238f69-b30f-4206-a124-5bd980593a98","x-amzn-trace-id":"Root=1-66af040e-0efce35328c1c31b6593458d","x-app-name":"daily","x-app-version":"v2.5.9","x-archive-time":"1.567","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.011","x-process-time":"0.14","x-service-time":"1.719"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nPSC MERRA-2 Corrected Atmospheric Pressure (Adjusted For Site Elevation) (kPa) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,PSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,101.38\n"}},"recorded_at":"2024-08-04 04:31:12 GMT","recorded_with":"vcr/1.6.0, webmockr/1.0.0"}]}
2 changes: 1 addition & 1 deletion tests/fixtures/adjusted_wind_elevation.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&wind-elevation=300&wind-surface=vegtype_1&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"1024","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:13 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 d8af458c1f500953a862b2a5e3684978.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7R5Gj-vHcEDEQ=","x-amz-cf-id":"85KdegMXKmazC5mIXPQ1moL-5wVHMzbBGBd10vlbALC2NmrYz6AvSg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"890dbc12-d8c5-4992-8d88-aeff6565770e","x-amzn-trace-id":"Root=1-65bb0c0b-7bcdd356728207131e85e558","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.355","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.012","x-process-time":"0.17","x-service-time":"1.539"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nWSC MERRA-2 Corrected Wind Speed (Adjusted For Elevation) (m/s) \r\nMessage(s): \r\nCorrected Wind Speed has a custom surface implemented: 35-m broadleaf-evergreen trees (70% coverage) (vegtype_1) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,WSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,6.49\n"}},"recorded_at":"2024-02-01 03:12:13 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]}
{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&wind-elevation=300&wind-surface=vegtype_1&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.7.1 r-curl/5.2.1 crul/1.5.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"1024","content-type":"text/csv","date":"Sun, 04 Aug 2024 04:31:14 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 2deffda4b53adbb3d0691a446053c72a.cloudfront.net (CloudFront), 1.1 4574c0224474f0e2381f9ad25426b186.cloudfront.net (CloudFront)","x-amz-apigw-id":"b92SvG6hvHcEjOA=","x-amz-cf-id":"GhJs8AucmeRKtrz_ZzcoFMoEkBSudPs2jmTgSAKBvoqbxWGIT9h_eA==","x-amz-cf-pop":["PER50-P1","PER50-P1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"20a19a08-77bb-4308-9871-23f4e201d25e","x-amzn-trace-id":"Root=1-66af0411-7e6769057ebef41c1e03c482","x-app-name":"daily","x-app-version":"v2.5.9","x-archive-time":"1.199","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.007","x-process-time":"0.13","x-service-time":"1.338"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nWSC MERRA-2 Corrected Wind Speed (Adjusted For Elevation) (m/s) \r\nMessage(s): \r\nCorrected Wind Speed has a custom surface implemented: 35-m broadleaf-evergreen trees (70% coverage) (vegtype_1) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,WSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,6.49\n"}},"recorded_at":"2024-08-04 04:31:14 GMT","recorded_with":"vcr/1.6.0, webmockr/1.0.0"}]}
2 changes: 1 addition & 1 deletion tests/fixtures/climatology_ag_point.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/climatology/point?parameters=T2M&community=ag&longitude=-179.5&latitude=-89.5&format=csv&time-standard=LST&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Climatology_Climatology_2001_2020_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"663","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:23 GMT","status":"HTTP/2 200 ","via":"1.1 73c1be06ae71c031888969ad46c601b2.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7TFHfJvHcEFeA=","x-amz-cf-id":"NU5bnOiJ8WyHEsk77kRZOM6PyY4vSitjMqsEcFp5DBqS9nIe2L1GVQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"b2862d06-8eaa-4c35-8c22-220259de1d21","x-amzn-trace-id":"Root=1-65bb0c13-5138ded72351312b06f424f7","x-app-name":"climatology","x-app-version":"v2.5.8","x-archive-time":"3.468","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.013","x-process-time":"0.19","x-service-time":"3.672"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Climatology Climatologies \r\n20-year Meteorological and Solar Monthly & Annual Climatologies (January 2001 - December 2020) \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\n-END HEADER-\r\nPARAMETER,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC,ANN\nT2M,-29.16,-40.68,-52.56,-57.06,-57.9,-59.46,-62.02,-61.4,-60.25,-52.29,-38.76,-28.66,-50.04\n"}},"recorded_at":"2024-02-01 03:12:23 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]}
{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/climatology/point?parameters=T2M&community=ag&longitude=-179.5&latitude=-89.5&format=csv&time-standard=LST&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.7.1 r-curl/5.2.1 crul/1.5.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Climatology_Climatology_2001_2020_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"663","content-type":"text/csv","date":"Sun, 04 Aug 2024 04:31:22 GMT","status":"HTTP/2 200 ","via":"1.1 4ae3e3a5c48b45cacd83dbaeabcd3076.cloudfront.net (CloudFront), 1.1 4574c0224474f0e2381f9ad25426b186.cloudfront.net (CloudFront)","x-amz-apigw-id":"b92T4GhfvHcEU_A=","x-amz-cf-id":"WBzdlfjfpW2FccSGMo2wys4LLhqTJsi678EuZsY5IKvxm92LsDqqgw==","x-amz-cf-pop":["PER50-P1","PER50-P1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"00fc9a8f-ed84-408f-8cec-6654b02db6f2","x-amzn-trace-id":"Root=1-66af0418-2bd41ba6149774ac7062a6fc","x-app-name":"climatology","x-app-version":"v2.5.9","x-archive-time":"1.271","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.009","x-process-time":"0.14","x-service-time":"1.422"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Climatology Climatologies \r\n20-year Meteorological and Solar Monthly & Annual Climatologies (January 2001 - December 2020) \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\n-END HEADER-\r\nPARAMETER,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC,ANN\nT2M,-29.16,-40.68,-52.56,-57.06,-57.9,-59.46,-62.02,-61.4,-60.25,-52.29,-38.76,-28.66,-50.04\n"}},"recorded_at":"2024-08-04 04:31:22 GMT","recorded_with":"vcr/1.6.0, webmockr/1.0.0"}]}
Loading

0 comments on commit 4ad38a2

Please sign in to comment.