I am please to announce the availability of the "baseline" package.
This tool streamlines creation and maintenance of tests which compare string
output against a baseline. It offers a mechanism to compare a string against
a baselined copy and update the baselined copy to match the new value when a
mismatch occurs. The update process includes a manual step to facilitate a
review of the change before acceptance. The tool uses multi-line string
format
for string baselines to improve readability for human review.
Docs: https://baseline.readthedocs.io/en/latest/
PyPi: https://pypi.org/project/baseline/
Repo: https://github.com/dmgass/baseline
License: MIT
With Regards,
Dan Gass
(dan.gass at gmail)
***********
Quick Start
***********
Create an empty baseline with a triple quoted multi-line string. Place
the ending triple quote on a separate line and indent it to the level
you wish the string baseline update to be indented to. Add a compare of
the string being tested to the baseline string. Then save the file as
``fox.py``:
.. code-block:: python
from baseline import Baseline
expected = Baseline("""
""")
test_string = "THE QUICK BROWN FOX\n JUMPS\nOVER THE LAZY DOG."
assert test_string == expected
Run ``fox.py`` and observe that the ``assert`` raises an exception since
the strings are not equal. Because the comparison failed, the tool located
the triple quoted baseline string in the source file and updated it with the
miscompared value. When the interpretter exited, the tool saved the updated
source file but changed the file name to ``fox.update.py``:
.. code-block:: python
from baseline import Baseline
expected = Baseline("""
THE QUICK BROWN FOX
JUMPS
OVER THE LAZY DOG.
""")
test_string = "THE QUICK BROWN FOX\n JUMPS\nOVER THE LAZY DOG."
assert test_string == expected
After reviewing the change with your favorite file differencing tool,
accept the change by either manually overwriting the original file or use
the ``baseline`` command line tool to scan the directory for updated
scripts and accept them:
.. code-block:: shell
$ python -m baseline *
Found updates for:
fox.py
Hit [ENTER] to update, [Ctrl-C] to cancel
fox.update.py -> fox.py
Run ``fox.py`` again and observe the ``assert`` does not raise an exception
nor is a source file update generated. If in the future the test value
changes, the ``assert`` will raise an exception and cause a new source file
update to be generated. Simply repeat the review and acceptance step and you
are back in business!
<P><A HREF="https://baseline.readthedocs.io/en/latest/">
baseline 0.2.1</A> - Easy String Baseline (07-Jun-18)
This course will help you to expertise the usage of Python in Data Science world.
Carter your Python Knowledge so that it can be utilized to get the Insights of Data using Methodologies and Techniques of Data Science...
Objective:
Understand the concepts of Data science and Python
You will be able to use Python in Discovering Data.
You will have an idea of Statistical and Analytical methods to deal with huge data sets.
You will gain an expertise on Regular Expressions, looping functions and concepts of Object Oriented Programming.
You will be able to create business algorithms and data models using Python and it's techniques.
Work on Real-life Projects will help you to get a practical experience of real scenarios of IT Industry.
Start learning Python for Data Science from basics to advance levels here...
https://goo.gl/070wXw
Hi folks,
It's always a pleasure to announce a Pythran release, and here we go for a
version bump!
Short reminder: Pythran is an ahead-of-time compiler for scientific Python,
with a focus on high-level numerical kernels, parallelism and vectorisation.
Here is a simple kernel example, with a pythran annotation. Note that this
kernel is still Python-compatible (from https://stackoverflow.com/questions/50658884):
#pythran export euclidean_distance_square(float64[1,:], float64[:,:])
import numpy as np
def euclidean_distance_square(x1, x2):
return -2*np.dot(x1, x2.T) + np.sum(np.square(x1), axis=1)[:, np.newaxis] + np.sum(np.square(x2), axis=1)
The Pythran package is available on PyPI, Github and Conda
https://pypi.org/project/pythran/https://anaconda.org/conda-forge/pythranhttps://github.com/serge-sans-paille/pythran
Packages exist for archlinux and Fedora, they'll probably be updated soon :-)
The interested reader can have a look to the changelog for details
https://pythran.readthedocs.io/en/latest/Changelog.html
Most notably, this release provides support for Python 3.7 and Python 3.8, as
well as the ability to use clang-cl as a (better) backend compiler for Windows.
Huge thanks to all contributors:
paugier
Anubhab Haldar
Jean Laroche
polo
and bug reporters:
paugier
nbecker
gdementen
mgirardis
MordicusEtCubitus
Dapid
piotrbartman
m-romanov
slayoo
martibosch
jeanlaroche
Due to awkward CDN caching, some users who downloaded the source code
tarballs of Python 3.5.8 got a preliminary version instead of the final
version. As best as we can tell, this only affects the .xz release;
there are no known instances of users downloading an incorrect version
of the .tgz file.
If you downloaded "Python-3.5.8.tar.xz" during the first twelve hours of
its release, you might be affected. It's easy to determine this for
yourself. The file size (15,382,140 bytes) and MD5 checksum
(4464517ed6044bca4fc78ea9ed086c36) published on the release page have
always matched the correct version. Also, the GPG signature file will
only report a "Good signature" for the correct .xz file (using "gpg
--verify").
What's the difference between the two? The only difference is that the
final version also merges a fix for Python issue tracker #38243:
https://bugs.python.org/issue38243
The fix adds a call to "html.escape" at a judicious spot, line 896 in
Lib/xmlrpc/server.py. The only other changes are one new test, to
ensure this new code is working, and an entry in the NEWS file. You can
see the complete list of changes here:
https://github.com/python/cpython/pull/16516/files
What should you do? It's up to you.
* If you and your users aren't using the XMLRPC library built in to
Python, you don't need to worry about which version of 3.5.8 you
downloaded.
* If you downloaded the .tgz tarball or the Git repo, you already have
the correct version.
* If you downloaded the xz file and want to make sure you have the
fix, check the MD5 sum, and if it's wrong download a fresh copy (and
make sure that one matches the known good MD5 sum!).
To smooth over this whole sordid mess, I plan to make a 3.5.9 release in
the next day or so. It'll be identical to the 3.5.8 release; its only
purpose is to ensure that all users have the same updated source code,
including the fix for #38243.
Sorry for the mess, everybody,
//arry/
I've recently released version 0.3.0 of distlib on PyPI [1]. For newcomers,distlib is a library of packaging functionality which is intended to beusable as the basis for third-party packaging tools.
The main changes in this release are as follows:
* Partially addressed #102: modules attribute of InstalledDistribution was incorrectly computed as a list of bytes, rather than a list of str. This has now been corrected.
* Updated Locator._get_digest to check PyPI JSON responses for a "digests" dictionary before trying "algo_digest" keys. Thanks to Jeffery To for the patch.
* Fixed #123: Improved error message if a resource isn't found.
* Fixed #124: Stopped norm-casing the executable written into shebangs, as it doesn't work for some non-ASCII paths.
* Fixed #125: Updated launchers with versions that correctly report errors containing non-ASCII characters. The updated launchers now also support relative paths (see http://bit.ly/2JxmOoi for more information).
* Fixed #127: Allowed hyphens in flags in export specifications.
* Changed Python version handling to accommodate versions like e.g. 3.10 (no longer assume a version X.Y where X and Y are single digits).
A more detailed change log is available at [2].
Please try it out, and if you find any problems or have any suggestions for improvements,please give some feedback using the issue tracker! [3]
Regards,
Vinay Sajip
[1] https://pypi.org/project/distlib/0.3.0/[2]https://distlib.readthedocs.io/en/0.3.0/[3]https://bitbucket.org/pypa/distlib/issues/new
On behalf of the Python development community, I'm relieved to announce
the availability of Python 3.5.8.
Python 3.5 is in "security fixes only" mode. This new version only
contains security fixes, not conventional bug fixes, and it is a
source-only release.
You can find Python 3.5.8 here:
https://www.python.org/downloads/release/python-358/
Oh what fun,
//arry/
Announcing wxPython 4.0.7
=========================
PyPI: https://pypi.org/project/wxPython/4.0.7
Extras: https://extras.wxPython.org/wxPython4/extras/
Pip: ``pip install wxPython==4.0.7``
This release is comprised mostly of fixes and minor features
which have been back-ported from the master branch. This release
is likely the last release of the 4.0.x release series, and is
certainly the last 4.0.x release that will support Python 2.7. It
may still continue to build for Python 2.7 for some time, but no
extra effort will be expended to keep it compatible.
Support for building for Python 3.8 has been added, as well as
3.8 binaries on PyPI for Windows and MacOS.
This release provides the following changes:
* Bug fixes in wx.lib.calendar: key navigation across month
boundaries is now possible; key navigation now sets the date
and fires the EVT_CALENDAR event; setter APIs now set the date
correctly (#1230).
* Switch to using a wx.Overlay in the Widget Inspection Tool to
highlight widgets when running on a GTK3 port.
* Fixed issue in wx.lib.agw.customtreectrl where label editor
could remain stuck forever (#1235).
* Fix a sometimes crash when using a wx.Overlay by letting the
wx.DCOverlay hold a reference to the DC, to ensure that the
DCOverlay is destroyed first. (PR#1301)
* Ported the embedding sample from Classic, which shows how to
use wxPython from a C++ wxWidgets application that embeds
Python. (PR #1353)
* Fixed wx.GetApp() to use wxWidgets' global wxApp instance
instead of maintaining its own pointer. This way, if the wxApp
is created by C++ code wxPython will still be able to get
access to it. (#1126)
* Several other PRs have been backported from the master branch
(which will become wxPython 4.1.0), the full list can be seen
here: https://github.com/wxWidgets/Phoenix/pull/1357
Hi all,
It fills us with astronomical joy to announce the release of czml3 0.3.0! 🌍
czml3 is a Python (3.6+) library to write CZML. Copying from the CZML Guide:
> CZML is a JSON format for describing a time-dynamic graphical scene,
> primarily for display in a web browser running Cesium. It describes
> lines, points, billboards, models, and other graphical primitives, and
> specifies how they change with time. While Cesium has a rich
> client-side API, CZML allows it to be data-driven so that a generic
> Cesium viewer can display a rich scene without the need for any custom
> code. In many ways, the relationship between Cesium and CZML is
> similar to the relationship between Google Earth and KML.
czml3 aims to be useful for interactive use:
>>> from czml3 import Packet
>>> Packet()
{
"id": "adae4d3a-7087-4fda-a70b-d18a262a890e"
}
>>> packet0 = Packet(id="Facility/AGI", name="AGI")
>>> packet0
{
"id": "Facility/AGI",
"name": "AGI"
}
>>> packet0.dumps()
'{"id": "Facility/AGI", "name": "AGI"}'
This new release brings some new properties (Box, BoxDimensions,
EyeOffset), better validation for Position, and a widget for Jupyter
notebook:
In [1]: from czml3.examples import simple
In [2]: from czml3.widget import CZMLWidget
In [3]: CZMLWidget(simple)
You can install it with pip:
pip install --upgrade czml3
And check out the repository on GitHub, which contains a more detailed
README, tests (>99 % coverage) and the issue tracker:
https://github.com/poliastro/czml3
If you have any questions or want to contribute, join our chat!
https://chat.openastronomy.org/#/room/#poliastro-czml:matrix.org
czml3 is similar in intent to czml, a Python library written by
Christian Ledermann. czml3 is implemented from scratch and tries to be
easier to use on an interactive interpreter, and (for the moment)
focuses only on writing.
Per Python ad astra!