question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI parameter -c causes overwrite of -p param

See original GitHub issue

What happened?

When running the following command:

./run_synthea -p 100 -c ./synthea.properties Groningen Groningen

I expected to get 100 patients as a result, but I only got one.

But when I removed my -c option I got the expected 100.

./run_synthea -p 100 Groningen Groningen

My custom config is the following:

exporter.ccda.export = false
exporter.fhir.export = true
exporter.fhir_stu3.export = false
exporter.fhir_dstu2.export = false

This is because when the -c option is used, it overwrites the population set from -p. I assume this should only be applied if -p is not set, or when generate.default_population is actually set in the config file

Line overwriting the -p value when -c is set:

https://github.com/synthetichealth/synthea/blob/d388c9943b037c2b2e5419f4323deba283e7672b/src/main/java/App.java#L126

Environment

- OS: WSL (Ubuntu 20.04)
- Java: (Through Docker) openjdk:8-slim

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hadleynetcommented, May 31, 2022

I think we always load the default config file (Config.java line 16) and the local config file overrides any specific properties in that file (App.java line 123).

1reaction
jawalonoskicommented, May 31, 2022

Also, since you only have four parameters in your custom file, I’m not sure what will happen to all the other parameters…

We never really intended for people to supply partial properties files.

I hope the code has sensible defaults for everything… 😬

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I override Git configuration options by command line ...
The value given will override values from configuration files. The <name> is expected in the same format as listed by git config (subkeys...
Read more >
Parameters are not overridden in Input Steps when running a ...
Issue. The parameters in a flow file could not be applied to the Input steps when using the command line to override ​the...
Read more >
C Programming: Command line arguments and files - YouTube
In this session we'll finish going over some of the more common string-handling functions. Then we'll introduce command line arguments using ...
Read more >
The kernel's command-line parameters
The command “modinfo -p ${modulename}” shows a current list of all parameters of a loadable module. Loadable modules, after being loaded into the...
Read more >
Warning Options (Using the GNU Compiler Collection (GCC))
Warn whenever a constant static variable is unused aside from its declaration. -Wunused-const-variable=1 is enabled by -Wunused-variable for C, but not for C++....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found