Skip to content

Commit c1a8608

Browse files
author
Chris Elion
authored
ML-Agents Extensions package (#4105)
* extensions package first pass * add extensions test to yamato * cleanup docs folder * triggers and pack * yamato - different jobs for each package * disable coverage checks for extensions * trigger * Unity Companion License
1 parent e6ca333 commit c1a8608

40 files changed

+392
-18
lines changed

.yamato/com.unity.ml-agents-pack.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
pack:
2-
name: Pack
1+
packages:
2+
- name: com.unity.ml-agents
3+
- name: com.unity.ml-agents.extensions
4+
---
5+
6+
{% for package in packages %}
7+
pack_{{ package.name }}:
8+
name: Pack {{ package.name }}
39
agent:
410
type: Unity::VM::osx
511
image: package-ci/mac:stable
612
flavor: b1.small
713
commands:
814
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
9-
- upm-ci package pack --package-path com.unity.ml-agents
15+
- upm-ci package pack --package-path {{ package.name }}
1016
artifacts:
1117
packages:
1218
paths:
1319
- "upm-ci~/packages/**/*"
1420
triggers:
1521
cancel_old_ci: true
22+
{% endfor %}

.yamato/com.unity.ml-agents-test.yml

+28-12
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ test_platforms:
2929
type: Unity::VM
3030
image: package-ci/ubuntu:stable
3131
flavor: b1.medium
32+
packages:
33+
- name: com.unity.ml-agents
34+
- name: com.unity.ml-agents.extensions
3235
---
3336

3437
all_package_tests:
@@ -51,24 +54,28 @@ all_package_tests:
5154
- branch: master
5255
frequency: daily
5356

54-
{% for editor in test_editors %}
55-
{% for platform in test_platforms %}
56-
test_{{ platform.name }}_{{ editor.version }}:
57-
name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
57+
{% for package in packages %}
58+
{% for editor in test_editors %}
59+
{% for platform in test_platforms %}
60+
test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
61+
name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
5862
agent:
5963
type: {{ platform.type }}
6064
image: {{ platform.image }}
6165
flavor: {{ platform.flavor}}
6266
commands:
6367
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
64-
- upm-ci package test -u {{ editor.version }} --package-path com.unity.ml-agents {{ editor.coverageOptions }}
68+
- upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} {{ editor.coverageOptions }}
69+
{% if package.name == "com.unity.ml-agents" %}
70+
# TODO get coverage tests running for extensions too
6571
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
72+
{% endif %}
6673
artifacts:
6774
logs:
6875
paths:
6976
- "upm-ci~/test-results/**/*"
7077
dependencies:
71-
- .yamato/com.unity.ml-agents-pack.yml#pack
78+
- .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }}
7279
triggers:
7380
cancel_old_ci: true
7481
{% if platform.name == "mac" %}
@@ -77,15 +84,20 @@ test_{{ platform.name }}_{{ editor.version }}:
7784
pull_request.target match "release.+") AND
7885
NOT pull_request.draft AND
7986
(pull_request.changes.any match "com.unity.ml-agents/**" OR
87+
{% if package.name == "com.unity.ml-agents" %}
88+
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
89+
{% endif %}
8090
pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml")
8191
{% endif %}
92+
{% endfor %}
8293
{% endfor %}
8394
{% endfor %}
8495

85-
{% for editor in trunk_editor %}
86-
{% for platform in test_platforms %}
87-
test_{{ platform.name }}_trunk:
88-
name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
96+
{% for package in packages %}
97+
{% for editor in trunk_editor %}
98+
{% for platform in test_platforms %}
99+
test_{{ package.name }}_{{ platform.name }}_trunk:
100+
name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
89101
agent:
90102
type: {{ platform.type }}
91103
image: {{ platform.image }}
@@ -94,15 +106,19 @@ test_{{ platform.name }}_trunk:
94106
- python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple
95107
- unity-downloader-cli -u trunk -c editor --wait --fast
96108
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
97-
- upm-ci package test -u {{ editor.version }} --package-path com.unity.ml-agents {{ editor.coverageOptions }}
109+
- upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} {{ editor.coverageOptions }}
110+
{% if package.name == "com.unity.ml-agents" %}
111+
# TODO get coverage tests running for extensions too
98112
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
113+
{% endif %}
99114
artifacts:
100115
logs:
101116
paths:
102117
- "upm-ci~/test-results/**/*"
103118
dependencies:
104-
- .yamato/com.unity.ml-agents-pack.yml#pack
119+
- .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }}
105120
triggers:
106121
cancel_old_ci: true
107122
{% endfor %}
108123
{% endfor %}
124+
{% endfor %}

.yamato/standalone-build-test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ test_mac_standalone_{{ editor.version }}:
2424
pull_request.target match "release.+") AND
2525
NOT pull_request.draft AND
2626
(pull_request.changes.any match "com.unity.ml-agents/**" OR
27+
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
2728
pull_request.changes.any match ".yamato/standalone-build-test.yml") AND
2829
NOT pull_request.changes.all match "**/*.md"
2930
artifacts:

.yamato/training-int-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ test_mac_training_int_{{ editor.version }}:
2828
pull_request.target match "release.+") AND
2929
NOT pull_request.draft AND
3030
(pull_request.changes.any match "com.unity.ml-agents/**" OR
31+
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
3132
pull_request.changes.any match "Project/**" OR
3233
pull_request.changes.any match "ml-agents/**" OR
3334
pull_request.changes.any match "ml-agents-envs/**" OR

DevProject/Packages/manifest.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"com.unity.ide.rider": "1.1.4",
1010
"com.unity.ide.vscode": "1.1.4",
1111
"com.unity.ml-agents": "file:../../com.unity.ml-agents",
12+
"com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions",
1213
"com.unity.multiplayer-hlapi": "1.0.4",
1314
"com.unity.package-manager-doctools": "1.1.1-preview.3",
1415
"com.unity.package-validation-suite": "0.11.0-preview",
@@ -53,6 +54,7 @@
5354
},
5455
"registry": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates",
5556
"testables": [
56-
"com.unity.ml-agents"
57+
"com.unity.ml-agents",
58+
"com.unity.ml-agents.extensions"
5759
]
5860
}

Project/Packages/manifest.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"com.unity.analytics": "3.2.3",
55
"com.unity.collab-proxy": "1.2.15",
66
"com.unity.ml-agents": "file:../../com.unity.ml-agents",
7+
"com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions",
78
"com.unity.package-manager-ui": "2.0.8",
89
"com.unity.package-validation-suite": "0.7.15-preview",
910
"com.unity.purchasing": "2.0.3",
@@ -40,6 +41,7 @@
4041
"com.unity.modules.xr": "1.0.0"
4142
},
4243
"testables": [
43-
"com.unity.ml-agents"
44+
"com.unity.ml-agents",
45+
"com.unity.ml-agents.extensions"
4446
]
4547
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
artifacts/**
2+
build/**
3+
.build_script/**
4+
node_modules/**
5+
.DS_Store
6+
.npmrc
7+
!Documentation~
8+
!.Documentation
9+
npm-debug.log
10+
build.sh.meta
11+
build.bat.meta
12+
.idea/
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
artifacts/**
2+
build/**
3+
.build_script/**
4+
node_modules/**
5+
Documentation/ApiDocs/**
6+
Documentation~/ApiDocs/**
7+
.DS_Store
8+
.npmrc
9+
.npmignore
10+
.gitignore
11+
CONTRIBUTING.md
12+
CONTRIBUTING.md.meta
13+
QAReport.md
14+
QAReport.md.meta
15+
.gitlab-ci.yml
16+
build.sh
17+
build.sh.meta
18+
build.bat
19+
build.bat.meta
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
All notable changes to this package will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
* Initial version

com.unity.ml-agents.extensions/CHANGELOG.md.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# About ML-Agents Extensions package (`com.unity.ml-agents.extensions`)
2+
3+
The Unity ML-Agents Extensions package optional add-ons to the C# SDK for the
4+
[Unity ML-Agents Toolkit](https://github.com/Unity-Technologies/ml-agents).
5+
6+
These extensions are all considered experimental, and their API or behavior
7+
may change between versions.
8+
9+
10+
## Package contents
11+
12+
The following table describes the package folder structure:
13+
14+
| **Location** | **Description** |
15+
| ---------------- | ---------------------------------------------------------------------- |
16+
| _Documentation~_ | Contains the documentation for the Unity package. |
17+
| _Editor_ | Contains utilities for Editor windows and drawers. |
18+
| _Runtime_ | Contains core C# APIs for integrating ML-Agents into your Unity scene. |
19+
| _Tests_ | Contains the unit tests for the package. |
20+
21+
<a name="Installation"></a>
22+
23+
## Installation
24+
25+
To install this _ML-Agents_ package, follow the instructions in the [Package
26+
Manager documentation](https://docs.unity3d.com/Manual/upm-ui-install.html).
27+
28+
29+
## Requirements
30+
31+
This version of the Unity ML-Agents Extensions package is compatible with the
32+
following versions of the Unity Editor:
33+
34+
- 2018.4 and later
35+
36+
## Known Limitations
37+

com.unity.ml-agents.extensions/Editor.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using Unity.MLAgents;
2+
3+
namespace Unity.MLAgents.Extensions.Editor
4+
{
5+
6+
}

com.unity.ml-agents.extensions/Editor/EditorExample.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Unity.ML-Agents.Extensions.Editor",
3+
"references": [
4+
"Unity.ML-Agents.Extensions"
5+
],
6+
"includePlatforms": [
7+
"Editor"
8+
],
9+
"excludePlatforms": []
10+
}

com.unity.ml-agents.extensions/Editor/Unity.ML-Agents.Extensions.Editor.asmdef.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
com.unity.ml-agents.extensions copyright © 2020 Unity Technologies
2+
3+
Licensed under the Unity Companion License for Unity-dependent projects -- see
4+
[Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
5+
6+
Unless expressly provided otherwise, the Software under this license is made
7+
available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8+
IMPLIED. Please review the license for details on these and other terms and
9+
conditions.

com.unity.ml-agents.extensions/LICENSE.md.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ML-Agents Extensions
2+
3+
This is a source-only package for new features based on ML-Agents.

com.unity.ml-agents.extensions/README.md.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

com.unity.ml-agents.extensions/Runtime.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using Unity.MLAgents;
2+
3+
namespace Unity.MLAgents.Extensions
4+
{
5+
6+
}

com.unity.ml-agents.extensions/Runtime/RuntimeExample.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Unity.ML-Agents.Extensions",
3+
"references": [
4+
"Unity.Barracuda",
5+
"Unity.ML-Agents"
6+
],
7+
"includePlatforms": [],
8+
"excludePlatforms": []
9+
}

com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

com.unity.ml-agents.extensions/Tests.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"createSeparatePackage": false
3+
}

0 commit comments

Comments
 (0)