plot-serializer


Nameplot-serializer JSON
Version 0.1.3 PyPI version JSON
download
home_page
SummarySerializing plots.
upload_time2023-09-03 18:24:07
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Michaela Leštáková Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords rdm plot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Overview

[[_TOC_]]

## Installation
Install Plot Serializer with pip:

```cmd
pip install plot-serializer
```

## Contributing
Clone this repository with

```cmd
git clone git@git.rwth-aachen.de:rdm-tools/plot-serializer.git
```



### Creating the virtual environment
On Windows, run

```cmd
py -m venv env
```
The second argument is the location to create the virtual environment. Generally, you can just create this in your project and call it env.

venv will create a virtual Python installation in the env folder.

Before you can start installing or using packages in your virtual environment you’ll need to activate it. Activating a virtual environment will put the virtual environment-specific python and pip executables into your shell’s PATH.

```cmd
.\env\Scripts\activate
```

You can confirm you’re in the virtual environment by checking the location of your Python interpreter:

```cmd
where python
```
Tell pip to install all of the packages in the `requirements.txt` file using the -r flag:

```cmd
py -m pip install -r requirements.txt
```

Update the `requirements.txt` file when you install new packages.

For more detailed instructions, check https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/.

### Linting
This project uses the `flake8` linter and the `black` autoformatter.

### Documentation
Documentation is an essential part of writing code.

:warning: All public functions, methods, classes and modules must be properly documented with docstrings.

This project uses `google`-style docstrings. An example for a good docstring:

```python
def find_largest_distance(point, polygon):
    """Finds the largest distance between a point and the edges of a polygon.

    Args:
        point (shapely.geometry.Point): shapely point object
        polygon (shapely.geometry.Polygon): shapely polygon object

    Returns:
        float: the largest distance between a point and the edges of a polygon
    """
    distance_list = np.array([])
    for poly_point in list(zip(*polygon.exterior.coords.xy)):
        distance = point.distance(Point(poly_point))
        distance_list = np.append(distance_list, distance)
    max_distance = max(distance_list)
    return max_distance
```
because:
- [x] short and easy to understand description
- [x] starts with a verb in third person
- [x] `type` of the args are given
- [x] args and returns are described sufficiently

Where necessary, add additional information using comments.

### Naming Convention
Follow [Guido](https://en.wikipedia.org/wiki/Guido_van_Rossum)'s recommendations (taken from [Google Python Styleguide](https://google.github.io/styleguide/pyguide.html#3164-guidelines-derived-from-guidos-recommendations)):

<table rules="all" border="1" summary="Guidelines from Guido's Recommendations"
       cellspacing="2" cellpadding="2">

  <tr>
    <th>Type</th>
    <th>Public</th>
    <th>Internal</th>
  </tr>

  <tr>
    <td>Packages</td>
    <td><code>lower_with_under</code></td>
    <td></td>
  </tr>

  <tr>
    <td>Modules</td>
    <td><code>lower_with_under</code></td>
    <td><code>_lower_with_under</code></td>
  </tr>

  <tr>
    <td>Classes</td>
    <td><code>CapWords</code></td>
    <td><code>_CapWords</code></td>
  </tr>

  <tr>
    <td>Exceptions</td>
    <td><code>CapWords</code></td>
    <td></td>
  </tr>

  <tr>
    <td>Functions</td>
    <td><code>lower_with_under()</code></td>
    <td><code>_lower_with_under()</code></td>
  </tr>

  <tr>
    <td>Global/Class Constants</td>
    <td><code>CAPS_WITH_UNDER</code></td>
    <td><code>_CAPS_WITH_UNDER</code></td>
  </tr>

  <tr>
    <td>Global/Class Variables</td>
    <td><code>lower_with_under</code></td>
    <td><code>_lower_with_under</code></td>
  </tr>

  <tr>
    <td>Instance Variables</td>
    <td><code>lower_with_under</code></td>
    <td><code>_lower_with_under</code> (protected)</td>
  </tr>

  <tr>
    <td>Method Names</td>
    <td><code>lower_with_under()</code></td>
    <td><code>_lower_with_under()</code> (protected)</td>
  </tr>

  <tr>
    <td>Function/Method Parameters</td>
    <td><code>lower_with_under</code></td>
    <td></td>
  </tr>

  <tr>
    <td>Local Variables</td>
    <td><code>lower_with_under</code></td>
    <td></td>
  </tr>

</table>

For better readability, use meaningful, expressive names instead of hard-to-understand short names. Don’t drop letters from your source code. Although dropped letters in names like `memcpy` (memory copy) and `strcmp` (string compare) were popular in the C programming language before the 1990s, they’re an unreadable style of naming that you shouldn’t use today. If a name isn’t easily pronounceable, it isn’t easily understood.

Additionally, feel free to use short phrases that can make your code read like plain English. For example, `number_of_trials` is more readable than simply `number_trials`.

[More on naming.](https://inventwithpython.com/beyond/chapter4.html)

Use a spell checker.

### Code Structure
The maximum line length is 120 characters.

Whitespaces should be automatically deleted; the autoformatter should take care of this.

Improve readability by limiting the number of nested statements.

Preferrably write short functions, and [pure functions](https://realpython.com/python-functional-programming/#:~:text=A%20pure%20function%20is%20a,to%20state%20or%20mutable%20data.) that can be tested.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "plot-serializer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "rdm,plot",
    "author": "",
    "author_email": "Michaela Lestakova <michaela.lestakova@fst.tu-darmstadt.de>, Kevin Logan <kevin.logan@fst.tu-darmstadt.de>",
    "download_url": "https://files.pythonhosted.org/packages/29/99/15a211f8c085c4365fe8331deb119ebffac9ca3d61097f377e807825c0d7/plot-serializer-0.1.3.tar.gz",
    "platform": null,
    "description": "# Overview\n\n[[_TOC_]]\n\n## Installation\nInstall Plot Serializer with pip:\n\n```cmd\npip install plot-serializer\n```\n\n## Contributing\nClone this repository with\n\n```cmd\ngit clone git@git.rwth-aachen.de:rdm-tools/plot-serializer.git\n```\n\n\n\n### Creating the virtual environment\nOn Windows, run\n\n```cmd\npy -m venv env\n```\nThe second argument is the location to create the virtual environment. Generally, you can just create this in your project and call it env.\n\nvenv will create a virtual Python installation in the env folder.\n\nBefore you can start installing or using packages in your virtual environment you\u2019ll need to activate it. Activating a virtual environment will put the virtual environment-specific python and pip executables into your shell\u2019s PATH.\n\n```cmd\n.\\env\\Scripts\\activate\n```\n\nYou can confirm you\u2019re in the virtual environment by checking the location of your Python interpreter:\n\n```cmd\nwhere python\n```\nTell pip to install all of the packages in the `requirements.txt` file using the -r flag:\n\n```cmd\npy -m pip install -r requirements.txt\n```\n\nUpdate the `requirements.txt` file when you install new packages.\n\nFor more detailed instructions, check https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/.\n\n### Linting\nThis project uses the `flake8` linter and the `black` autoformatter.\n\n### Documentation\nDocumentation is an essential part of writing code.\n\n:warning: All public functions, methods, classes and modules must be properly documented with docstrings.\n\nThis project uses `google`-style docstrings. An example for a good docstring:\n\n```python\ndef find_largest_distance(point, polygon):\n    \"\"\"Finds the largest distance between a point and the edges of a polygon.\n\n    Args:\n        point (shapely.geometry.Point): shapely point object\n        polygon (shapely.geometry.Polygon): shapely polygon object\n\n    Returns:\n        float: the largest distance between a point and the edges of a polygon\n    \"\"\"\n    distance_list = np.array([])\n    for poly_point in list(zip(*polygon.exterior.coords.xy)):\n        distance = point.distance(Point(poly_point))\n        distance_list = np.append(distance_list, distance)\n    max_distance = max(distance_list)\n    return max_distance\n```\nbecause:\n- [x] short and easy to understand description\n- [x] starts with a verb in third person\n- [x] `type` of the args are given\n- [x] args and returns are described sufficiently\n\nWhere necessary, add additional information using comments.\n\n### Naming Convention\nFollow [Guido](https://en.wikipedia.org/wiki/Guido_van_Rossum)'s recommendations (taken from [Google Python Styleguide](https://google.github.io/styleguide/pyguide.html#3164-guidelines-derived-from-guidos-recommendations)):\n\n<table rules=\"all\" border=\"1\" summary=\"Guidelines from Guido's Recommendations\"\n       cellspacing=\"2\" cellpadding=\"2\">\n\n  <tr>\n    <th>Type</th>\n    <th>Public</th>\n    <th>Internal</th>\n  </tr>\n\n  <tr>\n    <td>Packages</td>\n    <td><code>lower_with_under</code></td>\n    <td></td>\n  </tr>\n\n  <tr>\n    <td>Modules</td>\n    <td><code>lower_with_under</code></td>\n    <td><code>_lower_with_under</code></td>\n  </tr>\n\n  <tr>\n    <td>Classes</td>\n    <td><code>CapWords</code></td>\n    <td><code>_CapWords</code></td>\n  </tr>\n\n  <tr>\n    <td>Exceptions</td>\n    <td><code>CapWords</code></td>\n    <td></td>\n  </tr>\n\n  <tr>\n    <td>Functions</td>\n    <td><code>lower_with_under()</code></td>\n    <td><code>_lower_with_under()</code></td>\n  </tr>\n\n  <tr>\n    <td>Global/Class Constants</td>\n    <td><code>CAPS_WITH_UNDER</code></td>\n    <td><code>_CAPS_WITH_UNDER</code></td>\n  </tr>\n\n  <tr>\n    <td>Global/Class Variables</td>\n    <td><code>lower_with_under</code></td>\n    <td><code>_lower_with_under</code></td>\n  </tr>\n\n  <tr>\n    <td>Instance Variables</td>\n    <td><code>lower_with_under</code></td>\n    <td><code>_lower_with_under</code> (protected)</td>\n  </tr>\n\n  <tr>\n    <td>Method Names</td>\n    <td><code>lower_with_under()</code></td>\n    <td><code>_lower_with_under()</code> (protected)</td>\n  </tr>\n\n  <tr>\n    <td>Function/Method Parameters</td>\n    <td><code>lower_with_under</code></td>\n    <td></td>\n  </tr>\n\n  <tr>\n    <td>Local Variables</td>\n    <td><code>lower_with_under</code></td>\n    <td></td>\n  </tr>\n\n</table>\n\nFor better readability, use meaningful, expressive names instead of hard-to-understand short names. Don\u2019t drop letters from your source code. Although dropped letters in names like `memcpy` (memory copy) and `strcmp` (string compare) were popular in the C programming language before the 1990s, they\u2019re an unreadable style of naming that you shouldn\u2019t use today. If a name isn\u2019t easily pronounceable, it isn\u2019t easily understood.\n\nAdditionally, feel free to use short phrases that can make your code read like plain English. For example, `number_of_trials` is more readable than simply `number_trials`.\n\n[More on naming.](https://inventwithpython.com/beyond/chapter4.html)\n\nUse a spell checker.\n\n### Code Structure\nThe maximum line length is 120 characters.\n\nWhitespaces should be automatically deleted; the autoformatter should take care of this.\n\nImprove readability by limiting the number of nested statements.\n\nPreferrably write short functions, and [pure functions](https://realpython.com/python-functional-programming/#:~:text=A%20pure%20function%20is%20a,to%20state%20or%20mutable%20data.) that can be tested.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Michaela Le\u0161t\u00e1kov\u00e1  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Serializing plots.",
    "version": "0.1.3",
    "project_urls": {
        "documentation": "https://plot-serializer.readthedocs.io/en/latest/",
        "repository": "https://git.rwth-aachen.de/rdm-tools/plot-serializer"
    },
    "split_keywords": [
        "rdm",
        "plot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90ac7da7404a8c0f265ac37e4f3e195b4c0a6cf23ea2ed31142b6d68c2e96c0c",
                "md5": "ea83739f517de2ea09fe4ec4537689ad",
                "sha256": "ff0a5e5dec4c110b42a53e10091028991e162c1b0157efdab1f1cedce191e270"
            },
            "downloads": -1,
            "filename": "plot_serializer-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea83739f517de2ea09fe4ec4537689ad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 21662,
            "upload_time": "2023-09-03T18:24:06",
            "upload_time_iso_8601": "2023-09-03T18:24:06.433684Z",
            "url": "https://files.pythonhosted.org/packages/90/ac/7da7404a8c0f265ac37e4f3e195b4c0a6cf23ea2ed31142b6d68c2e96c0c/plot_serializer-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "299915a211f8c085c4365fe8331deb119ebffac9ca3d61097f377e807825c0d7",
                "md5": "0d8e9d499bb661b4930c02f9d547a46f",
                "sha256": "933edefe15334fc7bb9a02464d5c54b51dfcb4b0d2dfdb6ccfedd5438ca2b292"
            },
            "downloads": -1,
            "filename": "plot-serializer-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0d8e9d499bb661b4930c02f9d547a46f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 17210,
            "upload_time": "2023-09-03T18:24:07",
            "upload_time_iso_8601": "2023-09-03T18:24:07.764853Z",
            "url": "https://files.pythonhosted.org/packages/29/99/15a211f8c085c4365fe8331deb119ebffac9ca3d61097f377e807825c0d7/plot-serializer-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-03 18:24:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "plot-serializer"
}
        
Elapsed time: 0.12299s