Skip to content

Add Travis #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
dist: xenial
language: python

cache: apt
before_install:
- sudo apt update
- sudo apt install curl
- sudo apt install nodejs npm
- npm install -g yarn
- sudo curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
- source $HOME/.poetry/env
install:
- bash scripts/install.sh
- bash scripts/build.sh

script: cd $WORK_DIR && eval $TEST_CMD

matrix:
include:
- name: "black"
python: 3.7
env:
- WORK_DIR="./"
- TEST_CMD="black --verbose ."
- name: "flake8"
python: 3.7
env:
- WORK_DIR="src/py"
- TEST_CMD="flake8"
- name: "python-3.6"
python: 3.6
env:
- WORK_DIR="src/py"
- TEST_CMD="pytest"
- name: "python-3.7"
python: 3.7
env:
- WORK_DIR="src/py"
- TEST_CMD="pytest"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# iDOM

<a href="https://travis-ci.org/rmorshea/idom"><img alt="Build Status" src="https://travis-ci.org/rmorshea/idom.svg?branch=master"></a>
<a href="https://github.com/ambv/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://github.com/rmorshea/idom/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-purple.svg"></a>

Libraries for defining and controlling interactive webpages with Python 3.6 and above.

* [Python Documentation](https://github.com/rmorshea/idom/blob/master/idom/py/README.md)
Expand Down
4 changes: 3 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cd idom
set -e

cd src

# clean up possible old install
if [ -d "py/idom/static" ]; then
Expand Down
23 changes: 20 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
cd purly/py
pip install .
cd ../
set -e

# Javascript
# ==========

cd src/js

yarn
yarn setup

cd ../../

# Python
# ======

cd src/py

poetry install

cd ../../
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ if (secure) {
let endpoint = protocol + "//" + url.join("/");

const mount = document.getElementById("root");
ReactDOM.render(<Layout endpoint={"ws://localhost:8765/idom/stream"} />, mount);
ReactDOM.render(<Layout endpoint={endpoint} />, mount);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions idom/py/idom/__init__.py → src/py/idom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"Events",
"Layout",
"node",
"nodes",
"SimpleServer",
"SimpleWebServer",
"State",
Expand Down
2 changes: 1 addition & 1 deletion idom/py/idom/bunch.py → src/py/idom/bunch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections.abc import Mapping, MutableMapping

from typing import Iterator, Tuple, Any
from typing import Iterator, Any


class StaticBunch(Mapping):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.