Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

479 mismatch of names of the binary and package #494

Merged
merged 7 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
shell: bash
env:
PIPELINE_LOCK_CHANGED: ${{ (steps.check-pipeline-lock.outputs.PIPELINE_LOCK_CHANGED == 'true') || (steps.pipeline-files.outputs.cache-hit != 'true') }}
NORMALIZER_INSTALLED: "true"
EO_PHI_NORMALIZER_INSTALLED: "true"
run: ./scripts/pipeline.sh

- name: Check failing tests
Expand Down Expand Up @@ -233,12 +233,12 @@ jobs:
source scripts/lib.sh
commit_and_push_if_changed "$PIPELINE_LOCK_FILE_RELATIVE" "$PIPELINE_LOCK_FILE_RELATIVE"

- name: Commit and push changes in normalizer data files
- name: Commit and push changes in eo-phi-normalizer data files
if: always() && env.branch_is_not_master && runner.os == 'Linux'
run: |
source scripts/lib.sh
data_directory="$PIPELINE_NORMALIZER_DATA_DIR"
commit_and_push_if_changed "$data_directory" "normalizer data files"
data_directory="$PIPELINE_EO_PHI_NORMALIZER_DATA_DIR"
commit_and_push_if_changed "$data_directory" "eo-phi-normalizer data files"

- name: Install mdsh
if: env.branch_is_not_master && runner.os == 'Linux'
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Normalizer for 𝜑-calculus

[![`eo-phi-normalizer` on Hackage](https://img.shields.io/hackage/v/eo-phi-normalizer)](http://hackage.haskell.org/package/eo-phi-normalizer)
[![Haddock](<https://shields.io/badge/Haddock%20(master)-Code%20documentation-informational>)](https://www.objectionary.com/normalizer/haddock/)
[![Haddock](<https://shields.io/badge/Haddock%20(master)-Code%20documentation-informational>)](https://www.objectionary.com/eo-phi-normalizer/haddock/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.txt)
[![Hits-of-Code](https://hitsofcode.com/github/objectionary/normalizer?branch=master&label=Hits-of-Code)](https://hitsofcode.com/github/objectionary/normalizer/view?branch=master&label=Hits-of-Code)
![Lines of code](https://sloc.xyz/github/objectionary/normalizer)
[![Hits-of-Code](https://hitsofcode.com/github/objectionary/eo-phi-normalizer?branch=master&label=Hits-of-Code)](https://hitsofcode.com/github/objectionary/eo-phi-normalizer/view?branch=master&label=Hits-of-Code)
![Lines of code](https://sloc.xyz/github/objectionary/eo-phi-normalizer)

Command line normalizer of 𝜑-calculus expressions (as produced by the [EO compiler](https://github.com/objectionary/eo)).

Consult the [project documentation](https://www.objectionary.com/normalizer/) for more details.
Consult the [project documentation](https://www.objectionary.com/eo-phi-normalizer/) for more details.
168 changes: 84 additions & 84 deletions eo-phi-normalizer/CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions eo-phi-normalizer/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# eo-phi-normalizer

[![`rzk` on Hackage](https://img.shields.io/hackage/v/eo-phi-normalizer)](http://hackage.haskell.org/package/eo-phi-normalizer)
[![Haddock](<https://shields.io/badge/Haddock%20(master)-Code%20documentation-informational>)](https://www.objectionary.com/normalizer/haddock/)
[![Haddock](<https://shields.io/badge/Haddock%20(master)-Code%20documentation-informational>)](https://www.objectionary.com/eo-phi-normalizer/haddock/)

Command line normalizer of 𝜑-calculus expressions (as produced by the [EO compiler](https://github.com/objectionary/eo)).

See <https://github.com/objectionary/normalizer#readme>.
See <https://github.com/objectionary/eo-phi-normalizer#readme>.
2 changes: 1 addition & 1 deletion eo-phi-normalizer/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ main =
#else
False
#endif
-- See the details on the command form in https://github.com/objectionary/normalizer/issues/347#issuecomment-2117097070
-- See the details on the command form in https://github.com/objectionary/eo-phi-normalizer/issues/347#issuecomment-2117097070
command = intercalate "; " $
[ "set -ex" ] <>
[ "chcp.com" | isWindows ] <>
Expand Down
2 changes: 1 addition & 1 deletion eo-phi-normalizer/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ commandParserInfo =
CommandParserInfo'Pipeline
{ report = info (CLI'Pipeline'Report' <$> commandParser.pipeline'.report) (progDesc "Generate reports about initial and normalized PHI programs.")
, prepareTests = info (CLI'Pipeline'PrepareTests' <$> commandParser.pipeline'.prepareTests) (progDesc "Prepare EO test files for the pipeline.")
, printDataizeConfigs = info (CLI'Pipeline'PrintDataizeConfigs' <$> commandParser.pipeline'.printDataizeConfigs) (progDesc [fmt|Print configs for the `normalizer {commandNames.dataize}` command.|])
, printDataizeConfigs = info (CLI'Pipeline'PrintDataizeConfigs' <$> commandParser.pipeline'.printDataizeConfigs) (progDesc [fmt|Print configs for the `{commandNames.dataize}` command.|])
}
, test = info (CLI'Test' <$> commandParser.test) (progDesc "Run unit tests in given files with user-defined rules.")
}
Expand Down
2 changes: 1 addition & 1 deletion eo-phi-normalizer/eo-phi-normalizer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ library
, yaml
default-language: Haskell2010

executable normalizer
executable eo-phi-normalizer
main-is: Main.hs
other-modules:
Paths_eo_phi_normalizer
Expand Down
2 changes: 1 addition & 1 deletion eo-phi-normalizer/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ library:
- Language.EO.Phi.Rules.Syntax.Skel

executables:
normalizer:
eo-phi-normalizer:
main: Main.hs
source-dirs: app
ghc-options:
Expand Down
14 changes: 7 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@
${lib.concatMapStringsSep "\n" (x: "mdsh -i site/docs/src/${x} --work_dir .") [
"common/celsius.md"
"normalizer.md"
"eo-phi-normalizer.md"
"pipeline.md"
"quick-start.md"
"normalizer/dataize.md"
"normalizer/metrics.md"
"normalizer/transform.md"
"normalizer/print-rules.md"
"normalizer/test.md"
"eo-phi-normalizer/dataize.md"
"eo-phi-normalizer/metrics.md"
"eo-phi-normalizer/transform.md"
"eo-phi-normalizer/print-rules.md"
"eo-phi-normalizer/test.md"
"contributing.md"
]}
Expand Down Expand Up @@ -278,7 +278,7 @@
prefix = "nix run .#";
packages = {
inherit (self'.packages) pipeline update-markdown site-dev site-build;
normalizer = self'.packages.default;
eo-phi-normalizer = self'.packages.default;
};
}
];
Expand Down
8 changes: 1 addition & 7 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ cradle:
component: "eo-phi-normalizer:lib"

- path: "eo-phi-normalizer/app/Main.hs"
component: "eo-phi-normalizer:exe:normalizer"

- path: "eo-phi-normalizer/app/Paths_eo_phi_normalizer.hs"
component: "eo-phi-normalizer:exe:normalize-phi"

- path: "eo-phi-normalizer/app/Paths_eo_phi_normalizer.hs"
component: "eo-phi-normalizer:exe:normalize-phi"
component: "eo-phi-normalizer:exe:eo-phi-normalizer"

- path: "eo-phi-normalizer/test"
component: "eo-phi-normalizer:test:spec"
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "eo-phi-normalizer",
"devDependencies": {
"eolang": "^0.21.0",
"prettier": "^3.2.5"
Expand Down
4 changes: 2 additions & 2 deletions proposals/000-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| author(s) | date-accepted | pr-url | implemented |
| ------------------ | ------------------------------------- | ----------------------------------------------- | -------------------------------------------------------- |
| [Full author names] | [Date when the proposal was accepted] | [URL of a PR where this proposal was discussed] | [normalizer version where this proposal was implemented] |
| [Full author names] | [Date when the proposal was accepted] | [URL of a PR where this proposal was discussed] | [eo-phi-normalizer version where this proposal was implemented] |

## Motivation

Expand All @@ -25,7 +25,7 @@ Strive for a complete definition.
Your specification may include,

- LBNF grammar and semantics of any new syntactic constructs (see [LBNF reference](https://bnfc.readthedocs.io/en/latest/lbnf.html)).
- how the proposed change interacts with existing normalizer features, in case that is otherwise ambiguous
- how the proposed change interacts with existing eo-phi-normalizer features, in case that is otherwise ambiguous

Strive for _precision_.

Expand Down
22 changes: 11 additions & 11 deletions proposals/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Proposals

A proposal is a document describing a proposed change to the normalizer.
A proposal is a document describing a proposed change to the Normalizer.

## Proposal format

Expand All @@ -14,15 +14,15 @@ A proposal is a document describing a proposed change to the normalizer.

## Proposal process

1. [No label] An author submits a proposal for discussion as a pull request against the `normalizer` repository ([link](https://github.com/objectionary/normalizer)).
1. [[proposal under review](https://github.com/objectionary/normalizer/labels/proposal%20under%20review)] The `normalizer` team discusses the proposal in the commit section of the pull request, while the author refines the proposal. This phase lasts as long as necessary.
1. Eventually, the normalizer team does one of these actions:
1. Rejects the proposal [[proposal rejected](https://github.com/objectionary/normalizer/labels/proposal%20rejected)].
1. Passes the proposal back to the author(s) for review [[proposal needs revision](https://github.com/objectionary/normalizer/labels/Proposal%20needs%20revision)].
1. [No label] An author submits a proposal for discussion as a pull request against the ([repository](https://github.com/objectionary/eo-phi-normalizer)).
1. [[proposal under review](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20under%20review)] The Normalizer team discusses the proposal in the commit section of the pull request, while the author refines the proposal. This phase lasts as long as necessary.
1. Eventually, the Normalizer team does one of these actions:
1. Rejects the proposal [[proposal rejected](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20rejected)].
1. Passes the proposal back to the author(s) for review [[proposal needs revision](https://github.com/objectionary/eo-phi-normalizer/labels/Proposal%20needs%20revision)].
1. Accepts the proposal.
- [[proposal accepted](https://github.com/objectionary/normalizer/labels/proposal%20accepted)]
- [[proposal accepted](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20accepted)]
- Proposal priority - one of these labels:
- [[proposal priority: high](https://github.com/objectionary/normalizer/labels/proposal%20priority%3A%20high)]
- [[proposal priority: medium](https://github.com/objectionary/normalizer/labels/proposal%20priority%3A%20medium)]
- [[proposal priority: low](https://github.com/objectionary/normalizer/labels/proposal%20priority%3A%20low)]
1. [[proposal implemented](https://github.com/objectionary/normalizer/labels/proposal%20implemented)] Once a proposal is accepted, it still has to be implemented. The author(s) may do that, or someone else. We mark the proposal implemented once it hits normalizer master branch (and we are happy to be nudged to do so by email, GitHub issue, or a comment on the relevant pull request), and the corresponding documentation on the site is updated.
- [[proposal priority: high](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20priority%3A%20high)]
- [[proposal priority: medium](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20priority%3A%20medium)]
- [[proposal priority: low](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20priority%3A%20low)]
1. [[proposal implemented](https://github.com/objectionary/eo-phi-normalizer/labels/proposal%20implemented)] Once a proposal is accepted, it still has to be implemented. The author(s) may do that, or someone else. We mark the proposal implemented once it hits the `master` branch (and we are happy to be nudged to do so by email, GitHub issue, or a comment on the relevant pull request), and the corresponding documentation on the site is updated.
26 changes: 13 additions & 13 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ PIPELINE_EO_FILTERED_DIR="$PIPELINE_DIR/eo-filtered"
PIPELINE_EO_INITIAL_DIR="$PIPELINE_DIR/eo-initial"
PIPELINE_EO_NORMALIZED_DIR="$PIPELINE_DIR/eo-normalized"
PIPELINE_PHI_NORMALIZED_DIR="$PIPELINE_DIR/phi-normalized"
PIPELINE_NORMALIZER_DIR="$PWD/eo-phi-normalizer"
PIPELINE_NORMALIZER_DATA_DIR="$PIPELINE_NORMALIZER_DIR/data"
PIPELINE_EO_PHI_NORMALIZER_DIR="$PWD/eo-phi-normalizer"
PIPELINE_EO_PHI_NORMALIZER_DATA_DIR="$PIPELINE_EO_PHI_NORMALIZER_DIR/data"
PIPELINE_REPORT_DIR="$PWD/report"
PIPELINE_EO_YAML_DIR="$PIPELINE_DIR/eo-yaml"

Expand All @@ -30,13 +30,13 @@ PIPELINE_LOCK_FILE_NEW="$PIPELINE_DIR/$PIPELINE_LOCK_FILE_NEW_NAME"
PIPELINE_LOCK_FILE_RELATIVE="$PIPELINE_DIR_RELATIVE/$PIPELINE_LOCK_FILE_NAME"
PIPELINE_LOCK_FILE_NEW_RELATIVE="$PIPELINE_DIR_RELATIVE/$PIPELINE_LOCK_FILE_NEW_NAME"

NORMALIZER_INSTALLED="${NORMALIZER_INSTALLED:-false}"
EO_PHI_NORMALIZER_INSTALLED="${EO_PHI_NORMALIZER_INSTALLED:-false}"

PIPELINE_LOGS_DIR="$PIPELINE_DIR/logs"
PIPELINE_TEST_EO_INITIAL_LOGS="$PIPELINE_LOGS_DIR/test-initial-logs.txt"
PIPELINE_TEST_EO_NORMALIZED_LOGS="$PIPELINE_LOGS_DIR/test-normalized-logs.txt"

SYNTAX_DIR="$PIPELINE_NORMALIZER_DIR/src/Language/EO/Phi/Syntax"
SYNTAX_DIR="$PIPELINE_EO_PHI_NORMALIZER_DIR/src/Language/EO/Phi/Syntax"

function init_logs {
mkdir -p "$PIPELINE_LOGS_DIR"
Expand Down Expand Up @@ -165,24 +165,24 @@ function eo {

export -f eo

function install_normalizer {
function install_eo_phi_normalizer {
set_installation_path
add_installation_path_to_path

print_message "Install the Normalizer"

if [[ "$NORMALIZER_INSTALLED" = "true" ]]; then
if [[ "$EO_PHI_NORMALIZER_INSTALLED" = "true" ]]; then
if [[ "$IS_WINDOWS" = "true" ]]; then
mv "$INSTALLATION_PATH/normalizer.exe" "$INSTALLATION_PATH/normalizer"
mv "$INSTALLATION_PATH/eo-phi-normalizer.exe" "$INSTALLATION_PATH/eo-phi-normalizer"
fi
else
stack install eo-phi-normalizer:exe:normalizer --ghc-options -O2
stack install eo-phi-normalizer:exe:eo-phi-normalizer --ghc-options -O2
fi

print_message "The Normalizer is installed"
}

export -f install_normalizer
export -f install_eo_phi_normalizer

function run_pipeline {
bash "$PIPELINE_SCRIPT"
Expand Down Expand Up @@ -240,9 +240,9 @@ export -f check_syntax_files_exist
function write_dependencies_markdown_for_eo_version {
local eo_version=$1

export PIPELINE_NORMALIZER_DATA_DIR
export PIPELINE_EO_PHI_NORMALIZER_DATA_DIR

local version_data_dir="$PIPELINE_NORMALIZER_DATA_DIR/$eo_version"
local version_data_dir="$PIPELINE_EO_PHI_NORMALIZER_DATA_DIR/$eo_version"
export version_data_dir

function print_program {
Expand Down Expand Up @@ -274,10 +274,10 @@ function write_dependencies_markdown_for_eo_version {
export -f write_dependencies_markdown_for_eo_version

function write_dependencies_markdown {
export PIPELINE_NORMALIZER_DATA_DIR
export PIPELINE_EO_PHI_NORMALIZER_DATA_DIR

# shellcheck disable=SC2038
find "$PIPELINE_NORMALIZER_DATA_DIR" -mindepth 1 -maxdepth 1 -type d \
find "$PIPELINE_EO_PHI_NORMALIZER_DATA_DIR" -mindepth 1 -maxdepth 1 -type d \
| xargs -I {} basename {} \
| xargs -I {} bash -c "write_dependencies_markdown_for_eo_version {}"
}
Expand Down
18 changes: 9 additions & 9 deletions scripts/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function generate_eo_tests {
mkdir_clean "$PIPELINE_EO_YAML_DIR"
mkdir_clean "$PIPELINE_EO_FILTERED_DIR"

normalizer pipeline prepare-tests --config "$PIPELINE_CONFIG_FILE"
eo-phi-normalizer pipeline prepare-tests --config "$PIPELINE_CONFIG_FILE"
}

function convert_eo_to_phi {
Expand All @@ -35,15 +35,15 @@ function convert_eo_to_phi {
cd "$PIPELINE_DIR"
}

function update_normalizer_data_files {
function update_eo_phi_normalizer_data_files {

print_message "Update data files in eo-phi-normalizer"

cd "$PIPELINE_EO_FILTERED_DIR"

print_message "Update *.phi files"

local data_directory="$PIPELINE_NORMALIZER_DATA_DIR/$EO"
local data_directory="$PIPELINE_EO_PHI_NORMALIZER_DATA_DIR/$EO"
mkdir_clean "$data_directory"
cp -r .eoc/phi/org "$data_directory"

Expand Down Expand Up @@ -107,14 +107,14 @@ function normalize {
cd "$PIPELINE_PHI_INITIAL_DIR"

local dataize_configs
eval "dataize_configs=($(normalizer pipeline print-dataize-configs --single-line --strip-phi-prefix "$PIPELINE_PHI_INITIAL_DIR_RELATIVE/" --config "$PIPELINE_CONFIG_FILE"))"
eval "dataize_configs=($(eo-phi-normalizer pipeline print-dataize-configs --single-line --strip-phi-prefix "$PIPELINE_PHI_INITIAL_DIR_RELATIVE/" --config "$PIPELINE_CONFIG_FILE"))"

local dependency_files
dependency_files="$(find "$PIPELINE_EO_FILTERED_DIR"/.eoc/phi/org/eolang -type f)"

export dependency_files
export PIPELINE_PHI_NORMALIZED_DIR
export PIPELINE_NORMALIZER_DIR
export PIPELINE_EO_PHI_NORMALIZER_DIR

function extract {
yq -pj -oj -r "$1" <<< "$2"
Expand Down Expand Up @@ -152,7 +152,7 @@ function normalize {

set -x
# shellcheck disable=SC2086
normalizer dataize \
eo-phi-normalizer dataize \
--minimize-stuck-terms \
--as-package \
--recursive \
Expand All @@ -175,7 +175,7 @@ function generate_report {

cd "$PWD_DIR"

normalizer pipeline report --config "$PIPELINE_CONFIG_FILE"
eo-phi-normalizer pipeline report --config "$PIPELINE_CONFIG_FILE"
}

function convert_normalized_phi_to_eo {
Expand Down Expand Up @@ -203,12 +203,12 @@ function test_with_normalization {
}

update_pipeline_lock
install_normalizer
install_eo_phi_normalizer

if [[ "$PIPELINE_LOCK_CHANGED" = true ]]; then
generate_eo_tests
convert_eo_to_phi
update_normalizer_data_files
update_eo_phi_normalizer_data_files
convert_phi_to_eo
test_without_normalization
fi
Expand Down
12 changes: 6 additions & 6 deletions scripts/update-markdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
mdsh

mdsh -i site/docs/src/common/celsius.md --work_dir .
mdsh -i site/docs/src/normalizer.md --work_dir .
mdsh -i site/docs/src/eo-phi-normalizer.md --work_dir .
mdsh -i site/docs/src/pipeline.md --work_dir .
mdsh -i site/docs/src/quick-start.md --work_dir .
mdsh -i site/docs/src/normalizer/dataize.md --work_dir .
mdsh -i site/docs/src/normalizer/metrics.md --work_dir .
mdsh -i site/docs/src/normalizer/transform.md --work_dir .
mdsh -i site/docs/src/normalizer/print-rules.md --work_dir .
mdsh -i site/docs/src/normalizer/test.md --work_dir .
mdsh -i site/docs/src/eo-phi-normalizer/dataize.md --work_dir .
mdsh -i site/docs/src/eo-phi-normalizer/metrics.md --work_dir .
mdsh -i site/docs/src/eo-phi-normalizer/transform.md --work_dir .
mdsh -i site/docs/src/eo-phi-normalizer/print-rules.md --work_dir .
mdsh -i site/docs/src/eo-phi-normalizer/test.md --work_dir .
mdsh -i site/docs/src/contributing.md --work_dir .

rm celsius.phi
Expand Down
2 changes: 1 addition & 1 deletion site/docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title = "phi-normalizer"
additional-css = ["theme/pagetoc.css"]
additional-js = ["theme/pagetoc.js"]
mathjax-support = true
git-repository-url = "https://github.com/objectionary/normalizer"
git-repository-url = "https://github.com/objectionary/eo-phi-normalizer"
git-repository-icon = "fa-github"

[build]
Expand Down
Loading
Loading