-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Adding interfaces for datascience work (#1) #2688
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
Conversation
* working without inversify * Working command with service manager * Initial interfaces
This is just a skeleton of the work we're starting. I imagine we'll be make a ton more changes like this and then we'll take all of them together into master at a later date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing jumpus out at me, but Don or anyone else on the team may know better. ;)
|
||
@injectable() | ||
export class DataScience implements IDataScience { | ||
constructor(@inject(ICommandManager) private commandManager: ICommandManager, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I've already changed this in my upcoming checkin to instead just inject the service manager and then get the various services that we need off of that.
@@ -105,6 +107,10 @@ export async function activate(context: ExtensionContext): Promise<IExtensionApi | |||
const lintingEngine = serviceManager.get<ILintingEngine>(ILintingEngine); | |||
lintingEngine.linkJupiterExtension(jupyterExtension).ignoreErrors(); | |||
|
|||
// Activate the data science features | |||
const dataScience = serviceManager.get<IDataScience>(IDataScience); | |||
await dataScience.activate(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this needs to be awaited
.
We need to be careful what happens with the extension activation. At the end of the day, this impacts the time taken for the extension to load, i.e. the time the user has to wait before one can use the extension (intellisense, etc).
Suggestion:
- In the extension activate method (in
extensions.ts
file), do not await instead do as follows (i.e. invokeactivate
but do not wait for it to complete:
dataScience.activate(context).ignoreErrors()` - If you need you can add your error logging in the
DataScience.activte
method as follows:
@log('Starting Data Science')
public async activate(context: ExtensionContext): Promise<void> {
this.registerCommands();
}
This will add the necessary logging (trace and exceptions).
Please update your branch with latest master to get the log
decorator.
For some reason, the Try installing using We need to ensure Suggestion:
|
Apologies for the late review. |
Working command with service manager
Initial interfaces
Has a news entry file (remember to thank yourself!)Has unit tests & system/integration testspackage.json
are pinned (e.g."1.2.3"
, not"^1.2.3"
for the specified version)package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed)