Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #406 from fetchai/feature/win
Browse files Browse the repository at this point in the history
try add windows to ci
  • Loading branch information
DavidMinarsch authored May 9, 2020
2 parents 0a0e22b + c38bda4 commit 898a068
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 44 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest] #, windows-latest]
python-version: [3.7, 3.8]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]

timeout-minutes: 30

Expand All @@ -87,6 +87,14 @@ jobs:
pip install pipenv
pip install tox
brew install protobuf
- if: matrix.os == 'windows-latest'
name: Install dependencies (windows-latest)
run: |
pip install pipenv
pip install tox
echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64"
choco install protoc
# python scripts/update_symlinks_cross_platform.py
- name: Unit tests
run: |
tox -e py${{ matrix.python-version }} -- -m 'not integration'
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ This is the official list of Fetch.AI authors for copyright purposes.
* Marco Favorito <[email protected]> [MarcoFavorito](https://github.com/MarcoFavorito)
* David Minarsch <[email protected]> [DavidMinarsch](https://github.com/DavidMinarsch)
* Diarmid Campbell <[email protected]> [dishmop](https://github.com/dishmop)
* Aristotelis Triantafyllidis <[email protected]> [Totoual](https://github.com/Totoual)
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ clean-test:
find . -name 'log.*.txt' -exec rm -fr {} +

lint:
black sandbox scripts simulation/v1 tac templates tests
flake8 sandbox scripts simulation/v1 tac templates tests --exclude=tac/gui/static,tac/gui/templates,.md,tac/*_pb2.py,tac/gui/.visdom_env,tac/__init__.py,scripts/oef/launch.py --ignore=E501,E701,W503
black sandbox scripts setup.py simulation/v1 tac templates tests
flake8 sandbox scripts setup.py simulation/v1 tac templates tests --exclude=tac/gui/static,tac/gui/templates,.md,tac/*_pb2.py,tac/gui/.visdom_env,tac/__init__.py,scripts/oef/launch.py --ignore=E501,E701,W503

static:
mypy sandbox scripts simulation/v1 tac templates tests --config-file mypy.ini
mypy sandbox scripts setup.py simulation/v1 tac templates tests --config-file mypy.ini

test-all:
tox
Expand Down
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ ignore_missing_imports = True
[mypy-visdom]
ignore_missing_imports = True

[mypy-setuptools]
ignore_missing_imports = True

[mypy-tac/platform/protocols/tac/tac_pb2]
ignore_errors = True
81 changes: 46 additions & 35 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,73 +18,84 @@
# limitations under the License.
#
# ------------------------------------------------------------------------------
import fileinput

"""Setup of package."""

import glob
import os
import re
import shutil
import subprocess
import sys

from setuptools import setup, find_packages, Command
from setuptools import setup, find_packages
from typing import Dict

PACKAGE_NAME = "tac"

here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, PACKAGE_NAME, '__version__.py'), 'r') as f:
about = {} # type: Dict[str, str]
with open(
os.path.join(here, PACKAGE_NAME, "__version__.py"), "r", encoding="utf-8"
) as f:
exec(f.read(), about)

with open('README.md', 'r') as f:
with open("README.md", "r", encoding="utf-8") as f:
readme = f.read()


extras = {
"gui": [
"flask",
"flask_restful",
"wtforms"
]
}
extras = {"gui": ["flask", "flask_restful", "wtforms"]}

setup(
name=about['__title__'],
description=about['__description__'],
version=about['__version__'],
author=about['__author__'],
url=about['__url__'],
name=about["__title__"],
description=about["__description__"],
version=about["__version__"],
author=about["__author__"],
url=about["__url__"],
long_description=readme,
packages=find_packages(include=["tac*"]),
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
"Environment :: Console",
"Environment :: Web Environment",
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: Unix",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Communications",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: System",
],
install_requires=[
"aea",
"oef",
"colorlog", # TODO 'oef' dependency, to be fixed.
"numpy",
"python-dateutil",
"visdom"
"visdom",
],
tests_require=["tox"],
extras_require=extras,
zip_safe=False,
include_package_data=True,
data_files=[
("sandbox", ["sandbox/docker-compose.yml", "sandbox/config.json", "sandbox/.env"]
+ glob.glob("sandbox/*.py")
+ glob.glob("sandbox/*.sh")),
(
"sandbox",
["sandbox/docker-compose.yml", "sandbox/config.json", "sandbox/.env"]
+ glob.glob("sandbox/*.py")
+ glob.glob("sandbox/*.sh"),
),
("templates/v1", glob.glob("templates/v1/*.py")),
("scripts/oef", glob.glob("scripts/oef/*.json")),
("simulation/v1", glob.glob("simulation/v1/*")),
("oef_search_pluto_scripts", glob.glob("oef_search_pluto_scripts/*.py") + glob.glob("oef_search_pluto_scripts/*.json"))
(
"oef_search_pluto_scripts",
glob.glob("oef_search_pluto_scripts/*.py")
+ glob.glob("oef_search_pluto_scripts/*.json"),
),
],
license=about['__license__'],
license=about["__license__"],
)


20 changes: 16 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ envlist = flake8, mypy, py3.7
skipsdist = False
ignore_basepython_conflict = True

[testenv:py3.6]
basepython = python3.6
whitelist_externals = pipenv
deps =
pytest==5.3.5
pytest-cov==2.8.1
docker

commands =
pipenv install
pytest -rfE --doctest-modules tac tests/ --cov-report=html --cov-report=term --cov=tac {posargs}

[testenv:py3.7]
basepython = python3.7
whitelist_externals = pipenv
Expand Down Expand Up @@ -31,16 +43,16 @@ commands =
deps = flake8==3.7.9
flake8-docstrings==1.5.0
pydocstyle==3.0.0
commands = flake8 tac simulation sandbox scripts templates tests --exclude=tac/gui/static,tac/gui/templates,.md,tac/*_pb2.py,tac/gui/.visdom_env,tac/__init__.py,scripts/oef/launch.py --ignore=E501,E701,W503
commands = flake8 tac simulation sandbox scripts setup.py templates tests --exclude=tac/gui/static,tac/gui/templates,.md,tac/*_pb2.py,tac/gui/.visdom_env,tac/__init__.py,scripts/oef/launch.py --ignore=E501,E701,W503

[testenv:mypy]
deps = mypy
commands = mypy sandbox scripts simulation/v1 tac templates tests --config-file mypy.ini
commands = mypy sandbox scripts setup.py simulation/v1 tac templates tests --config-file mypy.ini

[testenv:black]
deps = black==19.10b0
commands = black sandbox scripts simulation/v1 tac templates tests
commands = black sandbox scripts setup.py simulation/v1 tac templates tests

[testenv:black-check]
deps = black==19.10b0
commands = black sandbox scripts simulation/v1 tac templates tests --check --verbose
commands = black sandbox scripts setup.py simulation/v1 tac templates tests --check --verbose

0 comments on commit 898a068

Please sign in to comment.