Skip to content
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

Move to codecov #133

Merged
merged 11 commits into from
Apr 6, 2020
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
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