Skip to content

Minor clean-up#17

Merged
kfrey-idm merged 9 commits intoEMOD-Hub:mainfrom
kfrey-idm:kfrey_cleanup01
Aug 26, 2025
Merged

Minor clean-up#17
kfrey-idm merged 9 commits intoEMOD-Hub:mainfrom
kfrey-idm:kfrey_cleanup01

Conversation

@kfrey-idm
Copy link
Member

  • Remove examples folder (was already removed in emod-api-old).
  • Update README for EMOD-Hub
  • Remove unused package dependencies

@kfrey-idm kfrey-idm self-assigned this Jul 19, 2025
Copy link
Collaborator

@Bridenbecker Bridenbecker left a comment

Choose a reason for hiding this comment

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

Wow! Thanks @kfrey-idm . I missed these things when I moved it emod-api-old over to EMOD-Hub. Thank you for fixing them.

The only thing I'm really concerned about is changing the packages that are installed and if emodpy, emodpy-malaria, or emodpy-hiv are expecting them to be already installed.


def test_set_mortality_distribution(self):
demog = Demographics.from_template_node()
self.config.parameters.Death_Rate_Dependence = "DISEASE_MORTALITY"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Technically, we should probably add an assert that verifies the current value and that the value is not the value we get after calling SetMortalityDistribution.

Copy link
Member Author

Choose a reason for hiding this comment

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

At that point the current value is the default value, which is also the value after calling SetMortalityDistribution.

This revision was about removing prodict which is an implementation that allows non-valid values (like "DISEASE_MORTALITY")

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eek. I don't like invalid values

"matplotlib",
"scipy",
"pandas",
"numpy",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why change numpy if we know that is a bad version for us?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an opportunity to simplify. Version 1.19.4 of NumPy is only supported in Python 3.6, 3.7, 3.8, and 3.9. All of those are past end-of-life except 3.9, which is end-of-life this October.

"parse",
"matplotlib"
]
"lz4"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need testing that the emodpy packages don't depend on emod-api installing some of these?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure. I tried a 'find' for usages of prodict, pyyaml, parse, and graphviz and didn't find any place they were used in emodpy, emodpy-hiv, or emodpy-malaria. Might have missed something, but I think they're just not used anymore.


emod-api can use Snappy [de]compression (python-snappy, actually) as necessary if it is installed
which requires libdev-snappy (Debian/Ubuntu) or snappy-devel (RedHat/CentOS) on Linux.
emod-api can use Snappy [de]compression (python-snappy) as necessary if it is installed which requires libdev-snappy (Debian/Ubuntu) or snappy-devel (RedHat/CentOS) on Linux.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this still true? Hmm. This is serialization related. I wonder if it belongs here or in emodpy-malaria.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, kind of. There's a place in serialization that checks if snappy is available:
https://github.com/EMOD-Hub/emod-api/blob/main/emod_api/serialization/dtkFileSupport.py#L6

It's not currently a dependency, so not installed by default.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm going to create a ticket in emodpy-malaria to make sure that snappy is installed by default. In EMOD, if the chunk to be serialized is greater than 0x7E000000, we use snappy for compression. Maybe there is an issue with snappy installation that I don't understand, but we should make sure it is handled well.

@mesokurtic
Copy link

@Bridenbecker, is there additional work that needs to be done on this PR?

@Bridenbecker
Copy link
Collaborator

No. It is fine. I probably thought it was done

@kfrey-idm kfrey-idm merged commit 48453cd into EMOD-Hub:main Aug 26, 2025
3 checks passed
@kfrey-idm kfrey-idm deleted the kfrey_cleanup01 branch August 26, 2025 23:32
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.

3 participants