比较提交

...
此合并请求有变更与目标分支冲突。
/gym-unity/setup.py
/ml-agents-envs/setup.py
/ml-agents/setup.py
/.circleci/config.yml

8 次代码提交

作者 SHA1 备注 提交日期
Jonathan Harper 99ea5332 Minor fix to deploy regex 5 年前
Jonathan Harper bf07cc73 Change CircleCI config to support dev releases 5 年前
Jonathan Harper 4cdc7b29 Bump version to 0.11.0.dev0 5 年前
Chris Elion 1df33ed6 fix parameter 5 年前
Chris Elion d2df4c7c fix indent for real 5 年前
Chris Elion d47ba086 fix index 5 年前
Chris Elion 229d0cc3 update setups and config 5 年前
Chris Elion 3dc677ee add VERSION variable to each setup.py 5 年前
共有 4 个文件被更改,包括 161 次插入11 次删除
  1. 29
      gym-unity/setup.py
  2. 30
      ml-agents-envs/setup.py
  3. 37
      ml-agents/setup.py
  4. 76
      .circleci/config.yml

29
gym-unity/setup.py


#!/usr/bin/env python
import os
import sys
from setuptools.command.install import install
VERSION = "0.11.0.dev0"
class VerifyVersionCommand(install):
"""
Custom command to verify that the git tag matches our version
See https://circleci.com/blog/Adding-container-security-scanning-anchore/
"""
description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
version="0.4.8",
version=VERSION,
description="Unity Machine Learning Agents Gym Interface",
license="Apache License 2.0",
author="Unity Technologies",

install_requires=["gym", "mlagents_envs==0.10.1"],
install_requires=["gym", "mlagents_envs=={}".format(VERSION)],
cmdclass={"verify": VerifyVersionCommand},
)

30
ml-agents-envs/setup.py


import os
import sys
from os import path
from setuptools.command.install import install
VERSION = "0.11.0.dev0"
here = os.path.abspath(os.path.dirname(__file__))
here = path.abspath(path.dirname(__file__))
class VerifyVersionCommand(install):
"""
Custom command to verify that the git tag matches our version
See https://circleci.com/blog/Adding-container-security-scanning-anchore/
"""
description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
version="0.10.1",
version=VERSION,
description="Unity Machine Learning Agents Interface",
url="https://github.com/Unity-Technologies/ml-agents",
author="Unity Technologies",

"protobuf>=3.6",
],
python_requires=">=3.5",
cmdclass={"verify": VerifyVersionCommand},
)

37
ml-agents/setup.py


from io import open
import os
import sys
from os import path
from io import open
from setuptools.command.install import install
VERSION = "0.11.0.dev0"
here = os.path.abspath(os.path.dirname(__file__))
class VerifyVersionCommand(install):
"""
Custom command to verify that the git tag matches our version
See https://circleci.com/blog/Adding-container-security-scanning-anchore/
"""
description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
here = path.abspath(path.dirname(__file__))
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
with open(path.join(here, "README.md"), encoding="utf-8") as f:
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
version="0.10.1",
version=VERSION,
description="Unity Machine Learning Agents",
long_description=long_description,
long_description_content_type="text/markdown",

"h5py>=2.9.0",
"jupyter",
"matplotlib",
"mlagents_envs==0.10.1",
"mlagents_envs=={}".format(VERSION),
"numpy>=1.13.3,<2.0",
"Pillow>=4.2.1",
"protobuf>=3.6",

],
python_requires=">=3.6.1",
entry_points={"console_scripts": ["mlagents-learn=mlagents.trainers.learn:main"]},
cmdclass={"verify": VerifyVersionCommand},
)

76
.circleci/config.yml


path: /tmp/proto.patch
destination: proto.patch
deploy:
parameters:
directory:
type: string
description: Local directory to use for publishing (e.g. ml-agents)
docker:
- image: circleci/python:3.6
steps:
- checkout
- run:
name: install python dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install setuptools wheel twine
- run:
name: verify git tag vs. version
command: |
python3 -m venv venv
. venv/bin/activate
cd << parameters.directory >>
python setup.py verify
- run:
name: init .pypirc
# TODO update username for final release
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = mlagents-test" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- run:
# TODO example doesn't use venv here but I think we need it
name: create packages
command: |
. venv/bin/activate
cd << parameters.directory >>
python setup.py sdist
python setup.py bdist_wheel
- run:
name: upload to pypi
# TODO remove --repository-url for final release
command: |
. venv/bin/activate
cd << parameters.directory >>
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
workflows:
workflow:
jobs:

pip_constraints: test_constraints_max_version.txt
- markdown_link_check
- protobuf_generation_check
- deploy:
name: deploy ml-agents-envs
directory: ml-agents-envs
requires:
- python_3.7.3
filters:
tags:
only: /[0-9]+(\.[0-9]+)*(\.dev[0-9]+)*/
branches:
ignore: /.*/
- deploy:
name: deploy ml-agents
directory: ml-agents
requires:
- python_3.7.3
filters:
tags:
only: /[0-9]+(\.[0-9]+)*(\.dev[0-9]+)*/
branches:
ignore: /.*/
- deploy:
name: deploy gym-unity
directory: gym-unity
requires:
- python_3.7.3
filters:
tags:
only: /[0-9]+(\.[0-9]+)*(\.dev[0-9]+)*/
branches:
ignore: /.*/
正在加载...
取消
保存