Skip to content

Commit

Permalink
Merge pull request #498 from objectionary/483-test-command
Browse files Browse the repository at this point in the history
483 test command
  • Loading branch information
deemp authored Oct 16, 2024
2 parents 6e3b8b0 + 9a2a944 commit 500b251
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 77 deletions.
21 changes: 21 additions & 0 deletions eo-phi-normalizer/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import Language.EO.Phi.Rules.Fast (fastYegorInsideOut, fastYegorInsideOutAsRule)
import Language.EO.Phi.Rules.RunYegor (yegorRuleSet)
import Language.EO.Phi.Rules.Yaml (RuleSet (rules, title), convertRuleNamed, parseRuleSetFromFile)
import Language.EO.Phi.ToLaTeX
import Language.EO.Test.YamlSpec (spec)
import Main.Utf8
import Options.Applicative hiding (metavar)
import Options.Applicative qualified as Optparse (metavar)
Expand All @@ -65,6 +66,7 @@ import PyF (fmt, fmtTrim)
import System.Directory (createDirectoryIfMissing, doesFileExist)
import System.FilePath (takeDirectory)
import System.IO (IOMode (WriteMode), getContents', hFlush, hPutStr, hPutStrLn, openFile, stdout)
import Test.Hspec.Core.Runner

data CLI'TransformPhi = CLI'TransformPhi
{ chain :: Bool
Expand Down Expand Up @@ -133,12 +135,16 @@ data CLI'Pipeline
| CLI'Pipeline'PrintDataizeConfigs' CLI'Pipeline'PrintDataizeConfigs
deriving stock (Show)

newtype CLI'Test = CLI'Test {rulePaths :: [FilePath]}
deriving stock (Show)

data CLI
= CLI'TransformPhi' CLI'TransformPhi
| CLI'DataizePhi' CLI'DataizePhi
| CLI'MetricsPhi' CLI'MetricsPhi
| CLI'PrintRules' CLI'PrintRules
| CLI'Pipeline' CLI'Pipeline
| CLI'Test' CLI'Test
deriving stock (Show)

data MetavarName = MetavarName
Expand Down Expand Up @@ -238,6 +244,7 @@ data CommandParser = CommandParser
, pipeline :: Parser CLI'Pipeline
, pipeline' :: CommandParser'Pipeline
, printRules :: Parser CLI'PrintRules
, test :: Parser CLI'Test
}

commandParser :: CommandParser
Expand Down Expand Up @@ -304,6 +311,9 @@ commandParser =
<> command commandNames.pipeline'.prepareTests commandParserInfo.pipeline'.prepareTests
<> command commandNames.pipeline'.printDataizeConfigs commandParserInfo.pipeline'.printDataizeConfigs
)
test = do
rulePaths <- many $ strOption (long "rules" <> short 'r' <> metavar.file <> help [fmt|{metavarName.file} with user-defined rules.|])
pure CLI'Test{..}

data CommandParserInfo'Pipeline = CommandParserInfo'Pipeline
{ report :: ParserInfo CLI'Pipeline
Expand All @@ -318,6 +328,7 @@ data CommandParserInfo = CommandParserInfo
, printRules :: ParserInfo CLI
, pipeline :: ParserInfo CLI
, pipeline' :: CommandParserInfo'Pipeline
, test :: ParserInfo CLI
}

commandParserInfo :: CommandParserInfo
Expand All @@ -334,6 +345,7 @@ commandParserInfo =
, 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.|])
}
, test = info (CLI'Test' <$> commandParser.test) (progDesc "Run unit tests in given files with user-defined rules.")
}

data CommandNames'Pipeline = CommandNames'Pipeline
Expand All @@ -349,6 +361,7 @@ data CommandNames = CommandNames
, printRules :: String
, pipeline :: String
, pipeline' :: CommandNames'Pipeline
, test :: String
}

commandNames :: CommandNames
Expand All @@ -365,6 +378,7 @@ commandNames =
, prepareTests = "prepare-tests"
, printDataizeConfigs = "print-dataize-configs"
}
, test = "test"
}

cli :: Parser CLI
Expand All @@ -375,6 +389,7 @@ cli =
<> command commandNames.dataize commandParserInfo.dataize
<> command commandNames.pipeline commandParserInfo.pipeline
<> command commandNames.printRules commandParserInfo.printRules
<> command commandNames.test commandParserInfo.test
)

cliOpts :: String -> ParserInfo CLI
Expand Down Expand Up @@ -695,3 +710,9 @@ main = withUtf8 do
CLI'Pipeline' (CLI'Pipeline'PrintDataizeConfigs' CLI'Pipeline'PrintDataizeConfigs{..}) -> do
config <- decodeFileThrow @_ @PipelineConfig configFile
PrintConfigs.printDataizeConfigs config phiPrefixesToStrip singleLine
CLI'Test' (CLI'Test{..}) ->
evalSpec defaultConfig (spec rulePaths)
>>= \(config, spec') ->
readConfig config []
>>= runSpecForest spec'
>>= evaluateResult
14 changes: 12 additions & 2 deletions eo-phi-normalizer/eo-phi-normalizer.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.24

-- This file has been generated from package.yaml by hpack version 0.36.0.
-- This file has been generated from package.yaml by hpack version 0.37.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -167,6 +167,8 @@ library
Language.EO.Phi.Syntax.Print
Language.EO.Phi.TH
Language.EO.Phi.ToLaTeX
Language.EO.Test.Yaml
Language.EO.Test.YamlSpec
other-modules:
Paths_eo_phi_normalizer
hs-source-dirs:
Expand Down Expand Up @@ -194,6 +196,8 @@ library
, filepath
, generic-lens
, hashable
, hspec
, hspec-core
, lens
, mtl
, regex-compat
Expand Down Expand Up @@ -235,6 +239,8 @@ executable normalizer
, filepath
, generic-lens
, hashable
, hspec
, hspec-core
, lens
, mtl
, optparse-applicative
Expand Down Expand Up @@ -278,6 +284,8 @@ test-suite doctests
Language.EO.Phi.Syntax.Skel
Language.EO.Phi.TH
Language.EO.Phi.ToLaTeX
Language.EO.Test.Yaml
Language.EO.Test.YamlSpec
Paths_eo_phi_normalizer
hs-source-dirs:
test/doctests
Expand Down Expand Up @@ -307,6 +315,8 @@ test-suite doctests
, filepath
, generic-lens
, hashable
, hspec
, hspec-core
, lens
, mtl
, regex-compat
Expand All @@ -327,7 +337,6 @@ test-suite spec
Language.EO.YamlSpec
Spec
Test.EO.Phi
Test.EO.Yaml
Test.Metrics.Phi
Paths_eo_phi_normalizer
hs-source-dirs:
Expand Down Expand Up @@ -358,6 +367,7 @@ test-suite spec
, generic-lens
, hashable
, hspec
, hspec-core
, hspec-discover
, lens
, mtl
Expand Down
2 changes: 2 additions & 0 deletions eo-phi-normalizer/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ dependencies:
- PyF
- lens
- generic-lens
- hspec
- hspec-core
- text
- template-haskell
- blaze-html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Test.EO.Yaml where
module Language.EO.Test.Yaml where

import Control.Monad (forM)
import Data.List (sort)
Expand Down
26 changes: 26 additions & 0 deletions eo-phi-normalizer/src/Language/EO/Test/YamlSpec.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE OverloadedRecordDot #-}

module Language.EO.Test.YamlSpec where

import Control.Monad (forM_)
import Language.EO.Phi.Dataize.Context (defaultContext)
import Language.EO.Phi.Rules.Common (applyOneRule)
import Language.EO.Phi.Rules.Yaml (Rule (..), RuleSet (..), RuleTest (..), RuleTestOption (..), convertRuleNamed)
import Language.EO.Test.Yaml
import Test.Hspec

spec :: [FilePath] -> Spec
spec testPaths = describe "User-defined rules unit tests" do
forM_ testPaths $ \path -> do
ruleset <- runIO $ fileTests path
describe ruleset.title do
forM_ ruleset.rules $ \rule -> do
describe rule.name do
forM_ rule.tests $ \ruleTest -> do
it ruleTest.name $
let rule' = convertRuleNamed rule
resultOneStep = applyOneRule (defaultContext [rule'] ruleTest.input) ruleTest.input
normalizationResult = maybe resultOneStep (\lst -> if TakeOne True `elem` lst then take 1 resultOneStep else resultOneStep) ruleTest.options
expected = ruleTest.output
in map snd normalizationResult `shouldBe` expected
26 changes: 4 additions & 22 deletions eo-phi-normalizer/test/Language/EO/YamlSpec.hs
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE OverloadedRecordDot #-}

module Language.EO.YamlSpec where

import Control.Monad (forM_)
import Language.EO.Phi.Dataize.Context (defaultContext)
import Language.EO.Phi.Rules.Common (applyOneRule)
import Language.EO.Phi.Rules.Yaml (Rule (..), RuleSet (..), RuleTest (..), RuleTestOption (..), convertRuleNamed)
import Test.EO.Yaml
import Test.Hspec
import Language.EO.Test.YamlSpec qualified as Test
import Test.Hspec (Spec)

spec :: Spec
spec = describe "User-defined rules unit tests" do
forM_ testPaths $ \path -> do
ruleset <- runIO $ fileTests path
describe ruleset.title do
forM_ ruleset.rules $ \rule -> do
describe rule.name do
forM_ rule.tests $ \ruleTest -> do
it ruleTest.name $
let rule' = convertRuleNamed rule
resultOneStep = applyOneRule (defaultContext [rule'] ruleTest.input) ruleTest.input
normalizationResult = maybe resultOneStep (\lst -> if TakeOne True `elem` lst then take 1 resultOneStep else resultOneStep) ruleTest.options
expected = ruleTest.output
in map snd normalizationResult `shouldBe` expected
where
testPaths =
spec =
Test.spec
[ "test/eo/phi/rules/yegor.yaml"
, "test/eo/phi/rules/streams.yaml"
]
6 changes: 3 additions & 3 deletions flake.lock

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

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
"normalizer/metrics.md"
"normalizer/transform.md"
"normalizer/print-rules.md"
"normalizer/test.md"
"contributing.md"
]}
Expand Down
1 change: 1 addition & 0 deletions scripts/update-markdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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/contributing.md --work_dir .

rm celsius.phi
Expand Down
1 change: 1 addition & 0 deletions site/docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
- [normalizer pipeline prepare-tests](./normalizer/pipeline/prepare-tests.md)
- [normalizer pipeline print-dataize-configs](./normalizer/pipeline/print-dataize-configs.md)
- [normalizer pipeline report](./normalizer/pipeline/report.md)
- [normalizer test](./normalizer/test.md)
- [normalizer print-rules](./normalizer/print-rules.md)
- [Contributing](./contributing.md)
4 changes: 4 additions & 0 deletions site/docs/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Available commands:
dataize Dataize a PHI program.
pipeline Run pipeline-related commands.
print-rules Print rules in LaTeX format.
test Run unit tests in given files with user-defined
rules.
```

Or, omit the executable name.
Expand All @@ -84,6 +86,8 @@ Available commands:
dataize Dataize a PHI program.
pipeline Run pipeline-related commands.
print-rules Print rules in LaTeX format.
test Run unit tests in given files with user-defined
rules.
```

## Docs
Expand Down
2 changes: 2 additions & 0 deletions site/docs/src/normalizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ Available commands:
dataize Dataize a PHI program.
pipeline Run pipeline-related commands.
print-rules Print rules in LaTeX format.
test Run unit tests in given files with user-defined
rules.
```
56 changes: 7 additions & 49 deletions site/docs/src/normalizer/print-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Available options:

### Default version

The command below prints to the console rules from `yegor.yaml`, listing each condition of the rules on a separate line.

![rules-latex](../media/print-rules-tex.png)

```$ as tex
normalizer print-rules --tex
```
Expand All @@ -49,35 +53,11 @@ normalizer print-rules --tex
\end{figure*}
```

The command above prints to the console rules from `yegor.yaml`, listing each condition of the rules on a separate line:

![rules-latex](../media/print-rules-tex.png)

```console
\begin{figure*}
\begin{tabular}{rl}
\rrule{Phi}: & $ Q $ \(\trans\) $ b $ \\\text {if }& $ Q -> b $ \\&not in subformations\\\\
\rrule{xi}: & $ \xi $ \(\trans\) $ b $ \\\text {if }& $ b $ is the scope of the redex\\&not in subformations\\\\
\rrule{DOT}: & $ [[ \tau -> b, B ]].\tau $ \(\trans\) $ \mathbb{S}(b, [[ \tau -> b, B ]]) $ \\\text {if }&not in subformations,\\& $ b $ is nf inside formation,\\& $ [[ B ]]\in\mathcal{N} $ ,\\& $ \tau \neq ^ $ \\\\
\rrule{DOTrho}: & $ [[ ^ -> b, B ]].^ $ \(\trans\) $ b $ \\\text {if }& $ [[ B ]]\in\mathcal{N} $ \\\\
\rrule{phi}: & $ [[ B ]].\tau $ \(\trans\) $ [[ B ]].@.\tau $ \\\text {if }& $ @ \in B $ ,\\& $ \tau \notin B $ \\\\
\rrule{COPY}: & $ [[ \tau -> ?, B1 ]]( \tau -> b1, B2 ) $ \(\trans\) $ [[ \tau -> \mathbb{S}(b1, b2), B1 ]]( B2 ) $ \\\text {if }& $ b2 $ is the scope of the redex\\&not in subformations,\\& $ b1\in\mathcal{N} $ \\\\
\rrule{COPY1}: & $ [[ \tau -> ?, B ]]( 0-> b1 ) $ \(\trans\) $ [[ \tau -> \mathbb{S}(b1, b2), B ]] $ \\\text {if }& $ b2 $ is the scope of the redex\\&not in subformations,\\& $ b1\in\mathcal{N} $ \\\\
\rrule{COPY2}: & $ [[ \tau1 -> ?, \tau2 -> ?, B ]]( 0-> b1, 1-> b2 ) $ \(\trans\) $ [[ \tau1 -> \mathbb{S}(b1, b3), \tau2 -> \mathbb{S}(b2, b3), B ]] $ \\\text {if }& $ b3 $ is the scope of the redex\\&not in subformations,\\& $ b1\in\mathcal{N} $ ,\\& $ b2\in\mathcal{N} $ \\\\
\rrule{COPYdelta}: & $ [[ D> ?, B ]]( D> y ) $ \(\trans\) $ [[ D> y, B ]] $ \\\text {if }&not in subformations\\\\
\rrule{EMPTY}: & $ [[ B1 ]]( ) $ \(\trans\) $ [[ B1 ]] $ \\\\
\rrule{OVER}: & $ [[ \tau -> b1, B1 ]]( \tau -> b2, B2 ) $ \(\trans\) $ \dead $ \\\\
\rrule{STOP}: & $ [[ B ]].\tau $ \(\trans\) $ \dead $ \\\text {if }& $ \tau, @, \lambda \notin B $ ,\\& $ ^ \in B $ ,\\& $ [[ B ]]\in\mathcal{N} $ \\\\
\rrule{MISS}: & $ [[ B1 ]]( \tau -> b, B2 ) $ \(\trans\) $ \dead $ \\\text {if }& $ \tau, @, \lambda \notin B1 $ \\\\
\rrule{DD}: & $ \dead.\tau $ \(\trans\) $ \dead $ \\\\
\rrule{DC}: & $ \dead( B ) $ \(\trans\) $ \dead $
\end{tabular}
\end{figure*}
```

### Compact version

The compact version prints rules listing all conditions on a single line:
The compact version prints rules listing all conditions on a single line.

![rules-latex-compact](../media/print-rules-tex-compact.png)

```$ as tex
normalizer print-rules --tex --compact
Expand All @@ -102,25 +82,3 @@ normalizer print-rules --tex --compact
\rrule{DC}: $ \dead( B ) $ \(\trans\) $ \dead $
\end{figure*}
```

![rules-latex-compact](../media/print-rules-tex-compact.png)

```console
\begin{figure*}
\rrule{Phi}: $ Q $ \(\trans\) $ b $ \quad\text {if } $ Q -> b $ , not in subformations\\\vspace*{0.5em}
\rrule{xi}: $ \xi $ \(\trans\) $ b $ \quad\text {if } $ b $ is the scope of the redex, not in subformations\\\vspace*{0.5em}
\rrule{DOT}: $ [[ \tau -> b, B ]].\tau $ \(\trans\) $ \mathbb{S}(b, [[ \tau -> b, B ]]) $ \quad\text {if }not in subformations, $ b $ is nf inside formation, $ [[ B ]]\in\mathcal{N} $ , $ \tau \neq ^ $ \\\vspace*{0.5em}
\rrule{DOTrho}: $ [[ ^ -> b, B ]].^ $ \(\trans\) $ b $ \quad\text {if } $ [[ B ]]\in\mathcal{N} $ \\\vspace*{0.5em}
\rrule{phi}: $ [[ B ]].\tau $ \(\trans\) $ [[ B ]].@.\tau $ \quad\text {if } $ @ \in B $ , $ \tau \notin B $ \\\vspace*{0.5em}
\rrule{COPY}: $ [[ \tau -> ?, B1 ]]( \tau -> b1, B2 ) $ \(\trans\) $ [[ \tau -> \mathbb{S}(b1, b2), B1 ]]( B2 ) $ \quad\text {if } $ b2 $ is the scope of the redex, not in subformations, $ b1\in\mathcal{N} $ \\\vspace*{0.5em}
\rrule{COPY1}: $ [[ \tau -> ?, B ]]( 0-> b1 ) $ \(\trans\) $ [[ \tau -> \mathbb{S}(b1, b2), B ]] $ \quad\text {if } $ b2 $ is the scope of the redex, not in subformations, $ b1\in\mathcal{N} $ \\\vspace*{0.5em}
\rrule{COPY2}: $ [[ \tau1 -> ?, \tau2 -> ?, B ]]( 0-> b1, 1-> b2 ) $ \(\trans\) $ [[ \tau1 -> \mathbb{S}(b1, b3), \tau2 -> \mathbb{S}(b2, b3), B ]] $ \quad\text {if } $ b3 $ is the scope of the redex, not in subformations, $ b1\in\mathcal{N} $ , $ b2\in\mathcal{N} $ \\\vspace*{0.5em}
\rrule{COPYdelta}: $ [[ D> ?, B ]]( D> y ) $ \(\trans\) $ [[ D> y, B ]] $ \quad\text {if }not in subformations\\\vspace*{0.5em}
\rrule{EMPTY}: $ [[ B1 ]]( ) $ \(\trans\) $ [[ B1 ]] $ \\\vspace*{0.5em}
\rrule{OVER}: $ [[ \tau -> b1, B1 ]]( \tau -> b2, B2 ) $ \(\trans\) $ \dead $ \\\vspace*{0.5em}
\rrule{STOP}: $ [[ B ]].\tau $ \(\trans\) $ \dead $ \quad\text {if } $ \tau, @, \lambda \notin B $ , $ [[ B ]]\in\mathcal{N} $ \\\vspace*{0.5em}
\rrule{MISS}: $ [[ B1 ]]( \tau -> b, B2 ) $ \(\trans\) $ \dead $ \quad\text {if } $ \tau, @, \lambda \notin B1 $ \\\vspace*{0.5em}
\rrule{DD}: $ \dead.\tau $ \(\trans\) $ \dead $ \\\vspace*{0.5em}
\rrule{DC}: $ \dead( B ) $ \(\trans\) $ \dead $
\end{figure*}
```
Loading

1 comment on commit 500b251

@0pdd
Copy link

@0pdd 0pdd commented on 500b251 Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA && pdd -v -f /tmp/20241016-10495-nhyfpe [1]: + set -e + set -o pipefail + cd...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA && pdd -v -f /tmp/20241016-10495-nhyfpe [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA
+ pdd -v -f /tmp/20241016-10495-nhyfpe

My version is 0.24.0
Ruby version is 3.1.4 at x86_64-linux
Reading from root dir /tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/.markdownlint.jsonc is a binary file (23 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/.vscode/settings.json is a binary file (650 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/flake.lock is a binary file (5296 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/package-lock.json is a binary file (30561 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/package.json is a binary file (93 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/renovate.json is a binary file (114 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/site/docs/src/image.png is a binary file (245811 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/site/docs/src/media/metrics.png is a binary file (95050 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/site/docs/src/media/phi-grammar.png is a binary file (131415 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/site/docs/src/media/print-rules-tex-compact.png is a binary file (235249 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/site/docs/src/media/print-rules-tex.png is a binary file (588712 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/site/docs/src/media/rules.jpg is a binary file (76143 bytes)
/tmp/0pdd20241016-2-1v5pa7/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L2VvLXBoaS1ub3JtYWxpemVyLmdpdA/stack.nix is a binary file (66 bytes)
Reading .envrc ...
Reading .gitattributes ...
Reading .github/workflows/ghc.yml ...
Puzzle 340-40b07064 10/DEV at .github/workflows/ghc.yml
Reading .github/workflows/release.yml ...
Reading .gitignore ...
Reading .gitmodules ...
Reading .hlint.yaml ...
Reading .pre-commit-config.yaml ...
Reading .prettierignore ...
Reading LICENSE.txt ...
Reading README.md ...
Reading cabal.project ...
Reading default.nix ...
Reading eo-phi-normalizer/.gitignore ...
Reading eo-phi-normalizer/CHANGELOG.md ...
Reading eo-phi-normalizer/LICENSE ...
Reading eo-phi-normalizer/README.md ...
Reading eo-phi-normalizer/Setup.hs ...
Reading eo-phi-normalizer/app/Main.hs ...
Reading eo-phi-normalizer/data/0.36.0/dependencies.md ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/as-phi.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/bool.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/bytes.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/cage.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/cti.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/dataized.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/error.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/float.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/go.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/goto.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/heap.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/if.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/int.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/io/stdin.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/io/stdout.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/malloc.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/memory.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/nan.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/negative-infinity.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/nop.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/positive-infinity.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/ram.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/rust.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/seq.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/string.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/switch.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/try.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/tuple.phi ...
Reading eo-phi-normalizer/data/0.36.0/org/eolang/while.phi ...
Reading eo-phi-normalizer/data/0.37.0/dependencies.md ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/as-phi.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/bytes.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/cage.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/cti.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/dataized.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/error.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/false.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/float.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/go.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/int.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/io/stdin.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/io/stdout.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/malloc.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/nan.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/negative-infinity.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/positive-infinity.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/rust.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/seq.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/string.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/switch.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/true.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/try.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/tuple.phi ...
Reading eo-phi-normalizer/data/0.37.0/org/eolang/while.phi ...
Reading eo-phi-normalizer/data/0.38.0/dependencies.md ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/as-phi.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/bytes.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/cage.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/cti.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/dataized.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/error.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/false.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/float.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/go.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/int.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/io/stdin.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/io/stdout.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/malloc.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/nan.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/negative-infinity.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/positive-infinity.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/rust.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/seq.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/string.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/switch.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/true.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/try.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/tuple.phi ...
Reading eo-phi-normalizer/data/0.38.0/org/eolang/while.phi ...
Reading eo-phi-normalizer/data/0.38.4/dependencies.md ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/as-phi.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/bytes.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/cage.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/cti.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/dataized.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/error.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/false.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/float.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/go.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/int.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/io/stdin.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/io/stdout.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/malloc.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/nan.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/negative-infinity.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/positive-infinity.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/rust.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/seq.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/string.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/switch.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/true.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/try.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/tuple.phi ...
Reading eo-phi-normalizer/data/0.38.4/org/eolang/while.phi ...
Reading eo-phi-normalizer/eo-phi-normalizer.cabal ...
Reading eo-phi-normalizer/grammar/EO/Phi/Syntax.cf ...
Reading eo-phi-normalizer/package.yaml ...
Reading eo-phi-normalizer/report/main.js ...
Reading eo-phi-normalizer/report/styles.css ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Dataize/Atoms.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Dataize/Context.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Dataize.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Dependencies.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Metrics/Collect.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Metrics/Data.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Pipeline/Config.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Pipeline/Dataize/PrintConfigs.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Pipeline/EOTests/Data.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Pipeline/EOTests/PrepareTests.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Report/Data.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Report/Html.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/Fast.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/PhiPaper.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/RunYegor.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs ...
ERROR: ERROR: eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs; PDD::Error at eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs:129: TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/cqfn/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:74:in `rescue in block in xml'
/app/objects/git_repo.rb:71:in `block in xml'
/app/vendor/ruby-3.1.4/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/app/objects/git_repo.rb:70:in `xml'
/app/objects/puzzles.rb:46:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:549:in `process_request'
/app/0pdd.rb:380:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1804:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1804:in `block in compile!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1071:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1089:in `route_eval'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1071:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1120:in `block in process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1118:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1118:in `process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1069:in `block in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1066:in `each'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1066:in `route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1190:in `block in dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1185:in `dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1001:in `block in call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1001:in `call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:990:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/rewindable_input.rb:25:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/deflater.rb:47:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/xss_header.rb:20:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/path_traversal.rb:18:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/json_csrf.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/frame_options.rb:33:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/logger.rb:19:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/common_logger.rb:43:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:266:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:259:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/head.rb:15:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/method_override.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:224:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:2115:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1674:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1890:in `synchronize'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1674:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb:111:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

Please sign in to comment.