-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Move aiops-utils package to x-pack/packages/ml. (#134985)
When we created the `aiops-utils` package originally, we were not aware that packages could also live within `x-pack`. Since `aiops` is a platinum feature and maintained by the ML team, this moves the package from `/packages` to `/x-pack/packages/ml`. The license header of the package files now match the `aiops` plugin again.
- Loading branch information
Showing
30 changed files
with
80 additions
and
1,042 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ export function findPlugins(): PluginOrPackage[] { | |
*/ | ||
export function findPackages(): PluginOrPackage[] { | ||
const packagePaths = globby | ||
.sync(Path.resolve(REPO_ROOT, 'packages/**/package.json'), { absolute: true }) | ||
.sync(Path.resolve(REPO_ROOT, '{x-pack/,}packages/**/package.json'), { absolute: true }) | ||
.map((path) => | ||
// absolute paths returned from globby are using normalize or | ||
// something so the path separators are `/` even on windows, | ||
|
@@ -59,15 +59,22 @@ export function findPackages(): PluginOrPackage[] { | |
scope = ApiScope.CLIENT; | ||
} | ||
|
||
let ownerName = '[Owner missing]'; | ||
// Some of these author fields have "<[email protected]>" in the name which mdx chokes on. Removing the < and > seems to work. | ||
if (Array.isArray(manifest.author)) { | ||
ownerName = manifest.author.map((d) => d.replace(/[<>]/gi, '')).join(', '); | ||
} else if (typeof manifest.author === 'string') { | ||
ownerName = manifest.author.replace(/[<>]/gi, ''); | ||
} | ||
|
||
acc.push({ | ||
directory: Path.dirname(path), | ||
manifestPath: path, | ||
manifest: { | ||
...manifest, | ||
id: manifest.name, | ||
serviceFolders: [], | ||
// Some of these author fields have "<[email protected]>" in the name which mdx chokes on. Removing the < and > seems to work. | ||
owner: { name: manifest.author?.replace(/[<>]/gi, '') || '[Owner missing]' }, | ||
owner: { name: ownerName }, | ||
}, | ||
isPlugin: false, | ||
scope, | ||
|
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 |
---|---|---|
@@ -1,32 +1,5 @@ | ||
# @kbn/ml-agg-utils | ||
|
||
This package includes utility functions provided by the ML team to be used in Kibana plugins related to data manipulation and verification. | ||
This package includes utility functions related to creating elasticsearch aggregation queries, data manipulation and verification. | ||
|
||
<!-- INSERT GENERATED DOCS START --> | ||
|
||
### `buildSamplerAggregation` (function) | ||
|
||
Wraps the supplied aggregations in a sampler aggregation. | ||
A supplied samplerShardSize (the shard_size parameter of the sampler aggregation) | ||
of less than 1 indicates no sampling, and the aggs are returned as-is. | ||
|
||
**Parameters:** | ||
|
||
- aggs (`any`) | ||
- samplerShardSize (`number`) | ||
|
||
**returns:** Record<string, AggregationsAggregationContainer> | ||
|
||
### `getSamplerAggregationsResponsePath` (function) | ||
|
||
**Parameters:** | ||
|
||
- samplerShardSize (`number`) | ||
|
||
**returns:** string[] | ||
|
||
### `getAggIntervals` (function) | ||
|
||
Returns aggregation intervals for the supplied document fields. | ||
|
||
<!-- INSERT GENERATED DOCS END --> | ||
https://docs.elastic.dev/kibana-dev-docs/api/kbn-ml-agg-utils |
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 |
---|---|---|
@@ -1,13 +1,10 @@ | ||
{ | ||
"name": "@kbn/ml-agg-utils", | ||
"description": "This package includes utility functions related to creating elasticsearch aggregation queries, data manipulation and verification.", | ||
"author": "Machine Learning UI", | ||
"homepage": "https://docs.elastic.dev/kibana-dev-docs/api/kbn-ml-agg-utils", | ||
"private": true, | ||
"version": "1.0.0", | ||
"main": "./target_node/index.js", | ||
"license": "SSPL-1.0 OR Elastic License 2.0", | ||
"devDependencies": { | ||
"ts-readme": "^1.1.3" | ||
}, | ||
"scripts": { | ||
"generate-docs": "ts-readme src/index.ts" | ||
} | ||
"license": "SSPL-1.0 OR Elastic License 2.0" | ||
} |
Oops, something went wrong.