An open API service indexing awesome lists of open source software.

https://github.com/egpbos/egp_plot

My collection of Python plotting functions
https://github.com/egpbos/egp_plot

Last synced: 10 months ago
JSON representation

My collection of Python plotting functions

Awesome Lists containing this project

README

          

################################################################################
egp.plot
################################################################################

My collection of Python plotting functions

Project Setup
*************

Here we provide some details about the project setup. Most of the choices are explained in the `guide `_. Links to the relevant sections are included below.
Feel free to remove this text when the development of the software package takes off.

For a quick reference on software development, we refer to `the software guide checklist `_.

Version control
---------------

Once your Python package is created, put it under
`version control `_!
We recommend using `git `_ and `github `_.

.. code-block:: console

cd egp_plot
git init
git add -A
git commit

To put your code on github, follow `this tutorial `_.

Python versions
---------------

This repository is set up with Python versions:
* 3.4
* 3.5
* 3.6

Add or remove Python versions based on project requirements. `The guide `_ contains more information about Python versions and writing Python 2 and 3 compatible code.

Package management and dependencies
-----------------------------------

You can use either `pip` or `conda` for installing dependencies and package management. This repository does not force you to use one or the other, as project requirements differ. For advice on what to use, please check `the relevant section of the guide `_.

* Dependencies should be added to `setup.py` in the `install_requires` list.

Packaging/One command install
-----------------------------

You can distribute your code using pipy or conda. Again, the project template does not enforce the use of either one. `The guide `_ can help you decide which tool to use for packaging.

If you decide to use pypi for distributing you code, you can configure travis to upload to pypi when you make a release. If you specified your pypi user name during generation of this package, the ``.travis.yml`` file contains a section that looks like:

.. code-block:: yaml

deploy:
provider: pypi
user: no_pypi_travis_deployment
password:
secure: FIXME; see README for more info
on:
tags: true
branch: master

Before this actually works, you need to add an encrypted password for your pypi account. The `travis documentation_` specifies how to do this.

Testing and code coverage
-------------------------

* Tests should be put in the ``tests`` folder.
* The ``tests`` folder contains:

- Example tests that you should replace with your own meaningful tests (file: ``test_egp_plot``)
- A test that checks whether your code conforms to the Python style guide (PEP 8) (file: ``test_lint.py``)

* The testing framework used is `PyTest `_

- `PyTest introduction `_

* Tests can be run with ``python setup.py test``

- This is configured in ``setup.py`` and ``setup.cfg``

* Use `Travis CI `_ to automatically run tests and to test using multiple Python versions

- Configuration can be found in ``.travis.yml``
- `Getting started with Travis CI `_

* TODO: add something about code quality/coverage tool?
* `Relevant section in the guide `_

Documentation
-------------

* Documentation should be put in the ``docs`` folder. The contents have been generated using ``sphinx-quickstart`` (Sphinx version 1.6.5).
* We recommend writing the documentation using Restructured Text (reST) and Google style docstrings.

- `Restructured Text (reST) and Sphinx CheatSheet `_
- `Google style docstring examples `_.

* The documentation is set up with the Read the Docs Sphinx Theme.

- Check out the `configuration options `_.

* To generate html documentation run ``python setup.py build_sphinx``

- This is configured in ``setup.cfg``
- Alternatively, run ``make html`` in the ``docs`` folder.

* The ``docs/_templates`` directory contains an (empty) ``.gitignore`` file, to be able to add it to the repository. This file can be safely removed (or you can just leave it there).
* To put the documentation on `Read the Docs `_, log in to your Read the Docs account, and import the repository (under 'My Projects').

- Include the link to the documentation in this README_.

* `Relevant section in the guide `_

Coding style conventions and code quality
-----------------------------------------

* Check your code style with ``prospector``
* You may need run ``pip install .[dev]`` first, to install the required dependencies
* You can use ``yapf`` to fix the readability of your code style and ``isort`` to format and group your imports
* `Relevant section in the guide `_

Package version number
----------------------

* We recommend using `semantic versioning `_.
* For convenience, the package version is stored in a single place: ``egp_plot/__version__.py``. For updating the version number, you only have to change this file.
* Don't forget to update the version number before `making a release `_!

CHANGELOG.rst
-------------

* Document changes to your software package
* `Relevant section in the guide `_

CITATION.cff
------------

* To allow others to cite your software, add a ``CITATION.cff`` file
* It only makes sense to do this once there is something to cite (e.g., a software release with a DOI).
* Follow the `making software citable `_ section in the guide.

CODE_OF_CONDUCT.rst
-------------------

* Information about how to behave professionally
* `Relevant section in the guide `_

CONTRIBUTING.rst
----------------

* Information about how to contribute to this software package
* `Relevant section in the guide `_

MANIFEST.in
-----------

* List non-Python files that should be included in a source distribution
* `Relevant section in the guide `_

NOTICE
------

* List of attributions of this project and Apache-license dependencies
* `Relevant section in the guide `_

Installation
------------

To install egp_plot, do:

.. code-block:: console

git clone https://github.com/egpbos/egp_plot.git
cd egp_plot
pip install .

Or to install in development mode (the installation links directly to the source tree so that changes can be used immediately without having to reinstall):

.. code-block:: console

pip install -e .

Run tests (including coverage) with:

.. code-block:: console

python setup.py test

Documentation
*************

.. _README:

Include a link to your project's full documentation here.

Contributing
************

If you want to contribute to the development of egp.plot,
have a look at the `contribution guidelines `_.

License
*******

Copyright (c) 2019, Patrick Bos & Netherlands eScience Center

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Credits
*******

This package was created with `Cookiecutter `_ and the `NLeSC/python-template `_.