Mappyfile

Latest version: v1.0.2

Safety actively analyzes 634065 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

1.0.0

++++++++++++++++

In celebration of becoming an official `OSGeo Community Project <https://www.osgeo.org/projects/mappyfile/>`_,
a version ``1.0.0`` release is now out!

+ **Support for Python 2.7 has now been dropped.**
See `166 <https://github.com/geographika/mappyfile/issues/166>`_ - Drop Python 2.7 support. The codebase has had all Python2 specific
code removed - see `188 <https://github.com/geographika/mappyfile/issues/188>`_.

+ **Breaking Change** - in the ``MapfileToDict`` class the parameter ``transformerClass`` has been renamed ``transformer_class``.
An example of how to fix this is shown below:

.. code-block:: python

from mappyfile.transformer import MapfileToDict
from mappyfile_colors import ColorsTransformer

m = MapfileToDict(
include_position=True,
include_comments=True,
replace the following parameter
transformerClass=ColorsTransformer,
transformer_class=ColorsTransformer,
conversion_type=None,
include_color_names=True,
)

+ **Breaking Change** - ``LAYER`` ``DATA`` has been changed in the schema from a list to a simple string.

.. code-block:: python

layer = {
'__type__': 'layer',
// pre v1 the data clause had to be in a list
// 'data': ['/path/to/data']
// in v1 this should now be a string
'data': '/path/to/data'
}

mappyfile.dumps(layer)

+ Support added for `lark_cython <https://github.com/lark-parser/lark_cython>`_ - see `#178 <https://github.com/geographika/mappyfile/issues/178>`_ - thanks erezsh.
To use ``lark_cython`` is as simple as installing the option with ``pip``:

.. code-block:: bash

pip install mappyfile[lark_cython]

+ All mappyfile dicts now have human readable output when displayed as a string:

.. code-block:: python

mf = mappyfile.open("./docs/examples/before.map")
print(mf)

previous output
DefaultOrderedDict(<class 'mappyfile.ordereddict.CaseInsensitiveOrderedDict'>, CaseInsensitiveOrderedDict([('__type__', 'map'),..

new output
{
"__type__": "map",
"layers": [
{
"__type__": "layer",
"name": "Layer1",
"type": "POLYGON"
},

+ Approach to resolving JSON references updated due to the deprecated ``jsonschema.RefResolver`` - see
`this link <https://python-jsonschema.readthedocs.io/en/v4.18.4/referencing/#resolving-references-from-the-file-system>`_,
the associated JSONSchema `pull request <https://github.com/python-jsonschema/jsonschema/pull/1049>`_
and the `migration approach <https://python-jsonschema.readthedocs.io/en/stable/referencing/#migrating-from-refresolver>`_.

Other improvements and fixes in the v1.0.0 release:

+ `196 <https://github.com/geographika/mappyfile/pull/196>`_ - Code base fixes for ``Prospector`` warnings
+ `195 <https://github.com/geographika/mappyfile/pull/195>`_ - Update test suite from latest msautotests
+ `194 <https://github.com/geographika/mappyfile/pull/194>`_ - Docs overhaul in preparation for v1 release
+ `193 <https://github.com/geographika/mappyfile/pull/193>`_ - Update to ``jsonschema`` v4 and replace deprecated ``RefResolver``
+ `191 <https://github.com/geographika/mappyfile/pull/191>`_ - Simplify processing of comments
+ `189 <https://github.com/geographika/mappyfile/pull/189>`_ - Add type hints to the code base
+ `153 <https://github.com/geographika/mappyfile/pull/153>`_ - Support querying items without the given key in
``utils.findunique()``- thanks DonQueso89 for fix
+ Schema fixes for ``grid``, ``label``, ``style``, ``leader``, add ``flatgeobuf``
+ Code reformatted using `black <https://pypi.org/project/black/>`_

Resolution of long-standing parsing issues, and all msautotest examples now pass successfully:

+ `48 <https://github.com/geographika/mappyfile/issues/48>`_ - SYMBOL ambiguity
+ `98 <https://github.com/geographika/mappyfile/issues/98>`_ - Unquoted attribute names fail to parse

0.9.7

++++++++++++++++

+ Fix ""ResourceWarning: unclosed"" when reading mapfile.lark in Python 3.10
+ `151 <https://github.com/geographika/mappyfile/pull/151>`_ - Updates for COMPOSITE blocks
+ `150 <https://github.com/geographika/mappyfile/issues/150>`_ - Unknown COMPOP "SOFT-LIGHT" and error with several
lines with COMPFILTER with validate

0.9.6

++++++++++++++++

+ Schema fixes for GRID LABELFORMAT and set max versions for MAP DATAPATTERN and TEMPLATEPATTERN
+ Allow TRUE/FALSE values for OUTPUTFORMAT TRANSPARENT

0.9.5

++++++++++++++++

+ `147 <https://github.com/geographika/mappyfile/pull/147>`_ - Create list objects for containers when modifying dicts
+ `146 <https://github.com/geographika/mappyfile/pull/146>`_ - Add COMPOSITE validation
+ `145 <https://github.com/geographika/mappyfile/issues/145>`_ - layers.insert fails with dict error
+ `144 <https://github.com/geographika/mappyfile/issues/144>`_ - Invalid value in COMPOSITE - 'compfilter'
+ `140 <https://github.com/geographika/mappyfile/pull/140>`_ - New feature: group complex types at the end

0.9.4

++++++++++++++++

+ `137 <https://github.com/geographika/mappyfile/issues/137>`_ - Checking mapfile dict properties creates invalid empty dictionaries
+ `119 <https://github.com/geographika/mappyfile/issues/119>`_ - STYLE GEOMTRANSFORM 'labelcenter'
+ `143 <https://github.com/geographika/mappyfile/pull/143>`_ - Automate schema building
+ `142 <https://github.com/geographika/mappyfile/pull/142>`_ - Allow newer versions of jsonschema for py3
+ `141 <https://github.com/geographika/mappyfile/pull/141>`_ - Update and fix Continuous Integration
+ `139 <https://github.com/geographika/mappyfile/pull/139>`_ - Feature: align values in column
+ `138 <https://github.com/geographika/mappyfile/pull/138>`_ - Update schema based on new Mapfile validation rules

0.9.3

++++++++++++++++

+ Adds a new ``mappyfile.create`` function to allow creation of Mapfile objects with default values
+ Update the Mapfile schema to include ``default`` values for keywords

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.