FHIR Chat · ig.ini · IG creation

Stream: IG creation

Topic: ig.ini


view this post on Zulip Josh Mandel (Jul 08 2020 at 16:48):

https://wiki.hl7.org/IG_Publisher_Documentation doesn't mention an ig.ini format. Can someone point to the right place for learning about this? In the auto builder, we always pass in ig.json to the publisher via -ig ig.json argument. @Jens Villadsen updated the auto-build README a few months back to say that ig.ini was also supported, but I haven't done any work to make that happen; is there some magic @Grahame Grieve in the publisher that would accept an arg like -ig ig.json even if no such file exists, and somehow default to a .ini instead of the supplied .json?

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:07):

ig.ini is considerably trimmed now - it is documented inline
https://github.com/FHIR/sample-ig/blob/master/ig.ini

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:18):

@Josh Mandel how would this be best documented? A link to the sample ig.ini in the wiki?

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:19):

I would avoid duplicating documentation, hence the approach to document inline in the document itself

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:19):

Not just a sample, but also its content

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:20):

the content is just (AFAIK) the implementation guide resource and the template.

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:20):

Which then should be documented

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:20):

IMHO

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:21):

the code also indicates that there is an option to skip the terminology server, but the template handles that automatically.
(i think this is the code: https://github.com/HL7/fhir-ig-publisher/blob/2daaac0b48791d131924a0964394e43dd616ac9d/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java#L1510

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:21):

Agree it should be well documented. Isn't this enough?

##########################
### ig.ini parameters: ###
##########################

#   ig: the name of the implementation guide resource file.
# examples:
# ig = input/myig.xml
# ig = input/implementationguide-example2.xml

#   template: the IG template that will be used to create the implementation guide (normally be a package name, but can be a local folder).
#   base fhir template:
#template = fhir.base.template

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:22):

Yep, if it is stated here as well https://confluence.hl7.org/plugins/servlet/mobile?contentId=35718627#content/view/35718627

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:23):

yes, that is my point: I think the best is to point in the wiki to the file. This way we don't have to maintain documentation in 2 places

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:24):

That ought to do it, yes

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:33):

which makes me wonder ... why have that .ini file in the first place if its only two lines? if those parts fits into the json file, and the json files could be handled with the same sane defaults that are used when parsing the ini-file, it seems a bit gold plated to have two different formats for the same content

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:34):

@Lloyd McKenzie - what's your take on it?

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:35):

json file is old fashion

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:36):

in what sense?

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:40):

I meant it is the old way of doing things, because AFAIK it was deprecated some time ago - several of the attributes are now IG parameters, and the remaining ones are in the ig.ini.

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:41):

right ... ok ... so what about just having those as parameters to the ig publisher (the path to the IG resource and the template)?

view this post on Zulip Lloyd McKenzie (Jul 08 2020 at 17:42):

The name of the implementation guide varies. And depending on publishing framework, the location can vary too. The ini file provide a standard place for the CI build to look when it invokes the publisher

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:47):

isnt the name in the IG resource (or shouldn't it be)?

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:48):

my 2 cents are the following: whateever you can specify in the ig.ini should as well be possible to specify as command line parameter

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:48):

the name of the file that contains the ig

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:49):

that should be a configurable parameter provided as command line parameter

view this post on Zulip Jean Duteau (Jul 08 2020 at 17:50):

Jens Villadsen said:

my 2 cents are the following: whateever you can specify in the ig.ini should as well be possible to specify as command line parameter

That might be an option, but for the CI builds, we don't know what the command line parameters are, so the ig.ini provides a spot where the publisher can look and get that info. it makes it easy for us to set up CI builds for all of the various guides.

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:50):

Jens Villadsen said:

that should be a configurable parameter provided as command line parameter

or as a ini file so that people don't have to remember command line instruction

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:52):

this way the command line is always the same for a given ig, and we avoid command line parameters

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 17:54):

I was thinking this was a "nice to have" until I saw the impact it has : I have to run several IGs that I don't know much about, and I really don't want to look at file names, or remember command lines that may be different than the creator intended. I ust run the _genOnce which calls the ini. It saved me (and others) a good amount of time so far.

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:56):

I see - if I understand you correctly the ig.ini is basically a shorthand notation of the configuration of the CI / jenkins job that runs the CI pipeline

view this post on Zulip Jens Villadsen (Jul 08 2020 at 17:57):

that makes sense - now I'm just puzzled that it apparently hasn't been documented, and yet the pipeline works as intended using .ini files ;)

view this post on Zulip Josh Mandel (Jul 08 2020 at 19:09):

How does the pipeline work? Maybe @Grahame Grieve can shed light? In the auto-build pipeline I call the Publisher.jar with -ig ig.json (hard-coded into my invocation).

view this post on Zulip Grahame Grieve (Jul 08 2020 at 19:49):

there's special code for this circumstance, since you weren't responding to fix the ci-build when I needed it:

if (!f.exists() && mode == IGBuildMode.AUTOBUILD) {
      String s = Utilities.getDirectoryForFile(ig);
      f = new File(s == null ? System.getProperty("user.dir") : s);
    }

view this post on Zulip Grahame Grieve (Jul 08 2020 at 19:50):

ig.ini is supposed to contain precisely 2 values:

  • where to find the IG
  • which template to use - since this has to be loaded before reading the ig

And these should not and cannot be parameters on the command line since their value never varies

view this post on Zulip Grahame Grieve (Jul 08 2020 at 19:50):

Lloyd added a few more things but he promised to move them out

view this post on Zulip Josh Mandel (Jul 08 2020 at 20:57):

OK -- so is it fair to say we should document the .ini file with these two parameters at https://wiki.hl7.org/IG_Publisher_Documentation?

Re: auto-build, it's not clear whether/how I should update the code at this point. It seems like things are "working as expected"?

view this post on Zulip Josh Mandel (Jul 08 2020 at 20:58):

Does the logic you wrote above @Grahame Grieve support finding ig.ini only in the project root, or in other places too?

view this post on Zulip Josh Mandel (Jul 08 2020 at 20:58):

(I want to document this behavior in the README for the auto-builder.)

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:16):

the ig.ini must be in the root.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:17):

it would be a good idea to update the documentation, sure. Thanks

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:17):

you don't need to make any fix to the code

view this post on Zulip Jose Costa Teixeira (Jul 08 2020 at 21:28):

Josh Mandel said:

OK -- so is it fair to say we should document the .ini file with these two parameters at https://wiki.hl7.org/IG_Publisher_Documentation?

I'll try to do it tomorrow - but on the new wiki https://confluence.hl7.org/display/FHIR/IG+Publisher+Documentation

view this post on Zulip Josh Mandel (Jul 08 2020 at 21:55):

Perfect! If content from https://wiki.hl7.org/IG_Publisher_Documentation has been fully migrated, I'd suggest deleting the content from that page and just including a link, because it's actually kind of hard to spot the "see Confluence instead" sentence at the top, and there's a ton of presumably-no-longer-maintained content below.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 21:59):

that's a much wider issue I've been meaning to get on the #fmg agenda. google prefers the wiki over confluence and it's causing us operational issues

view this post on Zulip Lloyd McKenzie (Jul 08 2020 at 22:04):

I did move them out

view this post on Zulip Josh Mandel (Jul 09 2020 at 14:15):

I still see content, e.g.

image.png

view this post on Zulip Josh Mandel (Jul 09 2020 at 14:17):

Added this to #fmg > Agenda item so we keep track.

view this post on Zulip Lloyd McKenzie (Jul 09 2020 at 14:21):

Should be looking at Confluence, not wiki

view this post on Zulip Josh Mandel (Jul 09 2020 at 14:31):

I'm looking at the page Google sends me to ;-)

view this post on Zulip Jose Costa Teixeira (Jul 09 2020 at 14:37):

https://confluence.hl7.org/pages/viewpage.action?pageId=35718627#IGPublisherDocumentation-IGINIfile

view this post on Zulip Jose Costa Teixeira (Jul 09 2020 at 14:37):

this better?

view this post on Zulip Josh Mandel (Jul 09 2020 at 15:18):

Yes, that's great. Does it make sense to also update the examples in https://confluence.hl7.org/pages/viewpage.action?pageId=35718627#IGPublisherDocumentation-Runningincommandlinemode so they use ig.ini instead of ig.json (rather than the deprecated "control file" format?

view this post on Zulip Josh Mandel (Jul 09 2020 at 15:19):

And it'd be ideal to update the section title for https://confluence.hl7.org/pages/viewpage.action?pageId=35718627#IGPublisherDocumentation-Controlfile to indicate "(deprecated)".


Last updated: Apr 12 2022 at 19:14 UTC