Nullify a global or a process already defined

1 view
Skip to first unread message

Mahdi Ben Jelloul

unread,
Oct 24, 2019, 8:35:20 AM10/24/19
to liam2-users
Hello fellow liam2 users,

I want to be able to use a model in a modified version.
So i import my baseline model and i want to deactivate globals and the processes that use them.
I need ot do that because the globals are loaded at the "liam2 import" step and since i do not use them in derived model i want to avoid loading them.
I also want to be able to do unit test on my model without loading data.
 
It tried adding things like:
global:
  -mytable: None

and it didn't work.

Any hint on how to do that or to achieve a similar goal ?

Thanks !

Mahdi Ben Jelloul

Gaëtan de Menten

unread,
Oct 25, 2019, 11:03:43 AM10/25/19
to liam2...@googlegroups.com

Hello Mahdi,

 

There is no way that I can see. It has always been a known limitation of the import system that you can only add to or modify "imported" stuff, but not remove them. But using None to delete some keys is certainly possibly. Now I almost answered yesterday that it would be easy to do so… But then I thought that I would just implement it as it would be a matter of maximum 10 minutes, right? Now, after passing all day on this (), I have a working (yet ugly) solution in my devel branch (https://github.com/liam2/liam2/tree/devel). Feel free to cherry pick the relevant commit.

 

Gaëtan

 

--
You received this message because you are subscribed to the Google Groups "liam2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liam2-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/liam2-users/CA%2BAkwSeppLDuEeeYv9yMG-v3XMhP5TDJ2s07LN4gi539yVzGGg%40mail.gmail.com.



Disclaimer: This e-mail may contain confidential information which is intended only for the use of the recipient(s) named above.
If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.
Please note that e-mail messages cannot be considered as official information from the Federal Planning Bureau.
Reply all
Reply to author
Forward
0 new messages