Pipeline
Install stack
See the official stack installation documentation.
Enter the repository
Clone and enter the project repository.
git clone https://github.com/objectionary/eo-phi-normalizer --recurse-submodules
cd eo-phi-normalizer
Install eo-phi-normalizer
Install eo-phi-normalizer.
export LC_ALL=C.UTF-8
stack install eo-phi-normalizer
Install dependencies
Install yq.
yq --version
yq (https://github.com/mikefarah/yq/) version v4.44.1
Install NodeJS.
node --version
v20.18.0
Install Java.
java --version
openjdk 21.0.5 2024-10-15 LTS
OpenJDK Runtime Environment Zulu21.38+21-CRaC-CA (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Zulu21.38+21-CRaC-CA (build 21.0.5+11-LTS, mixed mode, sharing)
Windows
Install Cygwin.
Make cygpath available on PATH.
Learn about the pipeline
Pipeline stages
The pipeline has several important stages:
- Rewrite original
EOprograms into filteredEOprograms, leaving only the specified top-level objects (tests). - Translate filtered
EOprograms to initialPHIprograms. - Translate initial
PHIprograms to initialEOprograms. - Test initial
EOprograms. - Normalize initial
PHIprograms and get normalizedPHIprograms. - Report metrics on initial
PHIprograms and normalizedPHIprograms (See Metrics). - Translate normalized
PHIprograms to normalizedEOprograms. - Test normalized
EOprograms.
Pipeline configuration
The pipeline is configured via the pipeline/config.yaml file.
The configuration file specifies the following:
report- Pipeline report configuration.js- Optional path to aJavaScriptfile that should be inlined into theHTMLreport.- If no path is specified,
eo-phi-normalizerwill use report/main.js.
- If no path is specified,
css- Optional path to aCSSfile that should be inlined into theHTMLreport.- If no path is specified,
eo-phi-normalizerwill use report/styles.css.
- If no path is specified,
output- Where to write report versions.html- The file path of theHTMLversion.json- The file path of theJSONversion.markdown- The file path of theGitHub Flavored Markdownversion.
expected-metrics-change- The expected relative change in metrics w.r.t the initial metrics.dataless- For dataless formations.applications- For applications.formations- For formations.dispatches- For dispatches.
expected-improved-programs-percentage- Expected percentage of programs where all metrics changed as expected.
test-sets- A list of configurations for sets of test objects (tests).eo- The configuration of theEOpart of the test set.original- The file path of the originalEOprogram.enable- A flag to enable tests in the originalEOprogram.include- A list of names of tests in the originalEOprogram that should be included into the filteredEOprogram.exclude- A list of names of tests in the originalEOprogram that shouldn't be included into the filteredEOprogram.filtered- The file path of the filtered originalEOprogram.yaml- The file path of the originalEOprogram in theYAMLformat.
phi- The configuration of thePHIpart of the test set.initial- The file path of the initialPHIprogram.normalized- The file path of the normalizedPHIprogram.bindings-path-initial- The path to tests via bindings in the initialPHIprogram.bindings-path-normalized- The path to tests via bindings in the normalizedPHIprogram.
atoms- The configuration of atoms in the test set. The set of enabled atoms is the difference of sets constructed from theenableanddisablelists.enable- The list of names of atoms to enable. An empty list is equivalent to a list of all known atoms.disable- The list of names of atoms to disable.
Run the pipeline script
bash ./scripts/pipeline.sh
Explore the pipeline directory
The script will run for several minutes and write the following entries to the pipeline directory:
eo-filtered- FilteredEOprograms.eo-initial- InitialEOprograms..eoc/4-pull/org/eolang-org.eolangobjects (link).
eo-normalized- NormalizedEOprograms.eo-yaml- FilteredEOprograms in theYAMLformat.logs- Logs of some pipeline stages.phi-initial- InitialPHIprograms..eoc/phi/org/eolang-org.eolangobjects translated toPHI.
phi-normalized- NormalizedPHIprograms.report- Pipeline reports.report.html- The report in theHTMLformat.report.json- The report in theJSONformat.report.md- The report in theGitHub Flavored Markdownformat.