Skip to content

Commit

Permalink
Move to codecov CI (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Apr 6, 2020
1 parent 2a16f23 commit f543008
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 39 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,24 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .[testing]
- name: Test with pytest
- name: Run pytest
run: |
pip install pytest
pytest --cov=myst_nb --cov-report=
- name: Upload to coveralls
run: |
pip install coveralls
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_KEY }}
pytest --durations=10 --cov=myst_nb --cov-report=xml --cov-report=term-missing
coverage xml
# - name: Upload to coveralls
# run: |
# pip install coveralls
# coveralls
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_KEY }}
- name: Upload to Codecov
if: matrix.python-version == 3.7 && github.repository == 'ExecutableBookProject/MyST-NB'
uses: codecov/codecov-action@v1
with:
name: myst-nb-pytests-py3.7
flags: pytests
file: ./coverage.xml
fail_ci_if_error: true

publish:

Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,14 @@
extras_require={
"code_style": ["flake8<3.8.0,>=3.7.0", "black", "pre-commit==1.17.0"],
"testing": [
"coverage",
"pytest>=3.6,<4",
"pytest-cov",
"pytest~=5.4",
"pytest-cov~=2.8",
"coverage<5.0",
"pytest-regressions",
"beautifulsoup4",
"matplotlib",
"numpy",
"sympy",
"pandas",
"ipypublish",
],
"rtd": [
"sphinxcontrib-bibtex",
Expand Down
8 changes: 7 additions & 1 deletion tests/notebooks/complex_outputs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
},
"outputs": [],
"source": [
"from ipypublish.scripts.ipynb_latex_setup import *"
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"pd.set_option('display.latex.repr', True)\n",
"import sympy as sym\n",
"sym.init_printing(use_latex=True)\n",
"import numpy as np\n",
"from IPython.display import Image, Latex"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions tests/notebooks/complex_outputs_unrun.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
},
"outputs": [],
"source": [
"from ipypublish import nb_setup\n",
"plt = nb_setup.setup_matplotlib(print_errors=True, output=('svg',))\n",
"pd = nb_setup.setup_pandas(escape_latex=True)\n",
"sym = nb_setup.setup_sympy()\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"pd.set_option('display.latex.repr', True)\n",
"import sympy as sym\n",
"sym.init_printing(use_latex=True)\n",
"import numpy as np\n",
"from IPython.display import Image, Latex"
]
Expand Down
13 changes: 7 additions & 6 deletions tests/test_execute/test_complex_outputs_unrun.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
},
"outputs": [],
"source": [
"from ipypublish import nb_setup\n",
"plt = nb_setup.setup_matplotlib(print_errors=True, output=('svg',))\n",
"pd = nb_setup.setup_pandas(escape_latex=True)\n",
"sym = nb_setup.setup_sympy()\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"pd.set_option('display.latex.repr', True)\n",
"import sympy as sym\n",
"sym.init_printing(use_latex=True)\n",
"import numpy as np\n",
"from IPython.display import Image, Latex"
]
Expand Down Expand Up @@ -429,7 +430,7 @@
"execution_count": 5,
"metadata": {
"filenames": {
"image/png": "/private/var/folders/dm/b2qnkb_n3r72slmpxlfmcjvm00lbnd/T/pytest-of-cjs14/pytest-846/test_complex_outputs_unrun0/source/_build/jupyter_execute/complex_outputs_unrun_22_0.png"
"image/png": "/private/var/folders/dm/b2qnkb_n3r72slmpxlfmcjvm00lbnd/T/pytest-of-cjs14/pytest-27/test_complex_outputs_unrun0/source/_build/jupyter_execute/complex_outputs_unrun_22_0.png"
}
},
"output_type": "execute_result"
Expand Down Expand Up @@ -502,7 +503,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
"version": "3.7.6"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
9 changes: 5 additions & 4 deletions tests/test_execute/test_complex_outputs_unrun.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<CellNode cell_type="code" classes="cell">
<CellInputNode classes="cell_input">
<literal_block xml:space="preserve">
from ipypublish import nb_setup
plt = nb_setup.setup_matplotlib(print_errors=True, output=('svg',))
pd = nb_setup.setup_pandas(escape_latex=True)
sym = nb_setup.setup_sympy()
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.latex.repr', True)
import sympy as sym
sym.init_printing(use_latex=True)
import numpy as np
from IPython.display import Image, Latex
<CellOutputNode classes="cell_output">
Expand Down
9 changes: 5 additions & 4 deletions tests/test_execute/test_complex_outputs_unrun_nbclient.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
},
"outputs": [],
"source": [
"from ipypublish import nb_setup\n",
"plt = nb_setup.setup_matplotlib(print_errors=True, output=('svg',))\n",
"pd = nb_setup.setup_pandas(escape_latex=True)\n",
"sym = nb_setup.setup_sympy()\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"pd.set_option('display.latex.repr', True)\n",
"import sympy as sym\n",
"sym.init_printing(use_latex=True)\n",
"import numpy as np\n",
"from IPython.display import Image, Latex"
]
Expand Down
9 changes: 5 additions & 4 deletions tests/test_execute/test_complex_outputs_unrun_nbclient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<CellNode cell_type="code" classes="cell">
<CellInputNode classes="cell_input">
<literal_block xml:space="preserve">
from ipypublish import nb_setup
plt = nb_setup.setup_matplotlib(print_errors=True, output=('svg',))
pd = nb_setup.setup_pandas(escape_latex=True)
sym = nb_setup.setup_sympy()
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.latex.repr', True)
import sympy as sym
sym.init_printing(use_latex=True)
import numpy as np
from IPython.display import Image, Latex
<CellOutputNode classes="cell_output">
Expand Down
8 changes: 7 additions & 1 deletion tests/test_parser/test_complex_outputs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
<CellNode cell_type="code" classes="cell">
<CellInputNode classes="cell_input">
<literal_block xml:space="preserve">
from ipypublish.scripts.ipynb_latex_setup import *
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.latex.repr', True)
import sympy as sym
sym.init_printing(use_latex=True)
import numpy as np
from IPython.display import Image, Latex
<CellOutputNode classes="cell_output">
<CellOutputBundleNode outputs="0">
<section ids="markdown" names="markdown">
Expand Down
8 changes: 7 additions & 1 deletion tests/test_transform/test_complex_outputs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
<CellNode cell_type="code" classes="cell">
<CellInputNode classes="cell_input">
<literal_block xml:space="preserve">
from ipypublish.scripts.ipynb_latex_setup import *
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.latex.repr', True)
import sympy as sym
sym.init_printing(use_latex=True)
import numpy as np
from IPython.display import Image, Latex
<CellOutputNode classes="cell_output">
<section ids="markdown" names="markdown">
<title>
Expand Down

0 comments on commit f543008

Please sign in to comment.