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

Setting up testing for the repository #18

Merged
merged 11 commits into from
Aug 30, 2024
Merged

Setting up testing for the repository #18

merged 11 commits into from
Aug 30, 2024

Conversation

fnattino
Copy link
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
@fnattino fnattino requested a review from cforgaci August 28, 2024 07:09
Copy link
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.

tests/testthat/testdata/download_testdata.R Outdated Show resolved Hide resolved
tests/testthat/testdata/download_testdata.R Outdated Show resolved Hide resolved
R/preprocess.R Show resolved Hide resolved
@fnattino fnattino requested a review from cforgaci August 29, 2024 11:36
@fnattino fnattino merged commit edd1ad9 into main Aug 30, 2024
8 checks passed
@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