Skip to content

Setting up testing for the repository#18

Merged
fnattino merged 11 commits into
mainfrom
12-test_data-fn
Aug 30, 2024
Merged

Setting up testing for the repository#18
fnattino merged 11 commits into
mainfrom
12-test_data-fn

Conversation

@fnattino
Copy link
Copy Markdown
Contributor

@fnattino fnattino commented Aug 27, 2024

I think the repository should include enough data not to make queries to the Overpass API while running continuous integration. We should probably be storing the data in a form that is as close as possible to the way in which raw (OSM) data is provided, in order to test functionality of the cleaning steps. We should also consider storing cleaned data later on (e.g. cleaned street network), in order to test the functionalities of the steps that follows.

  • add test data to the repository for realistic testing (considering Bucharest, our study case for the moment).
  • include the script that downloads the data, in order to be able to update the test datasets in future.
  • tests running Overpass API queries should be skipped unless they are specifically flagged to run (EDIT: there is a nice testthat functionality which suppresses tests on CI: skip_on_ci ) - include example of a test that needs to be skipped.
  • all other tests should instead run using the testdata - include an example of this too.

Closes #12.

@fnattino fnattino self-assigned this Aug 27, 2024
@fnattino fnattino marked this pull request as ready for review August 28, 2024 07:06
Comment thread R/preprocess.R
@fnattino fnattino requested a review from cforgaci August 28, 2024 07:09
Copy link
Copy Markdown
Contributor

@cforgaci cforgaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I left a couple of comments on the use of functions.

Comment thread tests/testthat/testdata/download_testdata.R Outdated
Comment thread tests/testthat/testdata/download_testdata.R Outdated
Comment thread R/preprocess.R
@fnattino fnattino requested a review from cforgaci August 29, 2024 11:36
@fnattino fnattino merged commit edd1ad9 into main Aug 30, 2024
@fnattino fnattino deleted the 12-test_data-fn branch August 30, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package data for examples and tests

2 participants