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
Datatest provides tools for test driven data-wrangling and
data validation. It supports both pytest and unittest style
testing.
I've been working to get datatest ready for a few pre-PyCon
updates. This latest release takes many of the "how-to"
solutions and brings them into the core package.
* Docs - https://datatest.readthedocs.io/
* PyPI - https://pypi.org/project/datatest/
* Devel - https://github.com/shawnbrown/datatest
Upgrade an existing installation to 0.9.4:
pip install --upgrade datatest
What's New in Datatest 0.9.4:
* Added Python 3.8 testing and support.
* Added new validate methods (moved from how-to recipes into
core module):
* Added approx() method to require for approximate numeric
equality.
* Added fuzzy() method to require strings by approximate match.
* Added interval() method to require elements within a given
interval.
* Added set(), subset(), and superset() methods for explicit
membership checking.
* Added unique() method to require unique elements.
* Added order() method to require elements by relative order.
* Changed default sequence validation to check elements by
index position rather than checking by relative order.
* Added fuzzy-matching allowance to allow strings by approximate
match.
* Added Predicate class to formalize behavior--also provides
inverse-matching with the inversion operator (~).
* Added new methods to Query class:
* Added unwrap() to remove single-element containers and return
their unwrapped contents.
* Added starmap() to unpack grouped arguments when applying a
function to elements.
* Fixed improper use of assert statements with appropriate
conditional checks and error behavior.
* Added requirement class hierarchy (using BaseRequirement). This
gives users a cleaner way to implement custom validation behavior
and makes the underlying codebase easier to maintain.
* Changed name of ProxyGroup to RepeatingContainer.
* Changed "How To" examples to use the new validation methods.
Hello!
I'm pleased to announce version 3.2.2, the second bugfix release of branch
3.2 of CheetahTemplate3.
What's new in CheetahTemplate3
==============================
Contributors for this release are
Pierre-Yves, Dan Vinakovsky, Nicolai Grodzitski.
Minor features:
- Replaced outdated and insecure ``mktemp`` with ``mkstemp``.
Bug fixes:
- Fixed bugs in ``TemplateCmdLineIface.py``: read binary pickles
from stdin and files.
Tests:
- Use ``cgi.escape()`` for Python 2, ``html.escape()`` for Python 3.
- Created tests for ``TemplateCmdLineIface``.
What is CheetahTemplate3
========================
Cheetah3 is a free and open source template engine.
It's a fork of the original CheetahTemplate library.
Python 2.7 or 3.4+ is required.
Where is CheetahTemplate3
=========================
Site:
http://cheetahtemplate.org/
Development:
https://github.com/CheetahTemplate3
Download:
https://pypi.org/project/Cheetah3/3.2.2
News and changes:
http://cheetahtemplate.org/news.html
StackOverflow:
https://stackoverflow.com/questions/tagged/cheetah
Example
=======
Below is a simple example of some Cheetah code, as you can see it's practically
Python. You can import, inherit and define methods just like in a regular Python
module, since that's what your Cheetah templates are compiled to :) ::
#from Cheetah.Template import Template
#extends Template
#set $people = [{'name' : 'Tom', 'mood' : 'Happy'}, {'name' : 'Dick',
'mood' : 'Sad'}, {'name' : 'Harry', 'mood' : 'Hairy'}]
<strong>How are you feeling?</strong>
<ul>
#for $person in $people
<li>
$person['name'] is $person['mood']
</li>
#end for
</ul>
Oleg.
--
Oleg Broytman https://phdru.name/ phd(a)phdru.name
Programmers don't die, they just GOSUB without RETURN.
We're pleased to announce the release of *RISE* 5.5.0!
What is *RISE*?
*RISE* lets you show your *Jupyter* notebook rendered as an *executable*
Reveal.js-based slideshow.
It is your very same notebook but in a *slidy* way!
For more information about this release, please visit the following blog
post: http://damianavila.github.io/blog/posts/rise-550-is-out.html
Have a great start of the week!
--
*Damián Avila*
Hello all,
I'm glad to announce the release of psutil 5.6.2:
https://github.com/giampaolo/psutil
About
=====
psutil (process and system utilities) is a cross-platform library for
retrieving information on running processes and system utilization
(CPU, memory, disks, network) in Python. It is useful mainly for
system monitoring, profiling and limiting process resources and
management of running processes. It implements many functionalities
offered by command line tools such as: ps, top, lsof, netstat,
ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
pidof, tty, taskset, pmap. It currently supports Linux, Windows,
macOS, Sun Solaris, FreeBSD, OpenBSD, NetBSD and AIX, both 32-bit and
64-bit architectures. Supported Python versions are 2.6, 2.7 and
3.4+. PyPy is also known to work.
What's new
==========
2019-04-26
**Enhancements**
- #604: [UNIX, Windows] add new psutil.getloadavg() returning system load
- #1404: [Linux] cpu_count(logical=False) uses a second method (read from
`/sys/devices/system/cpu/cpu[0-9]/topology/core_id`) in order to determine
the number of physical CPUs in case /proc/cpuinfo does not provide this info.
- #1458: provide coloured test output. Also show failures on KeyboardInterrupt.
- #1464: various docfixes (always point to python3 doc, fix links, etc.).
- #1473: [Windows] process IO priority (ionice()) values are now exposed as 4
new constants: IOPRIO_VERYLOW, IOPRIO_LOW, IOPRIO_NORMAL, IOPRIO_HIGH.
Also it was not possible to set high I/O priority (not it is).
- #1478: add make command to re-run tests failed on last run.
average calculation. (patch by Ammar Askar)
**Bug fixes**
- #1223: [Windows] boot_time() may return value on Windows XP.
- #1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not
available (patch by Alex Manuskin)
- #1462: [Linux] (tests) make tests invariant to LANG setting (patch by
- #1463: cpu_distribution.py script was broken.
Benjamin Drung)
- #1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't
exist. (patch by Cedric Lamoriniere)
- #1471: [SunOS] Process name() and cmdline() can return SystemError. (patch
by Daniel Beer)
- #1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry pi 3.
- #1474: fix formatting of psutil.tests() which mimicks 'ps aux' output.
- #1475: [Windows] OSError.winerror attribute wasn't properly checked resuling
in WindowsError being raised instead of AccessDenied.
- #1477: [Windows] wrong or absent error handling for private NTSTATUS Windows
APIs. Different process methods were affected by this.
- #1480: [Windows] psutil.cpu_count(logical=False) could cause a crash due to
fixed read violation. (patch by Samer Masterson)
- #1486: [AIX, SunOS] AttributeError when interacting with Process methods
involved into oneshot() context.
- #1491: [SunOS] net_if_addrs(): free() ifap struct on error. (patch by
Agnewee)
- #1493: [Linux] cpu_freq(): handle the case where
/sys/devices/system/cpu/cpufreq/ exists but is empty.
Links
=====
- Home page: https://github.com/giampaolo/psutil
- Download: https://pypi.org/project/psutil/#files
- Documentation: http://psutil.readthedocs.io
- What's new: https://github.com/giampaolo/psutil/blob/master/HISTORY.rst
--
Giampaolo - http://grodola.blogspot.com
We are happy to announce the Call for Proposals is now open. The CfP
will close on Sunday in two weeks:
* Sunday, May 12 23:59:59 CEST *
Please submit your proposal via our website:
* https://ep2019.europython.eu/events/call-for-proposals/ *
We’re looking for proposals on every aspect of Python: programming
from novice to advanced levels, applications and frameworks, or how
you have been involved in introducing Python into your
organization. EuroPython is a community conference and we are eager to
hear about your experience.
Please also forward this Call for Proposals to anyone that you feel
may be interested.
Presenting at EuroPython
------------------------
We will accept a broad range of presentations, from reports on
academic and commercial projects to tutorials and case studies. As
long as the presentation is interesting and potentially useful to the
Python community, it will be considered for inclusion in the program.
Can you show something new and useful? Can you show the attendees how
to: use a module? Explore a Python language feature? Package an
application? If so, please consider submitting a talk.
PyData EuroPython 2019
----------------------
As usual there will be a PyData track at this year’s
conference. Please submit your papers for the PyData track through the
EuroPython form. Any suitable (i.e. data science, AI and analytics)
submission will be considered for the PyData track.
The PyData track is run in cooperation with NumFocus.
The 2019 PyData track will be on Tuesday (trainings), Wednesday
(talks) and Thursday (talks).
There are six different kinds of contributions that you can present at
EuroPython:
Formats
-------
* Talks and trainings should be held in English language only.
* Regular Talk / approx. 110 slots
These are standard “talks with slides”, allocated in slots of
The Q&A session, if present, is included in the time slot. 3-5
Minutes for Q&A is a good practice.
We will only offer a limited number of 60 minute slots, please only
choose these slots for in-depth sessions or topics which require
more background information.
- 30 minutes (ca. 50%)
- 45 minutes (ca. 34%)
- 60 minutes (ca. 16%)
We are looking for an approx. distribution of expertise (Python or
domain expertise)
- 40% Beginners
- 25% Intermediate
- 25% Advanced
* Trainings / 16 slots
Deep-dive into a subject with all details. These sessions are
apporx. 3 hours long. The training attendees will be encouraged to
bring a laptop. They should be prepared with less slides and more
source code. Room capacity for the trainings rooms is approx. 100
seats.
* Panels
A panel is group of three to six experts plus a moderator discussing
a matter in depth, an intensive exchange of (maybe opposite)
opinions. A panel may be 30-60 minutes long. We have introduced this
interactive format for EuroPython 2017 due to the many requests we
have received to make the conference more interactive and have more
challenging / mind-bending content in place. Please note if you
suggest a panel you will have to organise the panelists and
coordinate with the Program WG, panelist will require a ticket to
the conference.
* Interactive
This is a completely open 60-minute format. Feel free to make your
suggestions. There are only two rules: it must be interactive,
real-time human-to-human-interaction and of course compliant with
the EuroPython Code of Conduct.
* Posters / 20 slots
Posters are a graphical way to describe a project or a technology,
printed in large formats; posters are exhibited at the conference,
can be read at any time by participants, and can be discussed face
to face with their authors during the poster session.
* Helpdesk / 6 slots
Helpdesks are a great way to share your experience on a technology,
by offering to help people answering their questions and solving
their practical problems. You can run a helpdesk by yourself or with
colleagues and friends. Each helpdesk will be open for 3 hours in
total, 1.5 hours in the morning and 1.5 hours in the
afternoon. People looking for help will sign up for a 30 minute slot
and talk to you. There is no specific preparation needed; you just
need to be proficient in the technology you run the helpdesk for.
* Lightning Talks
A lightning talk (LT) is a short presenatation which must not be
longer than five minute. LTs are not via the CfP but walk-in
registations, see here.
Community Based Talk Voting
---------------------------
Attendees who have bought a ticket in time for the Talk Voting period
gain the right to vote for talks submitted during the Call For
Proposals.
The Program WG will also set aside a number of slots which they will
then select based on other criteria to e.g. increase diversity or give
a chance to less mainstream topics.
Conference Layout
-----------------
Please note that the conference layout has changed in 2018, the main
conference (talks) is now only three days:
* Monday and Tuesday:
trainings, workshops, Beginners’ Day, DjangoGirls
* Wednesday, Thursday, Friday:
talks, panels, posters, helpdesks, open sessions,… (no trainings!).
Discounts for Content Contributors
----------------------------------
Since EuroPython is a not-for-profit community conference, it is not
possible to pay out rewards for talks or trainings. For talks,
posters, help desk and organising a panels or interactive sessions we
will give out a 25% discount coupon valid for one conference
ticket. Trainers will receive a 100% discount coupon for both a
conference ticket and a training pass to compensate for the longer
preparation time. See here for more details.
Inappropriate Language and Imagery
----------------------------------
Please consider that EuroPython is a conference with an audience from
a broad geographical area which spans countries and regions with
vastly different cultures. What might be considered a “funny,
inoffensive joke” in a region might be really offensive (if not even
unlawful) in another. If you want to add humor, references and images
to your talk, avoid any choice that might be offensive to a group
which is different from yours, and pay attention to our EuroPython
Code of Conduct:
https://ep2019.europython.eu/coc/
Dates and Venues
----------------
EuroPython will be held from July 8-14 2019 in Basel, Switzerland, at
the Congress Center Basel (BCC) for the main conference days (Wed-Fri)
and the FHNW Muttenz for the workshops/trainings/sprints days
(Mon-Tue, Sat-Sun).
For more details, please have a look at our website and the FAQ:
https://ep2019.europython.eu/faq
Help spread the word
--------------------
Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !
Link to the blog post:
https://blog.europython.eu/post/184430444152/europython-2019-call-for-propo…
Tweet:
https://twitter.com/europython/status/1121314753413095424
Enjoy,
--
EuroPython 2019 Team
https://ep2019.europython.eu/https://www.europython-society.org/
We are happy to announce the launch of our website for EuroPython 2019:
* https://ep2019.europython.eu/ *
Thanks to Artur, Patrick and our web WG, the website now comes with a
renovated layout, modern technology and new features.
At the same time, we are launching the CFP for the conference. We’ll
post details in a separate blog post.
Dates and Venues
----------------
EuroPython will be held from July 8-14 2019 in Basel, Switzerland, at
the Congress Center Basel (BCC) for the main conference days (Wed-Fri)
and the FHNW Muttenz for the workshops/trainings/sprints days
(Mon-Tue, Sat-Sun).
For more details, please have a look at our website and the FAQ:
https://ep2019.europython.eu/faq
Help spread the word
--------------------
Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !
Link to the blog post:
https://blog.europython.eu/post/184430105792/europython-2019-launching-our-…
Tweet:
https://twitter.com/europython/status/1121307733519679489
Enjoy,
--
EuroPython 2019 Team
https://ep2019.europython.eu/https://www.europython-society.org/
What is cx_Oracle?
cx_Oracle is a Python extension module that enables access to Oracle Database
for Python 3.x and 2.x and conforms to the Python database API 2.0
specifications with a number of enhancements.
Where do I get it?
https://oracle.github.io/python-cx_Oracle
The easiest method to install/upgrade cx_Oracle is via pip as in
python -m pip install cx_Oracle --upgrade
What's new?
This release addresses a couple of bugs. See the release notes for more
information.
https://cx-oracle.readthedocs.io/en/latest/releasenotes.html#version-7-1-3-…
Please provide any feedback via GitHub issues (https://github.com/oracle
/python-cx_Oracle/issues).
竜 TatSu v4.4.0 has been released. Thanks to Vic Nightfall, support for
left-recursion in PEG grammars is now complete.
def WARNING():
return 'v4.4.0 is the last version of 竜TatSu supporting Python 2.7'
竜 TatSu (the successor to Grako) is a tool that takes grammars in a
variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers
in Python.
竜 TatSu can compile a grammar stored in a string into a
tatsu.grammars.Grammar object that can be used to parse any given input,
much like the re module does with regular expressions, or it can
generate a Python module that implements the parser.
竜 TatSu supports left-recursive rules in PEG grammars using the
algorithm by _Laurent_ and _Mens_. The generated AST has the expected
left associativity.
LINKS
* https://pypi.org/project/TatSu/4.4.0/
* https://tatsu.readthedocs.io/
* https://github.com/neogeny/TatSu
CHANGELOG
* The default regexp for whitespace was changed to `(?s)s+
* Allow empty patterns (//) like Python does
* #65 Allow initial, consecutive, and trailing @namechars
* #73 Allow @@whitespace :: None and @@whitespace :: False
* #75 Complete implemenation of left recursion(@Victorious3)
* #77 Allow @keyword throughout the grammar
* #89 Make all attributes defined in the rule present in the resulting
AST or Node even if the associated expression was not parsed
* #93 Fix trace colorization on Windows
* #96 Documented each @@directive
* Switched the documentation to the "Alabaster" theme
* Various code and documentation fixes (@davesque, @nicholasbishop,
@rayjolt)
--
Juancarlo *Añez*