|
| 1 | +# Maintainer Guide |
| 2 | + |
| 3 | +## Updating the README in context of a Release |
| 4 | + |
| 5 | +Every release the following three pages should be checked and updated if needed: |
| 6 | + |
| 7 | +`docs/flux/flux-commands.md` -> for updating the list of Flux Commnads |
| 8 | +`docs/fix/Fix-User-Guide.md` -> for updating the glossary and the cookbook parts |
| 9 | +`docs/fix/Fix-functions.md` -> for updating the Fix Functions |
| 10 | + |
| 11 | +When updating the |
| 12 | + |
| 13 | +## how to change [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/master/docs/flux/flux-commands.md) |
| 14 | + |
| 15 | +The entries in [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/master/docs/flux/flux-commands.md) describe the usage of commands used by flux. |
| 16 | +The content for `flux-commands.md` is automatically generated by running the metafacture runner without arguments, the output needs to be copyied to [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/master/docs/flux/flux-commands.md) |
| 17 | + |
| 18 | + |
| 19 | +To add functions to this FLUX commands list one has to fill in the proper annotations in the correponding java classes. E.g. |
| 20 | + |
| 21 | +``` |
| 22 | +reset-object-batch |
| 23 | +------------------ |
| 24 | +- description: Resets the downstream modules every batch-size objects |
| 25 | +- options: batchsize (int) |
| 26 | +- signature: Object -> Object |
| 27 | +- java class: org.metafacture.flowcontrol.ObjectBatchResetter |
| 28 | +``` |
| 29 | + |
| 30 | +is generated by reading following annotations in [ObjectBatchResetter.java](https://github.com/metafacture/metafacture-core/blob/511b4af8b993c85a33d6a18322258a195684d133/metafacture-flowcontrol/src/main/java/org/metafacture/flowcontrol/ObjectBatchResetter.java): |
| 31 | + |
| 32 | +``` |
| 33 | +@Description("Resets the downstream modules every batch-size objects") |
| 34 | +@FluxCommand("reset-object-batch") |
| 35 | +@In(Object.class) |
| 36 | +@Out(Object.class) |
| 37 | +``` |
| 38 | + |
| 39 | +The description of "options" is produced from all "public setter-methods", in this case: |
| 40 | + |
| 41 | +``` |
| 42 | + public void setBatchSize(final int batchSize) { ... |
| 43 | +``` |
| 44 | + |
| 45 | +The option's name is produced by cutting away the "set" from the methods name, leaving "BatchSize" which is then lowercased. The parameter of this option is generated from the parameter type of the method - here an "int"eger. |
| 46 | + |
| 47 | +To add new example links to the playground or the metafacture runner or adjust existing links as well as the links to the JAVA code you have to update the flux example tsv: [`linksAndExamples.tsv`](https://github.com/metafacture/metafacture-documentation/blob/master/linksAndExamples.tsv). |
| 48 | + |
| 49 | +```tsv |
| 50 | +flux-commands code-link example |
| 51 | +add-preamble-epilogue https://github.com/metafacture/metafacture-core/blob/master/metafacture-formatting/src/main/java/org/metafacture/formatting/PreambleEpilogueAdder.java https://metafacture.org/playground/?example=add-preamble-epilogue |
| 52 | +``` |
| 53 | + |
| 54 | +First column is for the flux command, the second is for the code-link and the last is for a link to an example. |
| 55 | + |
| 56 | +## how to publish [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/master/docs/flux/flux-commands.md) |
| 57 | + |
| 58 | +If you have updated some of these annotations, say "description", and these changes are released, generate a new `flux-commands.md`. Adjustments can always be published before a release unless it refers to an unreleased feature. |
| 59 | + |
| 60 | +Steps: |
| 61 | + |
| 62 | +- Download the latest released runner: https://github.com/metafacture/metafacture-core/releases |
| 63 | +- Unzip the downloaded runner distribution. |
| 64 | +- Check out the metafacture-documentation repo. |
| 65 | +- Change into that directory. |
| 66 | +- Run the runner in the this directory without arguments:./metafacture-core/flux.sh (note that the links will only generated if the git repo metafacture-documentation is checked out and the file [`linksAndExamples.tsv`](https://github.com/metafacture/metafacture-documentation/blob/master/linksAndExamples.tsv) is accessible). |
| 67 | +- Copy the generated output to [docs/flux/flux-commands.md](https://github.com/metafacture/metafacture-documentation/blob/master/docs/flux/flux-commands.md), modify the documentation spefic arrangements (i.e. the header) and commit it to http://metafacture.github.io/metafacture-documentation/docs/flux/flux-commands.html. |
| 68 | + |
| 69 | +## how to publish the changes for the fix documentation |
| 70 | + |
| 71 | +Check the README of the released metafacture-core tag: e.g. https://github.com/metafacture/metafacture-core/blob/metafacture-core-8.0.1/README.md#functions-and-cookbook |
| 72 | + |
| 73 | +Copy the `Best practices and guidelines for working with Metafacture Fix` and `Glossary` section to the corresponding section in `docs/fix/Fix-User-Guide.md` and the `Functions` section to `docs/fix/Fix-functions.md`. Adjust whitespaces and links if needed. |
| 74 | + |
| 75 | +Commit the the changes and let it review before merging it to the master. The master of the documentation repo should always correpond with the status of current release and its features. Therefore only changes before a release that improve the documentation are allowed but none that refer to unreleased features. |
0 commit comments