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
On behalf of the Python development community, I'm chuffed to announce
the availability of Python 3.5.8rc1.
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.8rc1 here:
https://www.python.org/downloads/release/python-358rc1/
I think Python 3.5 may just barely outlive 2.7,
//arry/
pytest-5.2.0
=======================================
The pytest team is proud to announce the 5.2.0 release!
pytest is a mature Python testing tool with more than a 2000 tests
against itself, passing on many different interpreters and platforms.
This release contains a number of bugs fixes and improvements, so users are
encouraged
to take a look at the CHANGELOG:
https://docs.pytest.org/en/latest/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/latest/
As usual, you can upgrade from pypi via:
pip install -U pytest
Thanks to all who contributed to this release, among them:
* Andrzej Klajnert
* Anthony Sottile
* Bruno Oliveira
* Daniel Hahler
* James Cooke
* Michael Goerz
* Ran Benita
* Tomáš Chvátal
* aklajnert
Happy testing,
The Pytest Development Team
I am pleased to announce release 2019.3 of SfePy.
Description
-----------
SfePy (simple finite elements in Python) is a software for solving systems of
coupled partial differential equations by the finite element method or by the
isogeometric analysis (limited support). It is distributed under the new BSD
license.
Home page: http://sfepy.org
Mailing list: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
Git (source) repository, issue tracker: https://github.com/sfepy/sfepy
Highlights of this release
--------------------------
- interface to eigenvalue problem solvers in SLEPc
- new Python 3 enabled Timer class and other Python 3 compatibility fixes
For full release notes see [1].
Cheers,
Robert Cimrman
[1] http://docs.sfepy.org/doc/release_notes.html#id1
---
Contributors to this release in alphabetical order:
Robert Cimrman
Vladimir Lukes
Vulture - Find dead code
========================
Vulture finds unused code in Python programs. This is useful for
cleaning up and finding errors in large code bases. If you run Vulture
on both your library and test suite you can find untested code.
Due to Python's dynamic nature, static code analyzers like Vulture are
likely to miss some dead code. Also, code that is only called
implicitly may be reported as unused. Nonetheless, Vulture can be a
very helpful tool for higher code quality.
Download
========
https://github.com/jendrikseipp/vulturehttp://pypi.python.org/pypi/vulture
Features
========
* fast: uses static code analysis
* tested: tests itself and has complete test coverage
* complements pyflakes and has the same output syntax
* sorts unused classes and functions by size with ``--sort-by-size``
* supports Python 2.7 and Python 3.5+
News
====
* Add ``sys.excepthook`` to ``sys`` whitelist.
* Add whitelist for ``ctypes`` module.
* Check that type annotations are parsed and type comments are ignored
(thanks @kx-chen).
* Support checking files with BOM under Python 2.7 (#170).
Cheers
Jendrik
[RasterFrames](https://rasterframes.io/) provides a DataFrame-centric view over arbitrary Earth-observation (EO) data, enabling spatiotemporal queries, map algebra raster operations, and compatibility with the ecosystem of [Apache Spark](https://spark.apache.org/docs/latest/) [ML](https://spark.apache.org/docs/latest/ml-guide.html) algorithms. It provides APIs in [Python, SQL, and Scala](https://rasterframes.io/languages.html), and can scale from a laptop computer to a large distributed cluster, enabling *global* analysis with satellite imagery in a wholly new, flexible, and convenient way.
## Changes in 0.8.2
* Added ability to pass config options to convenience PySpark session constructor.
* Bumped Spark dependency to version 2.3.4.
* Fixed handling of aggregate extent and image size on GeoTIFF writing.
* Fixed issue with `RasterSourceDataSource` swallowing exceptions.
* Fixed SparkML memory pressure issue caused by unnecessary reevaluation, overallocation, and primitive boxing.
* Fixed Parquet serialization issue with `RasterRef`s
* Fixed `TileExploder`, `rf_agg_local_mean` and `TileColumnSupport` to support `proj_raster` struct.
* Various documentation improvements.
* _Breaking_ (potentially): Synchronized parameter naming in Python and Scala for `spark.read.raster`
Full release notes are available here: https://rasterframes.io/release-notes.html
* Source: https://github.com/locationtech/rasterframes
* Install: `pip install pyrasterframes`
* Getting Started: https://rasterframes.io/getting-started.html
I'm pleased to announce the release of tsplib95 v0.4.0!
What's New?
-----------
* parser now raises ``ParserError`` instead of ``Exception``
* problem fields are now documented
* added explicit support for python 3.7
* corrected a parameter name in ``distances.geographical``
What is tsplib95?
-----------------
tsplib95 is a library for reading TSPLIB95 problems and solutions.
It supports the entire file format specification and automatically
converts problems into ``networkx.Graph`` instances.
License: Apache Software License 2.0
* Read the **docs**: https://tsplib95.readthedocs.io/
* Install from **PyPI**: https://pypi.org/project/tsplib95/0.4.0/
* Contribute **source**: https://github.com/rhgrant10/tsplib95
Example
-------
.. code-block:: python
>>> import tsplib95
>>> import networkx as nx
>>> # read problem files
>>> problem = tsplib95.load_problem('path/to/att48.tsp')
>>> problem.name
>>> problem.comment
'48 capitals of the US (Padberg/Rinaldi)'
>>> problem.dimension
48
>>> problem.type
'TSP'
>>> # auto-generated weight function for any two nodes
>>> problem.wfunc(2, 6)
6977
>>> # convert to networkx
>>> G = problem.get_graph()
>>> if problem.is_symmteric():
... assert issubclass(G, nx.Graph)
... else:
... assert issubclass(G, nx.DiGraph)
>>> if problem.is_depictable():
... nx.draw(G)
...
Enjoy!
Robert Grant
Hello!
I'm pleased to announce version 3.2.4, a bugfix release of branch
3.2 of CheetahTemplate3.
What's new in CheetahTemplate3
==============================
Minor features:
- Import from ``collections`` for Python 2,
from ``collections.abc`` for Python 3.
Bug fixes:
- Fixed infinite recursion in ``ImportManager`` on importing
module ``_bootlocale`` inside ``open()``.
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:
https://cheetahtemplate.org/
Development:
https://github.com/CheetahTemplate3
Download:
https://pypi.org/project/Cheetah3/3.2.4
News and changes:
https://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.
Hello!
I'm pleased to announce version 3.7.3, a bugfix release of branch
3.7 of SQLObject.
What's new in SQLObject
=======================
Bug fixes
---------
* Avoid excessive parentheses around ``ALL/ANY/SOME()``.
Tests
-----
* Add tests for cascade deletion.
* Add tests for ``sqlbuilder.ALL/ANY/SOME()``.
* Fix calls to ``pytest.mark.skipif`` - make conditions bool instead of str.
* Fix module-level calls to ``pytest.mark.skip`` - add reasons.
* Fix escape sequences ``'\%'`` -> ``'\\%'``.
CI
--
* Reduce the number of virtual machines/containers:
one OS, one DB, one python version, many drivers per VM.
* Fix sqlite test under Python 3.7+ at AppVeyor.
Contributors for this release are
For a more complete list, please see the news:
http://sqlobject.org/News.html
What is SQLObject
=================
SQLObject is an object-relational mapper. Your database tables are described
as classes, and rows are instances of those classes. SQLObject is meant to be
easy to use and quick to get started with.
SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite,
Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB).
Python 2.7 or 3.4+ is required.
Where is SQLObject
==================
Site:
http://sqlobject.org
Development:
http://sqlobject.org/devel/
Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss
Download:
https://pypi.org/project/SQLObject/3.7.3
News and changes:
http://sqlobject.org/News.html
StackOverflow:
https://stackoverflow.com/questions/tagged/sqlobject
Example
=======
Create a simple class that wraps a table::
>>> from sqlobject import *
>>>
>>> sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
>>>
>>> class Person(SQLObject):
... fname = StringCol()
... mi = StringCol(length=1, default=None)
... lname = StringCol()
...
>>> Person.createTable()
Use the object::
>>> p = Person(fname="John", lname="Doe")
>>> p
<Person 1 fname='John' mi=None lname='Doe'>
>>> p.fname
'John'
>>> p.mi = 'Q'
>>> p2 = Person.get(1)
>>> p2
<Person 1 fname='John' mi='Q' lname='Doe'>
>>> p is p2
True
Queries::
>>> p3 = Person.selectBy(lname="Doe")[0]
>>> p3
<Person 1 fname='John' mi='Q' lname='Doe'>
>>> pc = Person.select(Person.q.lname=="Doe").count()
>>> pc
1
Oleg.
--
Oleg Broytman https://phdru.name/ phd(a)phdru.name
Programmers don't die, they just GOSUB without RETURN.