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

Adds build_paramDict #26

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Adds build_paramDict #26

wants to merge 13 commits into from

Conversation

dinskid
Copy link
Collaborator

@dinskid dinskid commented Jun 18, 2020

Creates a named tuple instead of OrderedDict(). It can be buggy, cos it used REs and a lot of string manipulation from the source code. But to my understanding, it works

@vollmersj
Copy link
Owner

It is quite involved approach there must be better way of doing this.

@ChrisRackauckas
Copy link
Collaborator

Why is there any string parsing here? I don't get the purpose of this.

@ChrisRackauckas
Copy link
Collaborator

Are you trying to take an OrderedDict and convert it to a NamedTuple?

@dinskid
Copy link
Collaborator Author

dinskid commented Jun 19, 2020

I want to get the functionality of the inspect module from python, more specifically, the getfullargspec() function. I couldn't find an equivalent one in Julia. I've made a post as well here https://discourse.julialang.org/t/function-parameter-speculation-in-runtime/41523, but I wasn't able to get an answer. So I had to do this to get it working

@codecov-commenter
Copy link

Codecov Report

Merging #26 into master will decrease coverage by 0.26%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #26      +/-   ##
=========================================
- Coverage    8.81%   8.55%   -0.27%     
=========================================
  Files           5       6       +1     
  Lines        1372    1414      +42     
=========================================
  Hits          121     121              
- Misses       1251    1293      +42     
Impacted Files Coverage Δ
src/diseaseProg.jl 61.41% <0.00%> (ø)
src/diseaseProg_withCallableStructs.jl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55bf964...5d62eb3. Read the comment docs.

@dinskid
Copy link
Collaborator Author

dinskid commented Jun 28, 2020

Changed it to a callable struct now. Only issue with this is to call a function, one must write ()(args); the first set of () for creating an instance of the struct. Is this way better? @vollmersj @ChrisRackauckas

@dinskid
Copy link
Collaborator Author

dinskid commented Jun 30, 2020

Converted all the functions!

@dinskid
Copy link
Collaborator Author

dinskid commented Jun 30, 2020

I've converted the functions in the highlevel to callable structs as well and have made the nested whenever possible(when a function uses another, I've made it a member of the parent-for a hierarchical structure). As of now, the solveSystem puts out the solution, but I am not able to get the solveSystem working with the speedup made by @ChrisRackauckas, as it errors out.

If @ChrisRackauckas or @vollmersj can help me out with this, it will be great. (Note: I've commented out the part that optimises the model)

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.

4 participants