- 
                Notifications
    
You must be signed in to change notification settings  - Fork 387
 
          Add call engine julia commands
          #11803
        
          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
          
     Merged
      
      
    
  
     Merged
                    Changes from 48 commits
      Commits
    
    
            Show all changes
          
          
            52 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      51843df
              
                initial stubs
              
              
                jkrumbiegel 8e73d55
              
                use dynamically added cliffy subcommands instead
              
              
                jkrumbiegel 02ed456
              
                factor out juliaCmd()
              
              
                jkrumbiegel 2951830
              
                remove unused supervisor_pid
              
              
                jkrumbiegel 7b10d05
              
                refactor json printing and fix race condition in file reading
              
              
                jkrumbiegel 8c5c6ad
              
                add kill command and print julia version
              
              
                jkrumbiegel b52c902
              
                print env and runner version
              
              
                jkrumbiegel 903f02a
              
                check readiness of server connection for status
              
              
                jkrumbiegel dc355f9
              
                use info instead of console.log
              
              
                jkrumbiegel e1d9b3c
              
                reorder log statement
              
              
                jkrumbiegel ede0ede
              
                fix transportFile for case where QNR is used from project
              
              
                jkrumbiegel 10106be
              
                refactor server commands
              
              
                jkrumbiegel a20aaba
              
                add workers command and per-worker status info
              
              
                jkrumbiegel 3d0a469
              
                redirect julia server output to logfile
              
              
                jkrumbiegel f264765
              
                add log to file logic to server process and log command
              
              
                jkrumbiegel 0e12d26
              
                print seconds since started worker
              
              
                jkrumbiegel 1d2d7a1
              
                don't print BEGIN END markers for `log` command itself
              
              
                jkrumbiegel 99fb153
              
                Merge branch 'main' into jk/engine-commands
              
              
                jkrumbiegel ed9068f
              
                add logfile arg to windows branch
              
              
                jkrumbiegel 30be04f
              
                Merge branch 'main' into jk/engine-commands
              
              
                jkrumbiegel e6efc6f
              
                Merge branch 'main' into jk/engine-commands
              
              
                jkrumbiegel f4dde36
              
                switch to `quarto call engine julia ...` pattern
              
              
                jkrumbiegel 361ed02
              
                simplify status command by letting QNR do all the work
              
              
                jkrumbiegel 84d8de0
              
                add first basic call julia engine tests
              
              
                jkrumbiegel 6a1fd91
              
                try different dir for qnr
              
              
                jkrumbiegel aa9a5e4
              
                has to be under workspace it seems
              
              
                jkrumbiegel 41a7bed
              
                use update instead of instantiate
              
              
                jkrumbiegel fb3834a
              
                fix env interpolation
              
              
                jkrumbiegel da15709
              
                debug windows issue
              
              
                jkrumbiegel 77ada8f
              
                use bash to set env var on windows also
              
              
                jkrumbiegel f79eb4c
              
                one more bash shell
              
              
                jkrumbiegel d6edb64
              
                assert success with debug info in failure case
              
              
                jkrumbiegel a712663
              
                add second logfile test and factor out stderr/stdout asserts
              
              
                jkrumbiegel b9abf6b
              
                type `writeJuliaCommand` better
              
              
                jkrumbiegel 545f763
              
                add close command to close a worker
              
              
                jkrumbiegel c29036a
              
                add test for closing running worker
              
              
                jkrumbiegel d350699
              
                add command to stop (not kill) the server
              
              
                jkrumbiegel f6acba3
              
                period
              
              
                jkrumbiegel 4fcbd85
              
                add log message when server shuts down
              
              
                jkrumbiegel 49c3653
              
                use `--force` option for `close` instead of separate command
              
              
                jkrumbiegel d109025
              
                add test for force-closing a worker
              
              
                jkrumbiegel f4eaf50
              
                Merge branch 'main' into jk/engine-commands
              
              
                jkrumbiegel 1bbb65a
              
                Merge branch 'main' into jk/engine-commands
              
              
                jkrumbiegel 431f2ab
              
                remove stale comments
              
              
                jkrumbiegel 9e94e8d
              
                throw only one error and don't triple-print ERROR
              
              
                jkrumbiegel 0e27d3d
              
                remove status info code that is now printed by server on julia side
              
              
                jkrumbiegel 650e89d
              
                move julia cache step forward
              
              
                jkrumbiegel dc6da59
              
                add changelog entries
              
              
                jkrumbiegel e77dc76
              
                switch to qnr 0.15 and remove custom branch from CI workflow
              
              
                jkrumbiegel 41526a7
              
                add description for `call`
              
              
                jkrumbiegel 983c60b
              
                slightly reword julia command help strings
              
              
                jkrumbiegel 39ae1c4
              
                Merge branch 'main' into jk/engine-commands
              
              
                jkrumbiegel File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { Command } from "cliffy/command/mod.ts"; | ||
| import { engineCommand } from "../../execute/engine.ts"; | ||
| 
     | 
||
| export const callCommand = new Command() | ||
| .name("call") | ||
| .action(() => { | ||
| callCommand.showHelp(); | ||
| Deno.exit(1); | ||
| }).command("engine", engineCommand); | ||
                
      
                  jkrumbiegel marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -31,6 +31,7 @@ import { pandocBuiltInFormats } from "../core/pandoc/pandoc-formats.ts"; | |
| import { gitignoreEntries } from "../project/project-gitignore.ts"; | ||
| import { juliaEngine } from "./julia.ts"; | ||
| import { ensureFileInformationCache } from "../project/project-shared.ts"; | ||
| import { Command } from "cliffy/command/mod.ts"; | ||
| 
     | 
||
| const kEngines: Map<string, ExecutionEngine> = new Map(); | ||
| 
     | 
||
| 
          
            
          
           | 
    @@ -276,3 +277,30 @@ export function projectIgnoreGlobs(dir: string) { | |
| gitignoreEntries(dir).map((ignore) => `**/${ignore}**`), | ||
| ); | ||
| } | ||
| 
     | 
||
| export const engineCommand = new Command() | ||
| .name("engine") | ||
| .description( | ||
| `Access functionality specific to quarto's different rendering engines.`, | ||
| ) | ||
| .action(() => { | ||
| engineCommand.showHelp(); | ||
| Deno.exit(1); | ||
| }); | ||
| 
     | 
||
| kEngines.forEach((engine, name) => { | ||
| if (engine.populateCommand) { | ||
| const engineSubcommand = new Command(); | ||
| // fill in some default behavior for each engine command | ||
| engineSubcommand | ||
| .description( | ||
| `Access functionality specific to the ${name} rendering engine.`, | ||
| ) | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this. I think that we should let engines have a method to build a response, but that can happen in a different PR.  | 
||
| .action(() => { | ||
| engineSubcommand.showHelp(); | ||
| Deno.exit(1); | ||
| }); | ||
| engine.populateCommand(engineSubcommand); | ||
| engineCommand.command(name, engineSubcommand); | ||
| } | ||
| }); | ||
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.