Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
upgrade version number + history
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 31, 2020
1 parent 6641ff6 commit 934998e
Show file tree
Hide file tree
Showing 37 changed files with 256 additions and 240 deletions.
20 changes: 19 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,27 @@
History
=======

current - 2020-07-09 - 0.00Mb
current - 2020-12-31 - 0.00Mb
=============================

* `314`: fixes function _process_notebooks_in_private for newer version of nbconvert + missing file rst.tpl (2020-12-31)
* `323`: Add function assert_almost_equal_detailed with more feedback (2020-12-10)
* `322`: Implements function testlog to log information around a test function (2020-11-14)
* `320`: Fix notebook links on github when inserted into the documentation (2020-11-11)
* `321`: svg2png fails after cairosvg update (2020-11-11)
* `318`: Add function to download url content in a folder and a local link from it (2020-10-11)
* `310`: Add common interface to retrieve password with keyring (2020-10-11)
* `312`: use twine to publish a package (2020-10-11)
* `317`: fLOG shoud return the first object sent as argument (2020-09-30)
* `316`: Fix issue when image name for .. image:: is a pattern (2020-09-22)
* `315`: Small fix for nbconvert 6.0.3 (2020-09-14)
* `311`: Bump node-sass from 3.13.1 to 4.14.1 in /src/pyquickhelper/sphinxext/revealjs/templates/revealjs/static (2020-09-05)
* `313`: Update reveal.js (2020-09-05)
* `309`: Add option linenos to extension runpython (2020-07-17)

1.9.3418 - 2020-07-09 - 2.06Mb
==============================

* `307`: Add a function to plot a graph on a matplotlib (2020-07-07)
* `306`: Remove numpydoc added by default, it fails with other extensions (2020-06-28)
* `305`: docassert does not work on numpydoc (2020-06-23)
Expand Down
2 changes: 1 addition & 1 deletion _doc/sphinxdoc/source/phdoc_static/my-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ div.body ul {
}

div.body li {
line-height: 1em;
line-height: 1.2em;
}

.wy-nav-top {
Expand Down
13 changes: 10 additions & 3 deletions _doc/sphinxdoc/source/tutorial/sphinx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ The role *epkg* will import it based on its name.
*postcontents*: dynamic contents
++++++++++++++++++++++++++++++++

Location: :class:`PostContentsDirective <pyquickhelper.sphinxext.sphinxext_postcontents_extension.PostContentsDirective>`.
Location: :class:`PostContentsDirective <pyquickhelper.sphinxext.sphinx_postcontents_extension.PostContentsDirective>`.

In *conf.py*:

Expand Down Expand Up @@ -232,7 +232,7 @@ It looks into the page and adds a link to each local sections.
*runpython*: execute a script
+++++++++++++++++++++++++++++

Location: :py:class:`RunPythonDirective <pyquickhelper.sphinxext.sphinxext_runpython_extension.RunPythonDirective>`.
Location: :py:class:`RunPythonDirective <pyquickhelper.sphinxext.sphinx_runpython_extension.RunPythonDirective>`.

In *conf.py*:

Expand Down Expand Up @@ -310,6 +310,13 @@ with a tweak however. It consists in writing *rst*
code. The variable ``__WD__`` indicates the local
directory.

.. runpython::
:showcode:

print('__WD__=%r' % __WD__)

Applied to images...

.. sidebar:: runpython and image

::
Expand All @@ -336,7 +343,7 @@ the *rst* file.
ax.plot([0, 1], [0, 1], '--')
fig.savefig(os.path.join(__WD__, "oo.png"))

text = ".. image:: oo.png\\n :width: 201px"
text = ".. image:: oo.png\\\\n :width: 201px"
print(text)

Option ``:toggle:`` can hide the code or the output or both
Expand Down
4 changes: 2 additions & 2 deletions _unittests/ut_jenkinshelper/data/.local.jenkins.lin.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ language: python
python:
- { PATH: "{{Python37}}", VERSION: 3.7, DIST: std, PYINT: python3.7,
LD_LIBRARY_PATH: /usr/local/Python-3.7.2 }
- { PATH: "{{Python36}}", VERSION: 3.6, DIST: std, PYINT: python3.6,
LD_LIBRARY_PATH: /usr/local/Python-3.6.8 }
- { PATH: "{{Python39}}", VERSION: 3.9, DIST: std, PYINT: python3.9,
LD_LIBRARY_PATH: /usr/local/Python-3.9.1 }

virtualenv:
- path: {{ospathjoin(root_path, pickname("$NAME_JENKINS", project_name + "_$VERSION_$DIST_$NAME"), "_venv")}}
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_jenkinshelper/data/.local.jenkins.win.bf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
python:
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.9, DIST: std }
virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}
before_script:
Expand Down
9 changes: 3 additions & 6 deletions _unittests/ut_jenkinshelper/data/.local.jenkins.win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ language: python
# A different script is generated for each PATH.
# A path cannot be a virtual environment.
python:
- { PATH: "{{replace(Python35, '\\', '\\\\')}}", VERSION: 3.5, DIST: std }
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Python27, '\\', '\\\\')}}", VERSION: 2.7, DIST: std }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Anaconda3, '\\', '\\\\')}}", VERSION: 3.6, DIST: conda }
- { PATH: "{{replace(Anaconda2, '\\', '\\\\')}}", VERSION: 2.7, DIST: conda }
- { PATH: "{{replace(WinPython36, '\\', '\\\\')}}", VERSION: 3.6, DIST: winpython }
- { PATH: "{{replace(WinPython39, '\\', '\\\\')}}", VERSION: 3.6, DIST: winpython }

# The test happens in a virtual environment not with the original distribution.
virtualenv:
Expand All @@ -34,7 +31,7 @@ install:
before_script:
- if [ ${VERSION} == "2.7" ] then pip uninstall jyquickhelper fi
- if [ ${VERSION} == "2.7" ] then pip install bin\jyquickhelper-0.2-py2-none-any.whl fi
- if [ ${VERSION} == "2.7" ] then {{Python35}}\python -u setup.py copy27 fi
- if [ ${VERSION} == "2.7" ] then {{Python39}}\python -u setup.py copy27 fi
- if [ ${VERSION} == "2.7" ] then cd dist_module27 fi

# The script to run.
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_jenkinshelper/data/.local.jenkins.win2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
language: python

python:
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.9, DIST: std }

virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}
Expand Down
4 changes: 2 additions & 2 deletions _unittests/ut_jenkinshelper/data/local.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: python

python:
- { PATH: "{{replace(Python35, '\\', '\\\\')}}", VERSION: 3.4, DIST: std }
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.5, DIST: std }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.9, DIST: std }
- { PATH: "{{replace(Python38, '\\', '\\\\')}}", VERSION: 3.8, DIST: std }

virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}
Expand Down
11 changes: 4 additions & 7 deletions _unittests/ut_jenkinshelper/data/local2.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@

language: python
python:
- { PATH: "{{replace(Python35, '\\', '\\\\')}}", VERSION: 3.5, DIST: std }
- { PATH: "{{replace(Python27, '\\', '\\\\')}}", VERSION: 2.7, DIST: std }
- { PATH: "{{replace(Anaconda3, '\\', '\\\\')}}", VERSION: 3.5, DIST: conda }
- { PATH: "{{replace(Anaconda2, '\\', '\\\\')}}", VERSION: 2.7, DIST: conda }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.9, DIST: std }
virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}
install:
- pip install --upgrade pip
- pip freeze
before_script:
- if [ ${VERSION} == "2.7" ] then {{Python35}}\python -u setup.py copy27 fi
- if [ ${VERSION} == "2.7" ] then {{Python39}}\python -u setup.py copy27 fi
- if [ ${VERSION} == "2.7" ] then cd dist_module27 fi
- cd somewhere
- cmake.bat
Expand All @@ -35,5 +32,5 @@ after_script:
- if [ ${VERSION} == "2.7" ] then cd .. fi
- if [ ${VERSION} != "2.7" and ${DIST} != "conda" and ${VERSION} != "3.4" and ${NAME} == "UT" ] then copy dist\*.whl ..\..\local_pypi\local_pypi_server fi
documentation:
- if [ ${PYTHON} == "{{Python35}}" and ${NAME} == "UT" ] then python -u setup.py build_sphinx fi
- if [ ${PYTHON} == "{{Python35}}" and ${NAME} == "UT" ] then xcopy /E /C /I /Y _doc\sphinxdoc\build\html dist\html fi
- if [ ${PYTHON} == "{{Python39}}" and ${NAME} == "UT" ] then python -u setup.py build_sphinx fi
- if [ ${PYTHON} == "{{Python39}}" and ${NAME} == "UT" ] then xcopy /E /C /I /Y _doc\sphinxdoc\build\html dist\html fi
2 changes: 1 addition & 1 deletion _unittests/ut_jenkinshelper/data/local_publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

language: python
python:
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.9, DIST: std }
virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}
install:
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_jenkinshelper/data/local_startup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

language: python
python:
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Python39, '\\', '\\\\')}}", VERSION: 3.9, DIST: std }
virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}
install:
Expand Down
12 changes: 9 additions & 3 deletions _unittests/ut_jenkinshelper/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,17 @@ def test_jconvert_sequence_into_batch_file27(self):
this, "..", "..", "..", ".local.jenkins.win.yml"))
if not os.path.exists(yml):
raise FileNotFoundError(yml)
context = dict(Python34=None, Python35="C:\\Python35_x64",
context = dict(Python34=None,
Python35="C:\\Python35_x64",
Python36="C:\\Python36_x64",
Python37="C:\\Python37_x64",
Python27="C:\\Python27_x64", Anaconda3=None, Anaconda2=None,
WinPython36=None, project_name="pyquickhelper",
Python38="C:\\Python38_x64",
Python39="C:\\Python39_x64",
Python27="C:\\Python27_x64",
Anaconda3=None,
Anaconda2=None,
WinPython36=None,
project_name="pyquickhelper",
root_path="ROOT")
vers = "%d%d" % sys.version_info[:2]
context["Python%s" % vers] = "C:\\Python%s_x64" % vers
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_jenkinshelper/test_yaml_jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def private_tst_jenkins_ext_setup_server_yaml(self, disable_schedule, credential
raise Exception(conf)
if "anything\\python3_module_template\\%NAME_JENKINS%" not in conf:
nb_jen += 1
if "python3_module_template_UT_36_std" in conf or exp_ut in conf:
if "UT_39_std" in conf or exp_ut in conf:
nb += 1
if "H H(20-21) * * 0" in conf:
sch += 1
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_jenkinshelper/test_yaml_jenkins_bug.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_jenkins_bug_quote(self):
location="anything", disable_schedule=False,
credentials="")
res = list(res)
self.assertEqual(len(res), 4)
self.assertEqual(len(res), 3)
scripts = [''.join(s) for s in res]
for sc in scripts:
self.assertNotIn("Python370_x64", sc)
Expand Down
5 changes: 4 additions & 1 deletion _unittests/ut_jenkinshelper/test_yaml_jenkins_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def test_jenkins_ext_setup_server_yaml_split(self):
OutputPrint=__name__ == "__main__")

engines = {'Python36': 'c:\\Python36_x64',
'Python35': 'c:\\Python35_x64'}
'Python35': 'c:\\Python35_x64',
'Python38': 'c:\\Python38_x64',
'Python39': 'c:\\Python39_x64'}
srv = JenkinsExt(
"http://localhost:8080/", "user", "password", mock=True,
engines=engines, fLOG=fLOG, platform="win32")
Expand Down Expand Up @@ -62,6 +64,7 @@ def test_jenkins_ext_setup_server_yaml_split2(self):
OutputPrint=__name__ == "__main__")

engines = dict(Python35="py35", Python36="C:\\Python36_x64",
Python39="C:\\Python39_x64",
Python27="py27", Anaconda3="ana3", Anaconda2="ana2",
project_name="pyquickhelper", root_path="ROOT")
srv = JenkinsExt(
Expand Down
4 changes: 3 additions & 1 deletion _unittests/ut_jenkinshelper/test_yaml_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def zz_st_jconvert_sequence_into_batch_file_split(self, platform):
this, "data", "local.yml"))
if not os.path.exists(yml):
raise FileNotFoundError(yml)
context = dict(Python35="fake", Python36="C:\\Python35_x64",
context = dict(Python35="fake", Python36="C:\\Python36_x64",
Python38="C:\\Python38_x64",
Python39="C:\\Python39_x64",
project_name="pyquickhelper", root_path="ROOT")
obj, name = load_yaml(yml, context=context, platform=platform)
assert name is not None
Expand Down
3 changes: 2 additions & 1 deletion _unittests/ut_jenkinshelper/test_yaml_split_bug2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def zz_st_jconvert_sequence_into_batch_file_split2(self, platform):
if not os.path.exists(yml):
raise FileNotFoundError(yml)
context = dict(Python35="py35", Python36="C:\\Python36_x64",
Python39="C:\\Python39_x64",
Python27="py27", Anaconda3="ana3", Anaconda2="ana2",
project_name="pyquickhelper", root_path="ROOT")
obj, name = load_yaml(yml, context=context, platform=platform)
Expand All @@ -43,7 +44,7 @@ def zz_st_jconvert_sequence_into_batch_file_split2(self, platform):
convs.append(conv)
self.assertNotEmpty(res)

self.assertEqual(len(convs), 17)
self.assertEqual(len(convs), 4)
for conv in convs:
assert conv
assert isinstance(conv, list)
Expand Down
2 changes: 1 addition & 1 deletion src/pyquickhelper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
sphinx extension, jenkins helpers...
"""

__version__ = "1.9.3492"
__version__ = "1.10.3493"
__author__ = "Xavier Dupré"
__github__ = "https://github.com/sdpython/pyquickhelper"
__url__ = "http://www.xavierdupre.fr/app/pyquickhelper/helpsphinx/index.html"
Expand Down
Loading

0 comments on commit 934998e

Please sign in to comment.