various CI updates

This commit is contained in:
Dima Gerasimov 2020-01-24 10:37:42 +00:00 committed by Dmitrii Gerasimov
parent 7d56d85731
commit 6787c9c0d6
5 changed files with 25 additions and 11 deletions

View file

@ -8,9 +8,6 @@ jobs:
steps:
- checkout
- run: ./demo.py
# TODO need to keep full mycfg.py as example? to dummy run CI
- run: python3 -m pip install --user tox
- run: python3 -m tox

View file

@ -50,7 +50,7 @@ pages = my.hypothesis.get_pages()
from itertools import islice
for page in islice(pages, 0, 8):
print('URL: ' + page.link)
print('URL: ' + page.url)
print('Title: ' + page.title)
print('{} annotations'.format(len(page.highlights)))
print()

View file

@ -2,6 +2,8 @@ from typing import Callable, Union, List
from mycfg import paths
from mycfg.repos.kobuddy.src.kobuddy import *
# hmm, explicit imports make pylint a bit happier..
from mycfg.repos.kobuddy.src.kobuddy import Highlight, set_databases, get_highlights
set_databases(paths.kobuddy.export_dir)

View file

@ -226,8 +226,11 @@ def predicate(sleep: SleepEntry):
def plot():
# TODO FIXME melatonin data
melatonin_data = {}
# TODO ??
sleeps = lfilter(predicate, sleeps)
sleeps = list(filter(predicate, load_sleeps()))
sleeps_count = len(sleeps)
print(sleeps_count)
@ -236,7 +239,7 @@ def plot():
axarr = fig.subplots(nrows=len(sleeps))
for i, (sleep, axes) in enumerate(zip(sleeps, axarr)):
plot_one(sleep, fig, axes, showtext=True)
used = dt.get(sleep.date_, None)
used = melatonin_data.get(sleep.date_, None)
sused: str
color: str
# used = True if used is None else False # TODO?

22
tox.ini
View file

@ -16,6 +16,15 @@ commands =
# TODO e.g. under CI, rely on installing
[testenv:demo]
# TODO wtf????
changedir = {toxworkdir}/{envname}/../..
# TODO not sure?? also reuse installed my. instead on installing in demo.py?
skip_install = true
# TODO need to keep full mycfg.py as example? to dummy run CI
commands = ./demo.py
# [testenv:mypy]
# skip_install = true
# commands =
@ -23,8 +32,11 @@ commands =
# python -m mypy --check-untyped src/cachew
# [testenv:pylint]
# skip_install = true
# commands =
# pip install -e .[testing]
# python -m pylint -E src/cachew
[testenv:pylint]
# TODO wtf????
changedir = {toxworkdir}/{envname}/../..
skip_install = true
commands =
pip install -e .[testing]
# for now ignore import errors until I figure out how to import everything for CI checking..
python -m pylint -E -d import-error my