FHIR Chat · IG publication: registry & history · IG creation

Stream: IG creation

Topic: IG publication: registry & history


view this post on Zulip Bob Milius (Mar 03 2021 at 19:36):

In the Process for Publishing a FHIR IG documentation, it says to follow this process, you must have a local clones of a couple of repos

but they aren't referred to again in the documentation. Do they have to be in a particular place in the build? or used as parameters to the publisher? I recall seeing instructions in chat for adding a parameter for updating the registry
-registry [path to]/ig-registry/fhir-ig-list.json
but haven't seen anything re how the history template is used by the publisher.

I'm working to publish an organization specific IG (non-HL7). I managed to do it last summer with advice found here, but publisher has been updated since then and that workflow stopped working for me.

view this post on Zulip Grahame Grieve (Mar 03 2021 at 19:38):

they are referred to again.. search for e.g. {history}

view this post on Zulip Bob Milius (Mar 03 2021 at 19:42):

Yep!

  • if this is a new IG: copy the contents of {history} into {root}/{realm}/{code} (except for the readme.md file), and edit the name in index.html (replace 'XXXXXX')

Somehow I missed that. Thanks, Grahame, for the hint.

view this post on Zulip Jose Costa Teixeira (Mar 03 2021 at 19:55):

@ Bob Milius do you get to a point where the publish box says "this is the official publication"..?

view this post on Zulip Bob Milius (Mar 03 2021 at 21:00):

Jose Costa Teixeira said:

Bob Milius do you get to a point where the publish box says "this is the official publication"..?

Not today. I got that far a few months ago, but I haven't been able to reproduce that so far today.

view this post on Zulip Bob Milius (Mar 05 2021 at 02:51):

So, I'm still having issues trying to publish a non-HL7 IG with history and redirect php using the publisher. I was able to do this last summer with an earlier version of the publisher. With the latest version I was having an error msg that dist-hist and assets-hist could not be found. So after reading the new publication process (see above posts), I copied the history files into my website folder. Then I got a new error msg saying the source and destination are the same.

java.io.IOException: Source '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' and destination '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' are the same
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1351)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1246)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1215)
    at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.checkCopyFolderFromRoot(IGReleaseUpdater.java:261)
    at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.check(IGReleaseUpdater.java:216)
    at org.hl7.fhir.igtools.publisher.utils.IGWebSiteMaintainer.execute(IGWebSiteMaintainer.java:106)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8248)

    Source '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' and destination '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' are the same

After everything, a history.html file seems to be created correctly, but no redirection php scripts are created, and the banner continues to be Publication Build: This will be filled in by the publication tooling.

You can reproduce this with a simple process of creating a bare-bones IG starting with sushi --init. Here's the process I used.

  • create the IG using sushi -i
    • Name (Default: ExampleIG): MyIG
    • Id (Default: fhir.example): myig
    • Canonical (Default: http://example.org): http://example.org/myig
    • Status (Default: draft):
    • Version (Default: 0.1.0):
    • Initialize SUSHI project in /Users/bob/src/git-nmdp-ig/testig/MyIG? [y/n]: y
  • java -jar ../publisher.jar -ig ig.ini
  • java -jar ../publisher.jar -no-sushi -ig ig.ini -publish http://example.org/myig
  • mkdir website
  • cp -r output/* website
  • create website/publish.ini

website/publish.ini

  • create website/package-list.json

website/package-list.json

  • $ cp -r ../fhir-ig-history-template/*hist* website/
  • java -jar ../publisher.jar -publish-update -folder website -registry ../ig-registry/fhir-ig-list.json

Here's some output...

$ sushi --init
Name (Default: ExampleIG): MyIG
Id (Default: fhir.example): myig
Canonical (Default: http://example.org): http://example.org/myig
Status (Default: draft):
Version (Default: 0.1.0):
Initialize SUSHI project in /Users/bob/src/git-nmdp-ig/testig/MyIG? [y/n]: y

$ cd MyIG
$ java -jar ../publisher.jar -ig ig.ini
FHIR IG Publisher Version 1.1.62 (Git# 4ca9a9637bd7). Built 2021-03-04T05:52:57.202Z (19 hours old)
... blah, blah...
Errors: 0, Warnings: 2, Info: 0, Broken Links = 11 (00:44.0010)
Done. This IG has been built using the 'normal' process for local use. If building to host on an an external website, use the process documented [yet to be documented]]) (00:44.0013)

$ java -jar ../publisher.jar -ig ig.ini -publish http://example.org/myig
... blah, blah...
Errors: 0, Warnings: 2, Info: 0, Broken Links = 11 (00:31.0797)
Done                                                                             (00:31.0798)

$ mkdir website
$ cp -r output/* website/

# create website/package-list.json. Here's what I used
$ cat website/package-list.json
{
    "package-id": "myig",
    "title": "My Example FHIR Implementation Guide",
    "canonical": "http://example.org/myig",
    "introduction": "My Example FHIR Implementation Guide",
    "list": [
        {
            "version": "current",
            "date": "2021-03-01",
            "desc": "Draft",
            "path": "http://example.org/myig",
            "status": "trial-use",
            "sequence": "Trial Use: 1",
            "fhirversion": "4.0.1",
            "current": true
        }
    ],
    "category": "Research"
}

# create website/publish.ini. Here's what I used...
$ cat website/publish.ini
[website]
style=fhir.layout
server=apache
url=http://example.org/myig
org=bob
no-registry=1

[feeds]
package=package-feed.xml
publication=publication-feed.xml

#  copy the history files into website/
$ cp -r ../fhir-ig-history-template/*hist* website/

$ java -jar ../publisher.jar -publish-update -folder website -registry ../ig-registry/fhir-ig-list.json
Update the website at /Users/bob/src/git-nmdp-ig/testig/MyIG/website
The public URL is at http://example.org/myig
Update the public registry at ../ig-registry/fhir-ig-list.json
The server type is APACHE
looking for IGs in /Users/bob/src/git-nmdp-ig/testig/MyIG/website
found 1 IGs to update:
 - /Users/bob/src/git-nmdp-ig/testig/MyIG/website
Enter y to continue: y
Update /Users/bob/src/git-nmdp-ig/testig/MyIG/website for http://example.org/myig
java.io.IOException: Source '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' and destination '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' are the same
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1351)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1246)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1215)
    at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.checkCopyFolderFromRoot(IGReleaseUpdater.java:261)
    at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.check(IGReleaseUpdater.java:216)
    at org.hl7.fhir.igtools.publisher.utils.IGWebSiteMaintainer.execute(IGWebSiteMaintainer.java:106)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8248)

    Source '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' and destination '/Users/bob/src/git-nmdp-ig/testig/MyIG/website/dist-hist' are the same
====================
Processing Feeds for /Users/bob/src/git-nmdp-ig/testig/MyIG/website
Build Feed.
  rootFolder=/Users/bob/src/git-nmdp-ig/testig/MyIG/website
  packageFile=/Users/bob/src/git-nmdp-ig/testig/MyIG/website/package-feed.xml
  publicationFile=/Users/bob/src/git-nmdp-ig/testig/MyIG/website/publication-feed.xml
  orgName=bob
  thisUrl=http://example.org/myig/package-feed.xml
  rootUrl=http://example.org/myig
Load from /Users/bob/src/git-nmdp-ig/testig/MyIG/website/package-list.json
Save Package feed to /Users/bob/src/git-nmdp-ig/testig/MyIG/website/package-feed.xml
Save publication feed to /Users/bob/src/git-nmdp-ig/testig/MyIG/website/publication-feed.xml
Known status codes: []
Finished Processing Feeds
====================
myig (http://example.org/myig): My Example FHIR Implementation Guide @ http://example.org/myig
myig (http://example.org/myig): My Example FHIR Implementation Guide @ http://example.org/myig

image.png
image.png

view this post on Zulip Bob Milius (Mar 08 2021 at 15:35):

Bumping... Wondering if anyone has a workflow for publishing non-HL7 IGs ( not going to build.fhir.org) using the publisher? It used to work for me, but not with recent versions of publisher. @Grahame Grieve ?

view this post on Zulip Jens Villadsen (Mar 08 2021 at 16:18):

Like eg. https://github.com/hl7dk/dk-core/blob/going-fshing/.github/workflows/main.yml ?

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 16:23):

No, it's not that.

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 16:25):

that workflow runs the "normal" publication process, not the final publication that can be hosted on a web site (with all the redirects etc)

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 16:25):

the "final" publication has some more wizardry to it.

view this post on Zulip David Pyke (Mar 08 2021 at 18:07):

Care to point those wizardry steps?

view this post on Zulip Lynn Laakso (Mar 08 2021 at 18:15):

I don't publish to build.fhir.org (though I publish to hl7.org/fhir, but I follow https://confluence.hl7.org/display/FHIR/Process+for+Publishing+a+FHIR+IG.

view this post on Zulip Bob Milius (Mar 08 2021 at 18:27):

David Pyke said:

Care to point those wizardry steps?

Here's a thread that contains links to other threads about this. I got it to work last summer, but not with the recent changes to the Publisher.
https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/process.20for.20publishing.20revisited

view this post on Zulip Bob Milius (Mar 08 2021 at 18:36):

Last year I was able to publish our HLA Reporting IG for our organization here:
http://fhir.nmdp.org/ig/hla-reporting/
It does the php redirection and shows the history correctly. But I'm unable to reproduce the process using the newer publisher.

view this post on Zulip Jens Villadsen (Mar 08 2021 at 19:04):

If its not an HL7 IG, isnt' it then sufficient to do the steps at https://confluence.hl7.org/pages/viewpage.action?pageId=66930641#ProcessforPublishingaFHIRIG-LocalBuild:

run the IG publisher, clearing the terminology cache (run the publisher.jar -ig {clone} -resetTx -publish {url})
where {url} is the url that the guide will be published at (which is the path entered into the spreadsheet above}

view this post on Zulip Jens Villadsen (Mar 08 2021 at 19:05):

I have one hosted here: https://docs.ehealth.sundhed.dk/latest/ig/index.html

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 19:40):

@Jens Villadsen i am at the same point as @ Bob Milius . It worked, now it doesn't seem to run the full cycle.
I think your example does not go through the steps that activate the history page, the php redirects,...
For me the proof will be when I see again the publish box saying "This is the official publication of ......"
All of that comes (used to) by magic in the publisher.

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 19:43):

@David Pyke That is the point that Bob raises - we seem to be missing some of the magic words.
I'm happy to help with whatever documentation /scripring is useful, but I am missing something still.

view this post on Zulip Jens Villadsen (Mar 08 2021 at 19:46):

yep - I removed that box and don't use history - that's correct

view this post on Zulip Jens Villadsen (Mar 08 2021 at 19:47):

we put history outside the IG: https://docs.ehealth.sundhed.dk/ - that way - the IG is independent of previous locations and so on

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 20:01):

There's really powerful magic in the other way. I've seen it once and I'm chasing it since

view this post on Zulip Jose Costa Teixeira (Mar 08 2021 at 20:04):

Hence the wait for @Grahame Grieve's magic

view this post on Zulip Bob Milius (Mar 08 2021 at 20:05):

Jens Villadsen said:

we put history outside the IG: https://docs.ehealth.sundhed.dk/ - that way - the IG is independent of previous locations and so on

It looks like your IG also doesn't do the redirects. E.g.,
https://docs.ehealth.sundhed.dk/v1.0.0/ig/StructureDefinition-ehealth-patient.html says the the Official URL is
http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
but trying to go there fails.

view this post on Zulip Jens Villadsen (Mar 08 2021 at 21:25):

yep - that sounds correct

view this post on Zulip Jens Villadsen (Mar 08 2021 at 21:26):

Jose Costa Teixeira said:

Hence the wait for Grahame Grieve's magic

I agree

view this post on Zulip Bob Milius (Mar 14 2021 at 13:52):

After a lot of trial and error, I finally got a process to work for me! :tada:

To remind you, I am publishing organization-specific, non-HL7 IGs hosted by our own server. I had been having issues with the newer versions of the IG Publisher in creating the history page and redirect scripts. This process works for me with v1.1.63.

For me the key is to use the milestone url when running -publish. Previously, I had been using the canonical.
e.g.

$ java -jar ../publisher.jar -ig ig.ini -publish http://example.org/test-ig/0.1.0

There are still issues raised in the publisher, but the history file seems to build okay
and the php redirects are created for Apache.

Here's a short version of my process using sushi --init to create an example IG.

# make local clones of ig-registry and fhir-ig-history-template
$ git clone https://github.com/FHIR/ig-registry.git
$ git clone https://github.com/HL7/fhir-ig-history-template.git
$ sushi --init
# Name (Default: ExampleIG): TestIG
# Id (Default: fhir.example): test-ig
# Canonical (Default: http://example.org): http://example.org/test-ig
# Status (Default: draft):
# Version (Default: 0.1.0):
# Initialize SUSHI project in /Users/bob/src/fsh/TestIG? [y/n]: y

$ cd TestIG
$ java -jar ../publisher.jar -ig ig.ini
$ java -jar ../publisher.jar -no-sushi -ig ig.ini -publish http://example.org/test-ig/0.1.0
$ mkdir website
$ cp -r ../fhir-ig-history-template/* website/
# create/edit website/package-list.json; see below for what I used
# create website/publish.ini; see below
$ cp -r output/* website/
$ mkdir website/0.1.0
$ cp -r output/* website/0.1.0/
$ java -jar ../publisher.jar -publish-update -folder website -registry ../ig-registry/fhir-ig-list.json

# look to see if php redirects were created
$ find website -name "*php*" -print
website/StructureDefinition/MyPatient/index.php
website/0.1.0/StructureDefinition/MyPatient/index.php
website/0.1.0/ImplementationGuide/test-ig/index.php
website/ImplementationGuide/test-ig/index.php

website/publish.ini

website/package-list.json

@Jose Costa Teixeira

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:22):

Confirming this works, THANK YOU @ Bob Milius .

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:23):

I will thendocument this, how to publish an existing IG (many of my problems were inconsistencies between urls and ids, which don't exist with sushi --init.

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:23):

Also I was not using the package-list.json correctly

view this post on Zulip Bob Milius (Mar 14 2021 at 14:36):

Jose Costa Teixeira said:

it doesn't create the history page but I think I can take it from there

It creates the history page for me. I'd like to hear if you figure out why it didn't work for you.

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:42):

if you click on the directory of publisher versions
image.png

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:42):

does it get you anywhere?

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:43):

mine does not seem to touch the history pages

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 14:43):

where do you see the history page? in what file?

view this post on Zulip Bob Milius (Mar 14 2021 at 14:46):

hmm... that works for me. It resolves to http://example.org/test-ig/history.html. So I set up a local apache/php server on my laptop, and set example.org to localhost in my /etc/hosts file.

view this post on Zulip Bob Milius (Mar 14 2021 at 14:47):

do you see a history.html file in your website folder?

view this post on Zulip Bob Milius (Mar 14 2021 at 14:58):

If you just view website/index.html with your browser, and don't have a local web server, then you're right - it won't find the history file when you click on Directory of published versions. I installed apache & php on my laptop and copied the contents of website to where my local server finds it (in my case it's ~/Sites/test-ig), and here's my /etc/hosts file so it finds example.org.

##
# Host Database
#
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1        localhost
255.255.255.255 broadcasthost

127.0.0.1    example.org
::1         localhost

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:09):

I have no history.html on my website. Did I miss some step?

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:16):

i missed one step it seems

view this post on Zulip Bob Milius (Mar 14 2021 at 16:28):

After making a local copy of fhir-ig-history-template in the parent directory, copy the contents into website

$ cp -r ../fhir-ig-history-template/* website/

then proceed to create the website/publish.ini and website/package-list.json files.

view this post on Zulip Bob Milius (Mar 14 2021 at 16:29):

history.html is found there.

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:42):

yes, I did miss that step.

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:42):

thank you

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:43):

it gives an error though:

java.io.IOException: Source 'C:\ImplementationGuides\TestIG\website\dist-hist' and destination 'C:\ImplementationGuides\TestIG\website\dist-hist' are the same
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1351)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1246)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1215)
        at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.checkCopyFolderFromRoot(IGReleaseUpdater.java:261)
        at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.check(IGReleaseUpdater.java:216)
        at org.hl7.fhir.igtools.publisher.utils.IGWebSiteMaintainer.execute(IGWebSiteMaintainer.java:106)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8249)

    Source 'C:\ImplementationGuides\TestIG\website\dist-hist' and destination 'C:\ImplementationGuides\TestIG\website\dist-hist' are the same

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:44):

this kept me busy last year, but now I am ignoring it and it does what's needed.

view this post on Zulip Bob Milius (Mar 14 2021 at 16:47):

Yep, I get the same error. It still proceeds and the final output looks ok.

my session for the last step

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:52):

I hope we'll figure out what is needed to avoid that.

view this post on Zulip Jose Costa Teixeira (Mar 14 2021 at 16:53):

Meanwhile I'll get on to changing the history template (i.e. apply my template to the history page as well)

view this post on Zulip Bob Milius (Mar 16 2021 at 14:25):

Jose Costa Teixeira said:

Meanwhile I'll get on to changing the history template (i.e. apply my template to the history page as well)

I'd love to get any advice on best practices for changing the fhir-ig-history-template for my org. There's a bit more I need to learn about how it's applied and how I can modify it for a non-HL7 IG.

view this post on Zulip Jose Costa Teixeira (Mar 16 2021 at 15:24):

Do you have a template for your org?

view this post on Zulip Jose Costa Teixeira (Mar 16 2021 at 15:26):

There is a couple of things there that we may need to discuss with Grahame (i.e. that error we found) but I can confirm it can be done

view this post on Zulip Bob Milius (Mar 16 2021 at 16:02):

Jose Costa Teixeira said:

Do you have a template for your org?

I created a local template for our IG following the pattern you described, i.e., creating a local mytemplate folder containing the differences from the template it's dependent on (described in the mytemplate/package/package.json). But for the history page I'm copying the entire contents of fhir-ig-history-template into the website, and the -publish-update does some kind of magic. So I'm guessing I have to edit the original history template and not sure where I should change things, dist-hist? assets-hist? I notice after the -publish-update runs, the dist-hist directory disappears from website.

view this post on Zulip Jose Costa Teixeira (Mar 16 2021 at 16:07):

yes, those are the things we need to check with Grahame

view this post on Zulip Jose Costa Teixeira (Mar 16 2021 at 16:08):

I hope to have a "automated" way to copy the header and footer from the template to the history template, but in the meanwhile, you can do that:

view this post on Zulip Jose Costa Teixeira (Mar 16 2021 at 16:14):

here's an example: https://github.com/HL7/fhir-ig-history-template/compare/master...openhie:master

view this post on Zulip John Moehrke (Mar 17 2021 at 15:52):

did someone summarize the final steps that worked? I am starting this for two IGs, so don't want to re-learn

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:01):

The steps above do work for a newly created IG. I did not go through it yet for an existing IG. It should be the same, but the versions, package-list etc will perhaps need to be checked.

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:02):

I will be preparing this (perhaps over the weekend) for those instructions + the checks (e.g. make sure that there is an entry in the package-list that matches the canonical url... that sort of things)

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:02):

@John Moehrke meanwhile, are those IGs IHE IG's? I can help prepare the history template for IHE - it needs some things to be done.

view this post on Zulip John Moehrke (Mar 17 2021 at 16:06):

yes, FormatCode and MHD

view this post on Zulip David Pyke (Mar 17 2021 at 16:16):

A Simple doc explaining the changes needed would be very helpful

view this post on Zulip John Moehrke (Mar 17 2021 at 16:20):

I think I got thru it. my local copy does have the history file problem. I understand that will magjically clear up when the content is on a web server?

view this post on Zulip John Moehrke (Mar 17 2021 at 16:21):

I seem to have a history.html file, it is following IHE template (red)

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:28):

IHE template red?

view this post on Zulip John Moehrke (Mar 17 2021 at 16:28):

https://ihe.github.io/publications/fhir/ihe.formatcode.fhir/history.html

view this post on Zulip John Moehrke (Mar 17 2021 at 16:29):

https://ihe.github.io/publications/fhir/ihe.formatcode.fhir/index.html

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:29):

that looks like HL7 template red

view this post on Zulip John Moehrke (Mar 17 2021 at 16:29):

will this clear up when I move it to the formal web site?

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:29):

and something is missing

view this post on Zulip John Moehrke (Mar 17 2021 at 16:29):

yup, sorry that is what I meant to type

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:29):

image.png

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 16:29):

should be like this

view this post on Zulip John Moehrke (Mar 17 2021 at 16:31):

it shows that way in my filesystem, but not on github.io

view this post on Zulip John Moehrke (Mar 17 2021 at 16:57):

so I seem to have missed something. My status bar shows "Publication Build: This will be filled in by the publication tooling"

view this post on Zulip John Moehrke (Mar 17 2021 at 17:00):

so it does seem to have something useful in the subdirectory, but not the root... I must not have understood something

view this post on Zulip John Moehrke (Mar 17 2021 at 17:01):

https://profiles.ihe.net/fhir/ihe.formatcode.fhir/0.2.4/index.html

view this post on Zulip John Moehrke (Mar 17 2021 at 17:01):

vs https://profiles.ihe.net/fhir/ihe.formatcode.fhir/index.html

view this post on Zulip John Moehrke (Mar 17 2021 at 17:02):

and history is not working

view this post on Zulip Jose Costa Teixeira (Mar 17 2021 at 17:25):

That is taken care of by the publisher, if it is well fed.
I'm preparing a presentation for the next hours, after that I expect to document / script these steps. I've spent so many hours no this that I hope to find the issue quickly.

view this post on Zulip John Moehrke (Mar 17 2021 at 18:15):

@ Bob Milius I don't have the php files. your last step is to look for them, I don't find them.

view this post on Zulip John Moehrke (Mar 17 2021 at 18:16):

I have transcribed what I understand is the process into a wiki page on the IHE github where we will correct it until it works.. and then wait for it to break again next week.
https://github.com/IHE/supplement-template/wiki/IG-build-for-Publication

view this post on Zulip John Moehrke (Mar 17 2021 at 18:16):

is the copy of the output to the website and also the website/0.1.0 correct?
I ask, because my 0.1.0 has a status bar with useful text, and the one in website has tbd

view this post on Zulip John Moehrke (Mar 18 2021 at 14:28):

has anyone else tried to build a from the IG builder for publication on somewhere other than HL7? I think I am close, but the history is not working given the pseudocde @ Bob Milius offered.

view this post on Zulip John Moehrke (Mar 18 2021 at 14:28):

@Grahame Grieve ?

view this post on Zulip Bob Milius (Mar 18 2021 at 14:35):

John Moehrke said:

Bob Milius I don't have the php files. your last step is to look for them, I don't find them.

For php, you need to set the server type to apache in website/publish.ini. Here's what I used in this example:

[website]
style=fhir.layout
server=apache
url=http://example.org/test-ig
org=Testing
no-registry=1

[feeds]
package=package-feed.xml
publication=publication-feed.xml

and then in the last step you should see output indicating the redirections are being created, e.g.,

...
IG resource ImplementationGuide-test-ig.xml: no Jurisdiction. Using null
.. 2 redirections (2 created/updated)
/Users/bob/src/fsh/TestIG/website: This page is part of the TestIG (v0.1.0: Trial Use 1) based on <a href="http://hl7.org/fhir/R4">FHIR R4</a>. This is the current published version. For a full list of available versions, see the <a href="http://example.org/test-ig/history.html">Directory of published versions <img src="external.png" style="text-align: baseline"></a>
.. 11 files checked, 11 updated
.. 14 clones checked, 14 updated
IG resource ImplementationGuide-test-ig.xml: no Jurisdiction. Using null
.. 2 redirections (2 created/updated)
...

hope this helps.

view this post on Zulip Bob Milius (Mar 18 2021 at 14:41):

John Moehrke said:

I have transcribed what I understand is the process into a wiki page on the IHE github where we will correct it until it works.. and then wait for it to break again next week.
https://github.com/IHE/supplement-template/wiki/IG-build-for-Publication

Can you put in the example you're using for the package-list.json file?

view this post on Zulip Jose Costa Teixeira (Mar 18 2021 at 14:49):

...or we can wait for debug AND instructions which I hope to prepare tomorrow or during the weekend.

view this post on Zulip Bob Milius (Mar 18 2021 at 14:53):

Another place to check is to make sure the version in your ImplementationGuide-[name].json matches the version in your website/package-list.json.

view this post on Zulip John Moehrke (Mar 18 2021 at 15:01):

@ Bob Milius here is my IG github with the publish.ini and package-list.json I used https://github.com/IHE/FormatCode

view this post on Zulip John Moehrke (Mar 18 2021 at 15:02):

a question that I am unclear on is... why do I need to copy my current build into both website and also website/1.2.3 ? I find that the website/1.2.3 does look different, so I am guessing the build fixes some things.

view this post on Zulip Bob Milius (Mar 18 2021 at 15:21):

Try adding "current" : true to the entry for version 0.2.4 in your package-list.json
As I understand it, the website/1.2.3 is the permanent home. The top-level website/ is the current release. You should have two entries for current. One for the ci-build, and one for the the latest release. At least that works for me.

view this post on Zulip Bob Milius (Mar 18 2021 at 15:28):

for example,

{
    "package-id": "bobig",
    "title": "BobIG",
    "canonical": "http://example.org/bobig",
    "introduction": "This is Bob's Implementation Guide",
    "category": "Research",
    "list": [
        {
            "version": "current",
            "desc": "Continuous Integration Build (latest in version control)",
            "path": "http://build.example.org/bobig",
            "status": "ci-build",
            "current": true
        },
        {
            "version": "0.2.0",
            "date": "2021-03-13",
            "desc": "Bob's IG",
            "path": "http://example.org/bobig/0.2.0",
            "status": "trial-use",
            "fhirversion": "4.0.1",
            "sequence": "Trial Use 1",
            "current": true
        }
    ]
}

results in this...
image.png

view this post on Zulip John Moehrke (Mar 18 2021 at 15:39):

does package-list.json go into both website and also website/1.2.3?

view this post on Zulip Bob Milius (Mar 18 2021 at 15:44):

no, just website

view this post on Zulip John Moehrke (Mar 18 2021 at 15:45):

that did not seem to solve it.

view this post on Zulip John Moehrke (Mar 18 2021 at 15:46):

I think I must have done something wrong on the final publisher magjic.

view this post on Zulip John Moehrke (Mar 18 2021 at 15:46):

oh, I likely need to re-run that

view this post on Zulip John Moehrke (Mar 18 2021 at 15:48):

I do get an error on that

  .. 0 redirections (0 created/updated)
java.io.IOException: Source 'C:\Users\john.moehrke\Git\FormatCode\website\dist-hist' and destination 'C:\Users\john.moehrke\Git\FormatCode\website\dist-hist' are the same
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1351)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1246)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1215)
        at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.checkCopyFolderFromRoot(IGReleaseUpdater.java:261)
        at org.hl7.fhir.igtools.publisher.utils.IGReleaseUpdater.check(IGReleaseUpdater.java:216)
        at org.hl7.fhir.igtools.publisher.utils.IGWebSiteMaintainer.execute(IGWebSiteMaintainer.java:106)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8249)

 ```

view this post on Zulip Bob Milius (Mar 18 2021 at 15:49):

yep, I get that too. Does it complete?

view this post on Zulip John Moehrke (Mar 18 2021 at 15:49):

I guess, yes

view this post on Zulip John Moehrke (Mar 18 2021 at 15:50):

no php files in the website folder

view this post on Zulip John Moehrke (Mar 18 2021 at 15:51):

I do seem to have a history.html that renders okay in the browser on my filesystem

view this post on Zulip John Moehrke (Mar 18 2021 at 15:51):

I will try to update the actual web-site and see what happens

view this post on Zulip Bob Milius (Mar 18 2021 at 15:56):

Did you look in the subfolders? I was missing that initially.

$ find website -name "*.php" -print
website/StructureDefinition/MyPatient/index.php
website/ImplementationGuide/bobig/index.php
website/0.2.0/StructureDefinition/MyPatient/index.php
website/0.2.0/ImplementationGuide/bobig/index.php

view this post on Zulip John Moehrke (Mar 18 2021 at 15:57):

I looked recursively in my filesystem website folder and find no *.php files anywhere

view this post on Zulip John Moehrke (Mar 18 2021 at 16:01):

I just noticed I must not have copied recursively the fhir-ig-history-template... working on that now

view this post on Zulip Bob Milius (Mar 18 2021 at 16:03):

fyi, the fhir-ig-history-template will overwrite your package-list.json file (learned from experience).

view this post on Zulip John Moehrke (Mar 18 2021 at 16:08):

right. one more time

view this post on Zulip John Moehrke (Mar 18 2021 at 16:13):

so, no luck.

view this post on Zulip John Moehrke (Mar 18 2021 at 16:15):

history.html displays fine out of my filesystem, but not on the actual web server

view this post on Zulip John Moehrke (Mar 18 2021 at 16:15):

what bothers me more is the status bar being
Publication Build: This will be filled in by the publication tooling

view this post on Zulip John Moehrke (Mar 18 2021 at 16:16):

yet the one in the 0.2.4 folder has the right status

view this post on Zulip John Moehrke (Mar 18 2021 at 16:18):

that might be a hint... as the 0.2.4 status line points at a very different URL for the history.html

view this post on Zulip John Moehrke (Mar 18 2021 at 16:18):

it is pointing at
https://profiles.ihe.net/fhir/ihe.formatcode.fhir/ImplementationGuide/ihe.formatcode.fhir/history.html

view this post on Zulip John Moehrke (Mar 18 2021 at 16:19):

ah, my canonical in my package-list.json is messed up

view this post on Zulip John Moehrke (Mar 18 2021 at 16:27):

it is messed up in my ig xml.. guess I am starting over

view this post on Zulip John Moehrke (Mar 18 2021 at 16:46):

was I stupid to assume that the second build with the -publish parameter could be done line this with _genonce?
_genonce -publish http://example.org/test-ig/0.1.0

view this post on Zulip John Moehrke (Mar 18 2021 at 16:58):

I got the status bar fixed. but that fix didn't seem to fix the history

view this post on Zulip Bob Milius (Mar 18 2021 at 16:59):

John Moehrke said:

was I stupid to assume that the second build with the -publish parameter could be done line this with _genonce?
_genonce -publish http://example.org/test-ig/0.1.0

If you change the version or anything else in the ImplementationGuide-[name].json file then I think you need to rebuild the output. But if not, then I think that's right. But lately I haven't been using the script, but just explicitly invoke the publisher, e.g., for the publish part,

java -jar ../publisher.jar -ig ig.ini -publish http://example.org/test-ig/0.1.0

view this post on Zulip John Moehrke (Mar 18 2021 at 17:28):

note I do now have php files. so fixing my canonical url in the package-list helped. All these things called canonical url are so confusing. this one in the package-list seems to be the publication root

view this post on Zulip John Moehrke (Mar 18 2021 at 18:13):

dist-hist is empty again. i know I coped over the template

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 15:21):

so, the whole thing is quite sensitive to the urls, the ids, the package ids, versions... but I think it can be automated.

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 15:21):

I am working on instructions and scripting for that.

view this post on Zulip John Moehrke (Mar 19 2021 at 17:24):

I am not looking for more automation, automation eventually breaks and then only the one that wrote the automation can fix it. I would rather have a procedure that is clear

view this post on Zulip John Moehrke (Mar 19 2021 at 17:26):

so it could be filename case issues... that would explain why it works on my windows system, but not on the github.io or profiles.ihe.net web site

view this post on Zulip John Moehrke (Mar 19 2021 at 17:30):

I also looked for an accidential '\' used where a '/' should have been

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 21:54):

Accidents will happen, there's too many things that can go wrong, feeedback will not be clear, which is why I really want this to be facilitated by a tool.

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 21:55):

@John Moehrke Where is your IG?

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 21:56):

I'm done fighting with documentation today.
Note to self: no markdown after dinner.

view this post on Zulip John Moehrke (Mar 19 2021 at 21:57):

I sent the details on private message.

view this post on Zulip John Moehrke (Mar 19 2021 at 21:57):

No markdowns before breakfast either.

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 22:02):

the critical point to me is the few parameters that this has:

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 22:03):

the implementationguide, the package-list, the command lines and the folder names have to coincide

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 22:07):

if {ig_id} = ImplementationGuide.id,

  • ig.url has to be in the form {base}/{ig_id}/ImplementationGuide/{ig_id}
  • {canonical} = {base}/{ig_id}

view this post on Zulip Jose Costa Teixeira (Mar 19 2021 at 22:08):

i'll try to make a script for this to run on windows

view this post on Zulip Lloyd McKenzie (Mar 19 2021 at 22:41):

Can a hear a "no markdown between breakfast and dinner either"? ;)

view this post on Zulip Richard Townley-O'Neill (Mar 23 2021 at 00:12):

So only markdown while eating :D

view this post on Zulip Jose Costa Teixeira (Mar 23 2021 at 08:39):

I was complaining about markdown, but that was only until I had to do Confluence...

view this post on Zulip John Moehrke (Mar 23 2021 at 12:26):

you could use old-style wiki if you want. That is still in use in IHE.

view this post on Zulip John Moehrke (Mar 23 2021 at 12:28):

wiki and markdown both require a relaxed state of mind. but alternating between is sure to kill that relaxed state of mind.

view this post on Zulip Jose Costa Teixeira (Mar 24 2021 at 11:00):

I hope to get to this later today, but it's here
https://confluence.hl7.org/pages/viewpage.action?pageId=104580055

view this post on Zulip Jose Costa Teixeira (Mar 24 2021 at 11:00):

only step3 missing

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 20:25):

Step 3 done.

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 20:26):

Because I'm lazy and forgetful (and life's short), there is a small script that runs the entire thing here:
https://github.com/hl7-be/fhir-ig-release-publication

view this post on Zulip Jens Villadsen (Mar 25 2021 at 20:26):

watch all you paths ... they are windows-ish

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 20:28):

right (well, just changed them)

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 20:29):

The copy commands are windows' xcopy - feel free to replace by the appropriate *nix on your system (or better, update the documentation)

view this post on Zulip John Moehrke (Mar 27 2021 at 15:58):

Kudos to @Jose Costa Teixeira for finding the problem. The history.html file is created with an assumption that the javascript files should come from a http://hl7.org url. The problem I had was that I am publishing on a different web site, and using https... Thus one can't load javascript from another site. So we just edited the history.html to pull these .js files from the local directory (or local server), and it WORKS!!!! This is a hack for now

view this post on Zulip Grahame Grieve (Apr 16 2021 at 06:53):

ok, I will get to this over this weekend - it seems like a long time since I had time plan what I was going to do

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 08:25):

I made a few changes to the history template. One of them was this change, the other one wasto make it use other templates

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 08:27):

This gave me some ideas

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 08:27):

here's an example of what I did

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 08:27):

https://github.com/HL7/fhir-ig-history-template/compare/master...IHE:master

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 08:31):

  1. the header change would be best to be from the IG's template

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 08:40):

  1. to publish a new release, I think the procedure can be mostlyautomated if we have a small file which serves as a token for the parameters that are needed

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 09:03):

I actually made a simple script to automate all that, the token file was just this:

{
    "ig": "test-ig",
    "version": "0.1.0",
    "status": "trial-use",
    "date": "2021-03-13",
    "desc": "Test IG",
    "sequence": "Trial Use 1"
}

view this post on Zulip Jose Costa Teixeira (Apr 16 2021 at 09:06):

the script does something simple:

  1. check that the IG is ok, that the parameters (ig id, package id, etc) are in order
  2. run all things to prepare publication
  3. create / update the package-list with the new information in the release token json
  4. run the final step
  5. copy the assets folder to the assets-hist folder to keep the history page consistent with the rest of the IG

view this post on Zulip John Moehrke (Jun 18 2021 at 14:46):

After a formal release, what is the right changes one should make to their github repo to represent ci-build again? I am unclear on what the version in the IG should say, and what the package-list.json should say

view this post on Zulip Grahame Grieve (Jun 18 2021 at 21:52):

it should go back to 'ci-build' and the other doesn't matter

view this post on Zulip Jose Costa Teixeira (Oct 09 2021 at 21:25):

I have question about a parameter in the publisher :
https://github.com/HL7/fhir-ig-publisher/blob/1a2777964c79e71a4c541672b6eb0ea0681c952c/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/utils/IGWebSiteMaintainer.java#L91
What is the parameter -filtersupposed to be for?
I was trying to bypass the Enter y to continueso I think by putting some filter I can do that, but I have no idea what to put in the filter

view this post on Zulip Jose Costa Teixeira (Oct 10 2021 at 07:18):

@Grahame Grieve ?

view this post on Zulip Grahame Grieve (Oct 11 2021 at 01:20):

I don't know what's going on there.

view this post on Zulip Grahame Grieve (Oct 11 2021 at 01:21):

you're using it in some build process? I can't recall why I added it in the first place

view this post on Zulip Jose Costa Teixeira (Oct 11 2021 at 04:58):

Well, in fact I just want to bypass the prompt.
I have a script that takes an IG and a JSON file with the needed data (I'll probably rework this file later) and this JSON file is a token for the user's authorization to produce a release

view this post on Zulip Jose Costa Teixeira (Oct 11 2021 at 05:00):

I saw that the prompt will always be there unless the filter parameter is not empty. When I put some value there, the script does run but the IG is no longer processed

view this post on Zulip Jose Costa Teixeira (Oct 11 2021 at 05:01):

And indeed this is for adding to a build process - I have it in an external python now but perhaps it may be integrated later into the java code.


Last updated: Apr 12 2022 at 19:14 UTC