Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklise committed Nov 20, 2023
1 parent d7f42d1 commit 12cb2cc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
62 changes: 31 additions & 31 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,33 @@ jobs:
name: chama_${{ matrix.python-version }}_${{ matrix.os }}.whl
path: dist/chama*

#test:
# name: Import test
# needs: build
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
# os: [ubuntu-latest]
# steps:
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Download wheel
# uses: actions/download-artifact@v3
# with:
# name: wheel
# - name: Install chama
# run: |
# python -m pip install --upgrade pip
# pip install wheel
# pip install --find-links=. chama
# - name: Import test
# run: |
# python -c "import chama"
install:
name: Import test
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest]
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download wheel
uses: actions/download-artifact@v3
with:
name: wheel
- name: Install chama
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --find-links=. chama
- name: Import test
run: |
python -c "import chama"
create_coverage_reports:
pytest_coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -106,8 +106,8 @@ jobs:
name: coverage
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }}

combine_reports:
needs: [ create_coverage_reports ]
coverage_reports:
needs: [ pytest_coverage ]
runs-on: ubuntu-latest
steps:
- name: Set up Python
Expand All @@ -120,7 +120,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coveralls
python setup.py develop
python -m pip install -e .
- name: Download coverage artifacts from test matrix
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -151,8 +151,8 @@ jobs:
name: coverage
path: htmlcov

combine_reports_upload_coveralls:
needs: [ create_coverage_reports ]
coveralls:
needs: [ pytest_coverage ]
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand Down
12 changes: 6 additions & 6 deletions chama/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
try:
import matplotlib.pyplot as plt
from matplotlib import ticker
from matplotlib.patches import Circle
from matplotlib.collections import PatchCollection
from matplotlib.animation import FuncAnimation
except:
plt = None

Expand All @@ -21,8 +24,8 @@
from chama.sensors import Mobile


def signal_convexhull(signal, scenarios, threshold, timesteps=None,
colormap=None,
def signal_convexhull(signal, scenarios, threshold, timesteps=None,
colormap=None,
x_range=(None, None), y_range=(None, None),
z_range=(None, None)):
"""
Expand Down Expand Up @@ -318,13 +321,10 @@ def circles(x, y, s, c='b', vmin=None, vmax=None, **kwargs):

if plt is None:
raise ImportError('matplotlib is required for graphics')

buffer = puff['sigmaY'].max() + puff['sigmaY'].max()/5
x_range = (puff['X'].min() - buffer, puff['X'].max() + buffer)
y_range = (puff['Y'].min() - buffer, puff['Y'].max() + buffer)

from matplotlib.patches import Circle, Ellipse, Rectangle
from matplotlib.collections import PatchCollection
from matplotlib.animation import FuncAnimation, FFMpegWriter

fig, ax = plt.subplots()
# ln, = plt.plot([],[],animated=True)
Expand Down

0 comments on commit 12cb2cc

Please sign in to comment.