浏览代码

update table code, whitelist future tags (#3887)

* update table code, whitelist future tags

* add 0.15.1 back
/release_1_branch
GitHub 5 年前
当前提交
ad48def9
共有 3 个文件被更改,包括 66 次插入26 次删除
  1. 7
      README.md
  2. 4
      markdown-link-check.full.json
  3. 81
      utils/make_readme_table.py

7
README.md


* Train using concurrent Unity environment instances
## Releases & Documentation
**Our latest, stable release is 0.15.1. Click
[here](https://github.com/Unity-Technologies/ml-agents/tree/latest_release/docs/Readme.md) to
**Our latest, stable release is `Release 1`. Click [here](docs/Readme.md) to
get started with the latest release of ML-Agents.**
The table below lists all our releases, including our `master` branch which is under active

| **Version** | **Release Date** | **Source** | **Documentation** | **Download** |
|:-------:|:------:|:-------------:|:-------:|:------------:|
| **master (unstable)** | -- | [source](https://github.com/Unity-Technologies/ml-agents/tree/master) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/master/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/master.zip) |
| **0.15.1** | **March 30, 2020** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/0.15.1)** | **[docs](https://github.com/Unity-Technologies/ml-agents/tree/0.15.1/docs/Readme.md)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/0.15.1.zip)** |
| **Release 1** | **April 30, 2020** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/release_1)** | **[docs](https://github.com/Unity-Technologies/ml-agents/tree/release_1/docs/Readme.md)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/release_1.zip)** |
| **0.15.1** | March 30, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.15.1) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.15.1/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.15.1.zip) |
| **0.15.0** | March 18, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.15.0) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.15.0/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.15.0.zip) |
| **0.14.1** | February 26, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.14.1) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.14.1/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.14.1.zip) |
| **0.14.0** | February 13, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.14.0) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.14.0/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.14.0.zip) |

| **0.12.0** | December 2, 2019 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.12.0) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.12.0/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.12.0.zip) |
| **0.11.0** | November 4, 2019 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.11.0) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.11.0/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.11.0.zip) |
## Citation

4
markdown-link-check.full.json


"comment": "Requires login"
},
{
"pattern": "^https?://bair.berkeley.edu",
"comment": "Temporary berkeley outage"
"pattern": "https://github.com/Unity-Technologies/ml-agents/(tree|archive)/release_[0-9]+.*",
"comment": "Whitelist future release tags"
}
]
}

81
utils/make_readme_table.py


"""
from distutils.version import LooseVersion
from datetime import datetime
from typing import NamedTuple
def table_line(display_name, name, date, bold=False):

class ReleaseInfo(NamedTuple):
release_tag: str
csharp_version: str
python_verion: str
release_date: str
@staticmethod
def from_simple_tag(release_tag: str, release_date: str) -> "ReleaseInfo":
"""
Generate the ReleaseInfo for "old style" releases, where the tag and versions
were all the same.
"""
return ReleaseInfo(release_tag, release_tag, release_tag, release_date)
@property
def loose_version(self) -> LooseVersion:
return LooseVersion(self.python_verion)
@property
def elapsed_days(self) -> int:
"""
Days since this version was released.
:return:
"""
return (
datetime.today() - datetime.strptime(self.release_date, "%B %d, %Y")
).days
@property
def display_name(self) -> str:
"""
Clean up the tag name for display, e.g. "release_1" -> "Release 1"
:return:
"""
return self.release_tag.replace("_", " ").title()
["0.10.0", "September 30, 2019"],
["0.10.1", "October 9, 2019"],
["0.11.0", "November 4, 2019"],
["0.12.0", "December 2, 2019"],
["0.12.1", "December 11, 2019"],
["0.13.0", "January 8, 2020"],
["0.13.1", "January 21, 2020"],
["0.14.0", "February 13, 2020"],
["0.14.1", "February 26, 2020"],
["0.15.0", "March 18, 2020"],
["0.15.1", "March 30, 2020"],
ReleaseInfo.from_simple_tag("0.10.0", "September 30, 2019"),
ReleaseInfo.from_simple_tag("0.10.1", "October 9, 2019"),
ReleaseInfo.from_simple_tag("0.11.0", "November 4, 2019"),
ReleaseInfo.from_simple_tag("0.12.0", "December 2, 2019"),
ReleaseInfo.from_simple_tag("0.12.1", "December 11, 2019"),
ReleaseInfo.from_simple_tag("0.13.0", "January 8, 2020"),
ReleaseInfo.from_simple_tag("0.13.1", "January 21, 2020"),
ReleaseInfo.from_simple_tag("0.14.0", "February 13, 2020"),
ReleaseInfo.from_simple_tag("0.14.1", "February 26, 2020"),
ReleaseInfo.from_simple_tag("0.15.0", "March 18, 2020"),
ReleaseInfo.from_simple_tag("0.15.1", "March 30, 2020"),
ReleaseInfo("release_1", "1.0.0", "0.16.0", "April 30, 2020"),
sorted_versions = sorted(
([LooseVersion(v[0]), v[1]] for v in versions), key=lambda x: x[0], reverse=True
)
sorted_versions = sorted(versions, key=lambda x: x.loose_version, reverse=True)
for version_name, version_date in sorted_versions:
elapsed_days = (
datetime.today() - datetime.strptime(version_date, "%B %d, %Y")
).days
if elapsed_days <= MAX_DAYS:
print(table_line(version_name, version_name, version_date, highlight))
for version_info in sorted_versions:
if version_info.elapsed_days <= MAX_DAYS:
print(
table_line(
version_info.display_name,
version_info.release_tag,
version_info.release_date,
highlight,
)
)
highlight = False # only bold the first stable release
正在加载...
取消
保存