Skip to content

Allow intermediate geographies#1

Merged
JoeJimFlood merged 8 commits intocamsys:allow_intermediate_geographiesfrom
nick-fournier:allow_intermediate_geographies
Apr 23, 2026
Merged

Allow intermediate geographies#1
JoeJimFlood merged 8 commits intocamsys:allow_intermediate_geographiesfrom
nick-fournier:allow_intermediate_geographies

Conversation

@nick-fournier
Copy link
Copy Markdown

Hey @JoeJimFlood I made some edits that should fix the test issues. Couldn't push to your repo so here's a PR to your PR :)

Data type consistency improvements:

  • Explicitly cast integer_weight columns to np.int64 in both the reshape_result and do_sequential_integerizing functions in populationsim/integerizing/wrappers.py to ensure consistent integer type handling. [1] [2]
  • In expand_households.py, modify the assignment of hh_ids to use .values instead of list() to preserve the int64 numpy array dtype for household IDs. (This was the real bugger)

Code cleanup:

  • Remove unused imports (numpy and pandas) from tests/test_intermediate_geography.py for cleaner test files.

@JoeJimFlood
Copy link
Copy Markdown
Collaborator

@nick-fournier Thanks for looking into this, but it looks like it's still failing with the same error that I was getting before where it isn't reading in the geographies from the correct settings file.
image

@nick-fournier
Copy link
Copy Markdown
Author

Hi @JoeJimFlood I was out on PTO last week, But I see this now and will pick this up.

@nick-fournier
Copy link
Copy Markdown
Author

@JoeJimFlood Okay I think I figured it out. I think its a transient pipeline cache issue when tests run in different order, so it was one of those "works on my machine". However, the travis CI seems to be stuck in a queue. Not sure if you're able to kick it off.

@nick-fournier
Copy link
Copy Markdown
Author

Okay the intermediate zone test passed but some others broke... 🥲

@nick-fournier nick-fournier force-pushed the allow_intermediate_geographies branch from 9371760 to 8e20cbf Compare April 23, 2026 20:44
@nick-fournier
Copy link
Copy Markdown
Author

nick-fournier commented Apr 23, 2026

Okay I found the issues.

  1. results can differ if on linux vs windows due to OR-tools compilation differences. So I pushed OS-specific test data
  2. The .travis.yaml is out of date, I was always using GitHub Actions workflows, not travis CI so I never bothered to look how it was setup and it was still using conda and other things we are no longer using.

Just working through those now, but I'm confident it should pass.

Note: We could/should probably just delete the .travis.yml and rely on github actions workflow, because that's what is being used upstream on the main repo, but if you guys are using it that's fine.

@JoeJimFlood
Copy link
Copy Markdown
Collaborator

It looks like the test was successful. Thanks for your help on this!

@JoeJimFlood JoeJimFlood merged commit 2c11788 into camsys:allow_intermediate_geographies Apr 23, 2026
1 check passed
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.

2 participants