-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of new GET interpreters, defaults for config R & Pytho…
…n sections and filling in of defaults when deploying. Also added new types and new unit tests.
- Loading branch information
Showing
39 changed files
with
1,268 additions
and
183 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,31 @@ | ||
// Copyright (C) 2025 by Posit Software, PBC. | ||
|
||
import { AxiosInstance } from "axios"; | ||
|
||
import { PythonExecutable, RExecutable } from "../../types/shared"; | ||
import { InterpreterDefaults } from "../types/interpreters"; | ||
|
||
export class Interpreters { | ||
private client: AxiosInstance; | ||
|
||
constructor(client: AxiosInstance) { | ||
this.client = client; | ||
} | ||
|
||
// Returns: | ||
// 200 - success | ||
// 500 - internal server error | ||
get( | ||
dir: string, | ||
r: RExecutable | undefined, | ||
python: PythonExecutable | undefined, | ||
) { | ||
return this.client.get<InterpreterDefaults>(`/interpreters`, { | ||
params: { | ||
dir, | ||
r: r !== undefined ? r.rPath : "", | ||
python: python !== undefined ? python.pythonPath : "", | ||
}, | ||
}); | ||
} | ||
} |
This file contains 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 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 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,10 @@ | ||
// Copyright (C) 2025 by Posit Software, PBC. | ||
|
||
import { PythonConfig, RConfig } from "./configurations"; | ||
|
||
export type InterpreterDefaults = { | ||
python: PythonConfig; | ||
preferredPythonPath: string; | ||
r: RConfig; | ||
preferredRPath: string; | ||
}; |
This file contains 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 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
Oops, something went wrong.