Developer documentation

This is the documentation for 1.7.0 version, which is not the latest version. Consider upgrading to 3.4.0.

Read this if you want to contribute to RosaeNLG. Alternatively, as the author, this is my own personal doc when I forget how things work.

The repo

On Gitlab:

It is a multi package repo (lerna) which is a fork of Pug @2.0.3 (forked the 06/04/2018). 03/06/2019, @2.0.3 is still the official released version of Pug. 29/09/2019 @2.0.4 has been publshed.

  • rosaenlg is the main package. Derived from pug.

  • rosaenlg-pug-xxx are forks of the original pug-xxx packages:

    • Some of them are are unchanged, but I needed to fork them because they carry dependancies with changed packages: rosaenlg-pug-filters rosaenlg-pug-linker rosaenlg-pug-load

    • Some of them are changed to handle specific structures like synz > syn: rosaenlg-pug-lexer rosaenlg-pug-parser rosaenlg-pug-walk pug-code-gen

  • rosaenlg-yseop is an Yseop template generator for RosaeNLG templates, derived from rosaenlg-pug-code-gen (itself a fork of pug-code-gen).

  • and multiple packages that each contain a set of features

Pre instal

  • lerna: npm install -global lerna

  • yarn: npm install -global yarn

  • mocha: npm install --global mocha

Install

  • Linking: lerna bootstrap.

  • Build the linguistic resources and the typescript files: lerna run build.

  • Run the tests:

    • lerna run test

    • I also use npm test directly in packages/rosaenlg folder

    • and also mocha test-rosaenlg/unit.js _lang_fr_FR etc. to run a specific test

Linking a RosaeNLG project with the local copy of the repo

In your project: do not run npm install as it will download each RosaeNLG package. And do not use npm link.

  • just install the other dependancies: for instance npm install junit

  • make a symbolic link in your project to your local copy of RosaeNLG: mklink /D node_modules\rosaenlg c:\rosaenlg\rosaenlg\packages\rosaenlg

Publishing a new version

this doc is just for me

  • RosaeNLG:

    • check non regression on another project

    • check changelog.adoc

    • update target version in antora.yml

    • update ROSAENLG_VERSION in .gitlab-ci.yml

    • merge with master

    • local environment: lerna version --no-push --no-git-tag-version --exact patch (or minor etc. instead of patch)

    • commit

    • make a vXX.XX.XX branch (to be seen by the doc project + to publish)

    • push: git push origin master

    • also push branch: git push origin vXX.XX.XX

    • Gitlab CI should build

  • update sibling project rosaenlg-java

  • doc:

    • trigger the antora-ui project CI on gitlab

    • trigger the docs-site project CI on gitlab and check the result

    • trigger the antora-playbook CI on gitlab

      • and trigger manually the publication

  • remove old branches on Gitlab