ScotGovAnalysis / opendatascot

An R package to pull data from statistics.gov.scot into R
https://scotgovanalysis.github.io/opendatascot/
MIT License
47 stars 6 forks source link

Handle errors #73

Closed thomascrines closed 5 years ago

lintr-bot commented 5 years ago

tests/testthat/test_ods_print_query.R:1:2: style: Commented code should be removed.

​#context("ods_print_query")
 ^~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:3:2: style: Commented code should be removed.

​#expected_return_value1 <- "PREFIX qb: <http://purl.org/linked-data/cube#>"
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:4:2: style: Commented code should be removed.

​#expected_return_value2 <- "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>"
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:5:2: style: Commented code should be removed.

​#expected_return_value3 <- "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>"
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:6:2: style: Commented code should be removed.

​#expected_return_value4 <- "select  \\?value where \\{ \\?data qb:dataSet <http://statistics\\.gov\\.scot/data/average-house-size>\\. \\?data  \\.  rdfs:label \\. \\?data  \\.  rdfs:label \\. \\?data \\?measureTypeURI \\?value\\. \\}"
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:7:2: style: Commented code should be removed.

​#expected_return_value5 <- "select  \\?value where \\{ \\?data qb:dataSet <http://statistics\\.gov\\.scot/data/average-house-size>\\. \\?data  \\.  rdfs:label \\. \\?data  \\.  rdfs:label \\. FILTER \\(\\?refPeriod >= '2017'\\^\\^xsd:date && \\?refPeriod <= '2018'\\^\\^xsd:date\\) \\?data \\?measureTypeURI \\?value\\. \\}"
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:9:2: style: Commented code should be removed.

​#printed_query <- ods_print_query("average-house-size")
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:15:4: style: Commented code should be removed.

​#  skip_on_cran()
   ^~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:16:4: style: Commented code should be removed.

​#  expect_match(printed_query, expected_return_value1)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:17:4: style: Commented code should be removed.

​#  expect_match(printed_query, expected_return_value2)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:18:4: style: Commented code should be removed.

​#  expect_match(printed_query, expected_return_value3)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:19:4: style: Commented code should be removed.

​#  expect_match(printed_query, expected_return_value4)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:23:4: style: Commented code should be removed.

​#  skip_on_cran()
   ^~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:24:4: style: Commented code should be removed.

​#  expect_match(printed_query_with_filter, expected_return_value1)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:25:4: style: Commented code should be removed.

​#  expect_match(printed_query_with_filter, expected_return_value2)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:26:4: style: Commented code should be removed.

​#  expect_match(printed_query_with_filter, expected_return_value3)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_ods_print_query.R:27:4: style: Commented code should be removed.

​#  expect_match(printed_query_with_filter, expected_return_value5)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
codecov-io commented 5 years ago

Codecov Report

Merging #73 into master will decrease coverage by 0.08%. The diff coverage is 91.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage   95.03%   94.94%   -0.09%     
==========================================
  Files           7        8       +1     
  Lines         161      198      +37     
==========================================
+ Hits          153      188      +35     
- Misses          8       10       +2
Impacted Files Coverage Δ
R/ods_dataset.R 92% <90.9%> (+7.38%) :arrow_up:
R/ods_error_message.R 92% <92%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3b87614...13e3e36. Read the comment docs.