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

Use dispatch instead of manual branching #90

Merged
merged 11 commits into from
Sep 24, 2024
Merged

Conversation

Tortar
Copy link
Contributor

@Tortar Tortar commented May 22, 2024

Hi @mastrof, how is it going? This is just to let you know about this new possibility in MixedStructTypes :-)

@mastrof
Copy link
Owner

mastrof commented May 22, 2024

Hey :) Microbes are keeping me busy in the lab, but I have a few projects going that will finally make good use of this library.

Yes I had a quick look at MixedStructTypes and adopted it immediately, great job!
I had actually used @dispatch initially but I think Julia was complaining during precompilation. Can't recall exactly, I think it was just a warning that it could not precompile the function. I did not look at the internals but I guess it's sort of expected if the macro tries to "rewrite" the function during package compilation. Everything was still working as expected ofc but I was on a bit of a rush and went for the least effort path, so just used branching instead to avoid the warning. If you load the library using the @dispatch-ed function I think you'll get the same warning. If not I'll check again

@Tortar
Copy link
Contributor Author

Tortar commented May 23, 2024

simulated microbes clearly require less work ahah.

I find this package rather interesting anyway, have you thought on making an announcement on discourse? Maybe someone will show up to help you, unfortunately I'm not a biology guy so I can't :D

Anyway, thanks for letting me know of the issue! Indeed I tried to dev this branch and it is as you say :(
Fortunately, I have some tricks under my belt to tackle this, so hopefully as soon as I find the time, this shoud be solved.

@Tortar
Copy link
Contributor Author

Tortar commented Jun 8, 2024

Hi @mastrof, I released a new renamed version of the package which also solved this issue, now it should work fine!

@Tortar
Copy link
Contributor Author

Tortar commented Jun 10, 2024

mmmh, not sure why is it failing, because everything works fine locally

@Tortar
Copy link
Contributor Author

Tortar commented Jun 10, 2024

Could you run the workflow again?

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 38.58%. Comparing base (0498af4) to head (a4dde09).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/microbe_step.jl 50.00% 1 Missing ⚠️
src/motility.jl 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   38.03%   38.58%   +0.54%     
==========================================
  Files          23       23              
  Lines         560      565       +5     
==========================================
+ Hits          213      218       +5     
  Misses        347      347              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mastrof mastrof merged commit ded80e0 into mastrof:main Sep 24, 2024
5 checks 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