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

Fix 3 data path imports in gis models #173

Closed
wants to merge 7 commits into from

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Aug 25, 2024

Fix the data path import errors in the geo_schelling, geo_schelling_points and geo_sir models.

The problem was that many models are called from different place, and might be imported or not. The os.path.dirname(os.path.abspath(__file__)) part gives the absolute path of the current file and then the directory it's in. From there we can robustly move to the location where the data is located, no matter if we're running locally or not.

Part of #172.

EwoutH and others added 6 commits August 25, 2024 16:10
Use relative imports in all models. This way models can be ran from different locations, which will help with testing them.
Co-Authored-By: rht <rhtbot@protonmail.com>
- Rename workflow
- Run on each push (which allows developing on test branches in this repo)
- Run only on changes to the example models, the test script or the CI config
- Allow multiple commits after each other (to allow continuous trial and error
@EwoutH EwoutH requested a review from rht August 25, 2024 15:51
@EwoutH EwoutH mentioned this pull request Aug 25, 2024
31 tasks
Fix the data path import errors in the geo_schelling, geo_schelling_points and geo_sir models.
@EwoutH EwoutH force-pushed the fix_gis_data_paths branch from 0c587f6 to 3060079 Compare August 25, 2024 16:17
@EwoutH
Copy link
Member Author

EwoutH commented Aug 25, 2024

Somehow I fucked up this branch, opening a new PR.

@EwoutH EwoutH closed this Aug 25, 2024
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.

1 participant