packages feed

ogma-cli 1.11.0 → 1.12.0

raw patch · 11 files changed

+50/−44 lines, 11 filesdep ~ogma-core

Dependency ranges changed: ogma-core

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for ogma-cli +## [1.12.0] - 2026-01-21++* Version bump 1.12.0 (#336).+* Add CI job to test diagram backend (#332).+* Standardize argument names across commands (#334).+ ## [1.11.0] - 2025-11-21  * Version bump 1.11.0 (#325).
ogma-cli.cabal view
@@ -19,7 +19,7 @@ build-type:          Simple  name:                ogma-cli-version:             1.11.0+version:             1.12.0 homepage:            https://github.com/nasa/ogma bug-reports:         https://github.com/nasa/ogma/issues license:             Apache-2.0@@ -143,7 +143,7 @@     , microstache          >= 1.0      && < 1.1     , text                 >= 1.2.3.1  && < 2.2 -    , ogma-core            >= 1.11.0 && < 1.12+    , ogma-core            >= 1.12.0 && < 1.13    hs-source-dirs:     src
src/CLI/CommandCFSApp.hs view
@@ -104,7 +104,7 @@             )         )   <*> strOption-        (  long "app-target-dir"+        (  long "target-dir"         <> metavar "DIR"         <> showDefault         <> value "copilot-cfs-demo"@@ -112,7 +112,7 @@         )   <*> optional         ( strOption-            (  long "app-template-dir"+            (  long "template-dir"             <> metavar "DIR"             <> help strCFSAppTemplateDirArgDesc             )
src/CLI/CommandCStructs2Copilot.hs view
@@ -43,14 +43,14 @@ -- | A Copilot correspondence for a C struct can be generated by providing -- the path to the file that declares the struct. newtype CommandOpts = CommandOpts-  { cstructsFileName :: FilePath }+  { cstructsInputFile :: FilePath }  -- | Generate Copilot struct definitions and instances from structs defined in -- a C header file. -- -- This is just an uncurried version of "Command.CStructs2Copilot". command :: CommandOpts -> IO (Result ErrorCode)-command c = cstructs2Copilot (cstructsFileName c)+command c = cstructs2Copilot (cstructsInputFile c)  -- * CLI @@ -63,11 +63,11 @@ commandOptsParser :: Parser CommandOpts commandOptsParser = CommandOpts   <$> strOption-        (  long "header-file-name"+        (  long "input-file"         <> metavar "FILENAME"-        <> help strStructsHeaderArgDesc+        <> help strStructsInputFileArgDesc         )  -- | Argument C header file to struct conversion command-strStructsHeaderArgDesc :: String-strStructsHeaderArgDesc = "C header file with struct definitions"+strStructsInputFileArgDesc :: String+strStructsInputFileArgDesc = "C header file with struct definitions"
src/CLI/CommandCStructs2MsgHandlers.hs view
@@ -42,14 +42,14 @@  -- | Options to generate message handlers from C struct definitions. newtype CommandOpts = CommandOpts-  { msgHandlersFileName :: FilePath }+  { msgHandlersInputFile :: FilePath }  -- | Generate C methods that process NASA Core Flight System messages dealing -- with the structs defined in a header file. -- -- This is just an uncurried version of "Command.CStructs2MsgHandlers". command :: CommandOpts -> IO (Result ErrorCode)-command c = cstructs2MsgHandlers (msgHandlersFileName c)+command c = cstructs2MsgHandlers (msgHandlersInputFile c)  -- * CLI @@ -62,11 +62,11 @@ commandOptsParser :: Parser CommandOpts commandOptsParser = CommandOpts   <$> strOption-        (  long "header-file-name"+        (  long "input-file"         <> metavar "FILENAME"-        <> help strMsgHandlersHeaderArgDesc+        <> help strMsgHandlersInputFileArgDesc         )  -- | Argument C header file to handler generation command-strMsgHandlersHeaderArgDesc :: String-strMsgHandlersHeaderArgDesc = "C header file with struct definitions"+strMsgHandlersInputFileArgDesc :: String+strMsgHandlersInputFileArgDesc = "C header file with struct definitions"
src/CLI/CommandDiagram.hs view
@@ -47,7 +47,7 @@ data CommandOpts = CommandOpts   { diagramTargetDir   :: FilePath   , diagramTemplateDir :: Maybe FilePath-  , diagramFileName    :: FilePath+  , diagramInputFile   :: FilePath   , diagramFormat      :: String   , diagramPropFormat  :: String   , diagramTarget      :: String@@ -91,7 +91,7 @@              , Command.Diagram.diagramStateVar    = diagramStateVar c              , Command.Diagram.diagramInputVar    = diagramInputVar c              }-       diagram (diagramFileName c) internalCommandOpts+       diagram (diagramInputFile c) internalCommandOpts   where     diagramFormatP     = parseDiagramFormat (diagramFormat c)     diagramModeP       = parseDiagramMode (diagramMode c)@@ -144,9 +144,9 @@             )         )   <*> strOption-        (  long "file-name"+        (  long "input-file"         <> metavar "FILENAME"-        <> help strDiagramFilenameDesc+        <> help strDiagramInputFileDesc         )   <*> strOption         (  long "input-format"@@ -201,9 +201,9 @@ strDiagramTemplateDirArgDesc :: String strDiagramTemplateDirArgDesc = "Directory holding target source template" --- | Filename flag description.-strDiagramFilenameDesc :: String-strDiagramFilenameDesc = "File with diagram source"+-- | Input file flag description.+strDiagramInputFileDesc :: String+strDiagramInputFileDesc = "File with diagram source"  -- | Format flag description. strDiagramFormatDesc :: String
src/CLI/CommandFPrimeApp.hs view
@@ -105,7 +105,7 @@             )         )   <*> strOption-        (  long "app-target-dir"+        (  long "target-dir"         <> metavar "DIR"         <> showDefault         <> value "fprime"@@ -113,7 +113,7 @@         )   <*> optional         ( strOption-            (  long "app-template-dir"+            (  long "template-dir"             <> metavar "DIR"             <> help strFPrimeAppTemplateDirArgDesc             )
src/CLI/CommandOverview.hs view
@@ -49,7 +49,7 @@  -- | Options to generate an overview from the input specification(s). data CommandOpts = CommandOpts-  { overviewFileName    :: FilePath+  { overviewInputFile   :: FilePath   , overviewFormat      :: String   , overviewPropFormat  :: String   , overviewPropVia     :: Maybe String@@ -59,7 +59,7 @@ command :: CommandOpts -> IO (Result ErrorCode) command c = do     (mOutput, result) <--      Command.Overview.command (overviewFileName c) internalCommandOpts+      Command.Overview.command (overviewInputFile c) internalCommandOpts      case (mOutput, outputString) of       (Just output, Right template) ->@@ -93,9 +93,9 @@ commandOptsParser :: Parser CommandOpts commandOptsParser = CommandOpts   <$> strOption-        (  long "file-name"+        (  long "input-file"         <> metavar "FILENAME"-        <> help strOverviewFilenameDesc+        <> help strOverviewInputFileDesc         )   <*> strOption         (  long "input-format"@@ -121,9 +121,9 @@             )         ) --- | Filename flag description.-strOverviewFilenameDesc :: String-strOverviewFilenameDesc = "File with properties or requirements"+-- | Input file flag description.+strOverviewInputFileDesc :: String+strOverviewInputFileDesc = "File with properties or requirements"  -- | Format flag description. strOverviewFormatDesc :: String
src/CLI/CommandROSApp.hs view
@@ -115,7 +115,7 @@             )         )   <*> strOption-        (  long "app-target-dir"+        (  long "target-dir"         <> metavar "DIR"         <> showDefault         <> value "ros"@@ -123,7 +123,7 @@         )   <*> optional         ( strOption-            (  long "app-template-dir"+            (  long "template-dir"             <> metavar "DIR"             <> help strROSAppTemplateDirArgDesc             )
src/CLI/CommandStandalone.hs view
@@ -48,7 +48,7 @@   { standaloneTargetDir    :: FilePath   , standaloneTemplateDir  :: Maybe FilePath   , standaloneConditionExpr  :: Maybe String-  , standaloneFileName     :: Maybe FilePath+  , standaloneInputFile    :: Maybe FilePath   , standaloneFormat       :: String   , standalonePropFormat   :: String   , standaloneTypes        :: [String]@@ -65,7 +65,7 @@     internalCommandOpts :: Command.Standalone.CommandOptions     internalCommandOpts = Command.Standalone.CommandOptions       { Command.Standalone.commandConditionExpr = standaloneConditionExpr c-      , Command.Standalone.commandInputFile   = standaloneFileName c+      , Command.Standalone.commandInputFile   = standaloneInputFile c       , Command.Standalone.commandTargetDir   = standaloneTargetDir c       , Command.Standalone.commandTemplateDir = standaloneTemplateDir c       , Command.Standalone.commandFormat      = standaloneFormat c@@ -119,9 +119,9 @@         )   <*> optional         ( strOption-          (  long "file-name"+          (  long "input-file"           <> metavar "FILENAME"-          <> help strStandaloneFilenameDesc+          <> help strStandaloneInputFileDesc           )         )   <*> strOption@@ -182,9 +182,9 @@ strStandaloneConditionExprDesc =   "Condition upon which the monitor will fire or notify" --- | Filename flag description.-strStandaloneFilenameDesc :: String-strStandaloneFilenameDesc = "File with properties or requirements"+-- | Input file flag description.+strStandaloneInputFileDesc :: String+strStandaloneInputFileDesc = "File with properties or requirements"  -- | Format flag description. strStandaloneFormatDesc :: String
tests/Main.hs view
@@ -99,7 +99,7 @@      assertBool errorMsg testPass   where-    args     = ["structs", "--header-file-name", file]+    args     = ["structs", "--input-file", file]     errorMsg = "Result of processing file " ++ file ++ " failed"  -- | Test standalone backend for a FCS format and SVM.@@ -127,7 +127,7 @@      assertBool errorMsg testPass   where-    args     = ["standalone", "--file-name", file]+    args     = ["standalone", "--input-file", file]     errorMsg = "Parsing file " ++ file ++ " result unexpected."  -- | Test standalone backend for FDB format and Lustre.@@ -149,7 +149,7 @@     (ec, _out, _err) <- readProcessWithExitCode "ogma" args ""     assertBool errorMsg (ec == ExitSuccess)   where-    args     = [ "standalone", "--file-name", file, "--input-format", "fdb"+    args     = [ "standalone", "--input-file", file, "--input-format", "fdb"                , "--prop-format", "lustre"]     errorMsg = "Parsing file " ++ file ++ " failed"