Skip to content
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

top module as docs #10538

Merged
merged 7 commits into from
Jun 22, 2022
Merged

top module as docs #10538

merged 7 commits into from
Jun 22, 2022

Conversation

rebornix
Copy link
Member

Re #10152

This PR covers the discussion we had in yesterday's standup: top level files for both core utilities and living docs. It introduces:

  • src/commands.ts, which includes all the typings for command names and types for return result.
  • src/telemetry.ts, which includes all the typings for telemetry event names and value types.
    • the telemetry helper functions are now moved into src/platform/telemetry, they are not allowed to import typings from other top components but only serve as helper utilities

We would use these two files as living docs and type checking for command execution and telemetry. For telemetry, we might want to move towards VS Code's tooling and break it down, and when that happens, we will only keep src/platform/telemetry.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for feature-requests.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).

@rebornix rebornix requested a review from a team as a code owner June 22, 2022 18:58
@rebornix rebornix self-assigned this Jun 22, 2022
@@ -13,12 +13,12 @@ import {
Uri,
ViewColumn
} from 'vscode';
import { IShowDataViewerFromVariablePanel } from '../../messageTypes';
Copy link
Member Author

Choose a reason for hiding this comment

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

There are 59 file modified but most of them are import path changes and file movement.

@@ -1,13 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
Copy link
Member Author

Choose a reason for hiding this comment

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

In followup PRs, I would probably move these files to where they should be. For example, sendStartupTelemetry is only used by extension.ts so it should not sit in platform as it's not used by anyone else.

import { SelectJupyterUriCommandSource } from './kernels/jupyter/serverSelector';
import { TerminalShellType } from './platform/terminals/types';

export * from './platform/telemetry/index';
Copy link
Member Author

Choose a reason for hiding this comment

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

We would move some of the functions into this file from platform/telemetry/index instead of re-export in following PRs.

@rebornix rebornix changed the title Rebornix/top module as docs top module as docs Jun 22, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2022

Codecov Report

Merging #10538 (ea87a14) into main (f274826) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##            main   #10538   +/-   ##
======================================
- Coverage     71%      71%   -1%     
======================================
  Files        465      465           
  Lines      27905    27905           
  Branches    4699     4699           
======================================
- Hits       19843    19826   -17     
- Misses      6188     6202   +14     
- Partials    1874     1877    +3     
Impacted Files Coverage Δ
src/interactive-window/commands/commandRegistry.ts 34% <ø> (ø)
src/platform/common/application/commandManager.ts 64% <ø> (ø)
src/platform/common/application/types.ts 100% <ø> (ø)
src/platform/common/types.ts 100% <ø> (ø)
src/platform/telemetry/constants.ts 100% <ø> (ø)
src/platform/terminals/types.ts 100% <ø> (ø)
src/standalone/import-export/exportCommands.ts 44% <ø> (ø)
src/webviews/extension-side/dataviewer/types.ts 100% <ø> (ø)
src/extension.node.ts 76% <100%> (ø)
src/kernels/helpers.ts 62% <100%> (ø)
... and 42 more

@rebornix rebornix merged commit 5b7e66d into main Jun 22, 2022
@rebornix rebornix deleted the rebornix/top-module-as-docs branch June 22, 2022 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants