scientific-spinbox


Namescientific-spinbox JSON
Version 1.0.0.dev9 PyPI version JSON
download
home_pageNone
SummaryScientificSpinbox - A Qt widget to manipulate physical quantities
upload_time2025-01-06 19:22:18
maintainer['Breno Pelegrin <brenohqsilva@gmail.com>', 'Daniel Cosmo Pizetta <daniel.pizetta@alumni.usp.br>']
docs_urlNone
author['Breno Pelegrin']
requires_pythonNone
licenseLGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://gitlab.com/dpizetta/pqwidget/-/raw/develop/docs/images/scientific-spinbox-cover-resized.png

scientific-spinbox
==================

**ScientificSpinbox** is a Qt Widget based on QDoubleSpinBox that
enables users to insert and manipulate physical quantities naturally.

.. image:: https://badge.fury.io/py/scientific-spinbox.svg
  :target: https://badge.fury.io/py/scientific-spinbox
  :alt: PyPI - Release Version

.. image:: https://img.shields.io/pypi/dm/scientific-spinbox
  :alt: PyPI - Downloads

.. image:: https://img.shields.io/pypi/pyversions/scientific-spinbox
  :alt: PyPI - Python Version

.. image:: https://readthedocs.org/projects/pqwidget/badge/?version=latest
  :target: https://pqwidget.readthedocs.io/en/latest/?badge=latest
  :alt: Documentation Status

.. image:: https://gitlab.com/dpizetta/pqwidget/badges/develop/coverage.svg?job=py310-test-supported
  :target: https://gitlab.com/dpizetta/pqwidget/badges/develop/coverage.svg?job=py310-test-supported
  :alt: Test job status

.. image:: https://dl.circleci.com/status-badge/img/circleci/6bTayJ8Qf8kDpwpwnEfEDY/9sGuva55EzD1oAP3e5ANMW/tree/main.svg?style=svg&circle-token=CCIPRJ_CBbDxYBL13frPixBp899VK_ec6483668be1ff9486b6e1b01327fb8e95fc4593
  :target: https://dl.circleci.com/status-badge/redirect/circleci/6bTayJ8Qf8kDpwpwnEfEDY/9sGuva55EzD1oAP3e5ANMW/tree/main
  :alt: CircleCI build status

Getting started
===============

This widget makes it easier for people from STEM (Science, Technology, 
Engineering, and Mathematics) fields to interact with
numeric inputs in a natural way with units and converstion between them, 
also allowing the usage of scientific notation and adding resources that highly
improve the user experience.

The backend that deals with units and their conversion can be set up/integrated
separately, but it is currently making use of the package `Pint <https://pint.readthedocs.io/en/stable/>`_.

This package also makes use of `QtPy <https://pypi.org/project/QtPy/>`_, 
an abstraction layer for PyQt/PySide, making it simple to interchange 
between those bindings and their versions.

Its main application is to be integrated with the `PyMR framework <https://doi.org/10.11606/T.76.2019.tde-06052019-103714>`_
to provide a better user interface when setting physical values
for Magnetic Resonance experiments, where it is necessary to use,
for example, frequency, degrees, voltage, and current.

Despite the specific use, we provided this package as an independent
one so more people can benefit from it. The final intention is to
integrate this special QSpinBox into the Qt/PySide/PyQt package,
if they have interest in the future.

Examples
========
Below is an example of a ScientificSpinBox widget used to insert values with units of time.
The **allowed units** are ``s``, ``ms`` and ``us`` and the **base unit** is ``ms``. The widget enables
the user to use scientific notation, edit the values using step up/step down and insert any desired number of decimal places.

Altough the user can play around with the units, the ``baseValue`` will always be the input converted to the **base unit**.

.. figure:: https://gitlab.com/dpizetta/pqwidget/-/raw/develop/docs/images/test-scientificspinbox.gif
  :alt: Testing ScientificSpinBox
  :align: center

  Example of a ScientificSpinBox with ``base_unit='ms'`` and ``allowed_units=['s','ms','us']``.

Installing, updating and uninstalling
=====================================

To install or update, do:

.. code-block:: bash
  
  pip install -U scientific-spinbox

To remove, do:

.. code-block:: bash

  pip uninstall scientific-spinbox

To install it in development mode, from a local clone, do:

.. code-block:: bash

  git clone https://gitlab.com/dpizetta/pqwidget.git scientific-spinbox
  cd scientific-spinbox && git checkout develop-v1.x
  pip install -e .

Testing
=======

To run automated tests for scientific-spinbox, you can use the ``test``
environment on ``tox``:

.. code-block:: bash

  tox -e test

The ``test`` environment runs with ``PyQt5`` by default.

There are environments for testing the widget with ``PyQt5``, ``PyQt6`` and ``PySide6``, as
well as ``Python 3.10`` and ``Python 3.11``.

.. code-block:: bash

  tox -e py310-test-pyside6
  tox -e py310-test-pyqt5
  tox -e py310-test-pyqt6


.. code-block:: bash

  tox -e py311-test-pyside6
  tox -e py311-test-pyqt5
  tox -e py311-test-pyqt6

Usage
=====

This widget is intended to be used within your own Qt application. Please read the documentation
to see examples of usage and details on how to use it and extend its functionalities.

Compatibility
=============

Currently works with PyQt5, PyQt6 and PySide6. There's no plans of implementing a compatibility
layer with PySide2 for now.

Support
=======

There is no warranty or support at all. Use it at your own risk.
If you find an issue, please report it and the maintainers will try or help to fix.

Contributing
============

Any contribution is welcome and appreciated.
Before contributing, please read the "Contributing" section of the documentation.

Authors and acknowledgment
==========================

This work was developed by the authors at the Centro de Imagens e Espectroscopia por 
Ressonância Magnética (CIERMag), at the `São Carlos Institute of Physics <https://www2.ifsc.usp.br/english/>`_, 
University of São Paulo, Brazil.


Maintainer(s)
-------------

These people were/are maintainers of this project.

- 2023-current - `Breno H. Pelegrin da S. <brenohqsilva@gmail.com>`_
- 2023-current - `Daniel C. Pizetta <daniel.pizetta@alumni.usp.br>`_
- 2018-2020 - `Eduardo R. Falvo <dudu.falvo@gmail.com>`_

Contributor(s)
--------------

These people contributed to bug fixes, improvements, and new features.

- 2023-current - `Breno H. Pelegrin da S. <brenohqsilva@gmail.com>`_ - All development since 2023
- 2018-2020 - `Eduardo R. Falvo <dudu.falvo@gmail.com>`_ - Initial development of the project

License
=======

This project is licensed under `GNU Lesser General Public License (LGPLv3) <https://www.gnu.org/licenses/lgpl-3.0.html>`_.

Project status
==============

This project is still on **Beta**.
It is being actively developed and should reach its first stable release soon.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "scientific-spinbox",
    "maintainer": "['Breno Pelegrin <brenohqsilva@gmail.com>', 'Daniel Cosmo Pizetta <daniel.pizetta@alumni.usp.br>']",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "['brenohqsilva@gmail.com', 'daniel.pizetta@alumni.usp.br']",
    "keywords": null,
    "author": "['Breno Pelegrin']",
    "author_email": "brenohqsilva@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7a/1a/c964f025f8f4058638101fbbf9b3b2add97c4cf2987292c0ac65812df07f/scientific_spinbox-1.0.0.dev9.tar.gz",
    "platform": null,
    "description": ".. image:: https://gitlab.com/dpizetta/pqwidget/-/raw/develop/docs/images/scientific-spinbox-cover-resized.png\n\nscientific-spinbox\n==================\n\n**ScientificSpinbox** is a Qt Widget based on QDoubleSpinBox that\nenables users to insert and manipulate physical quantities naturally.\n\n.. image:: https://badge.fury.io/py/scientific-spinbox.svg\n  :target: https://badge.fury.io/py/scientific-spinbox\n  :alt: PyPI - Release Version\n\n.. image:: https://img.shields.io/pypi/dm/scientific-spinbox\n  :alt: PyPI - Downloads\n\n.. image:: https://img.shields.io/pypi/pyversions/scientific-spinbox\n  :alt: PyPI - Python Version\n\n.. image:: https://readthedocs.org/projects/pqwidget/badge/?version=latest\n  :target: https://pqwidget.readthedocs.io/en/latest/?badge=latest\n  :alt: Documentation Status\n\n.. image:: https://gitlab.com/dpizetta/pqwidget/badges/develop/coverage.svg?job=py310-test-supported\n  :target: https://gitlab.com/dpizetta/pqwidget/badges/develop/coverage.svg?job=py310-test-supported\n  :alt: Test job status\n\n.. image:: https://dl.circleci.com/status-badge/img/circleci/6bTayJ8Qf8kDpwpwnEfEDY/9sGuva55EzD1oAP3e5ANMW/tree/main.svg?style=svg&circle-token=CCIPRJ_CBbDxYBL13frPixBp899VK_ec6483668be1ff9486b6e1b01327fb8e95fc4593\n  :target: https://dl.circleci.com/status-badge/redirect/circleci/6bTayJ8Qf8kDpwpwnEfEDY/9sGuva55EzD1oAP3e5ANMW/tree/main\n  :alt: CircleCI build status\n\nGetting started\n===============\n\nThis widget makes it easier for people from STEM (Science, Technology, \nEngineering, and Mathematics) fields to interact with\nnumeric inputs in a natural way with units and converstion between them, \nalso allowing the usage of scientific notation and adding resources that highly\nimprove the user experience.\n\nThe backend that deals with units and their conversion can be set up/integrated\nseparately, but it is currently making use of the package `Pint <https://pint.readthedocs.io/en/stable/>`_.\n\nThis package also makes use of `QtPy <https://pypi.org/project/QtPy/>`_, \nan abstraction layer for PyQt/PySide, making it simple to interchange \nbetween those bindings and their versions.\n\nIts main application is to be integrated with the `PyMR framework <https://doi.org/10.11606/T.76.2019.tde-06052019-103714>`_\nto provide a better user interface when setting physical values\nfor Magnetic Resonance experiments, where it is necessary to use,\nfor example, frequency, degrees, voltage, and current.\n\nDespite the specific use, we provided this package as an independent\none so more people can benefit from it. The final intention is to\nintegrate this special QSpinBox into the Qt/PySide/PyQt package,\nif they have interest in the future.\n\nExamples\n========\nBelow is an example of a ScientificSpinBox widget used to insert values with units of time.\nThe **allowed units** are ``s``, ``ms`` and ``us`` and the **base unit** is ``ms``. The widget enables\nthe user to use scientific notation, edit the values using step up/step down and insert any desired number of decimal places.\n\nAltough the user can play around with the units, the ``baseValue`` will always be the input converted to the **base unit**.\n\n.. figure:: https://gitlab.com/dpizetta/pqwidget/-/raw/develop/docs/images/test-scientificspinbox.gif\n  :alt: Testing ScientificSpinBox\n  :align: center\n\n  Example of a ScientificSpinBox with ``base_unit='ms'`` and ``allowed_units=['s','ms','us']``.\n\nInstalling, updating and uninstalling\n=====================================\n\nTo install or update, do:\n\n.. code-block:: bash\n  \n  pip install -U scientific-spinbox\n\nTo remove, do:\n\n.. code-block:: bash\n\n  pip uninstall scientific-spinbox\n\nTo install it in development mode, from a local clone, do:\n\n.. code-block:: bash\n\n  git clone https://gitlab.com/dpizetta/pqwidget.git scientific-spinbox\n  cd scientific-spinbox && git checkout develop-v1.x\n  pip install -e .\n\nTesting\n=======\n\nTo run automated tests for scientific-spinbox, you can use the ``test``\nenvironment on ``tox``:\n\n.. code-block:: bash\n\n  tox -e test\n\nThe ``test`` environment runs with ``PyQt5`` by default.\n\nThere are environments for testing the widget with ``PyQt5``, ``PyQt6`` and ``PySide6``, as\nwell as ``Python 3.10`` and ``Python 3.11``.\n\n.. code-block:: bash\n\n  tox -e py310-test-pyside6\n  tox -e py310-test-pyqt5\n  tox -e py310-test-pyqt6\n\n\n.. code-block:: bash\n\n  tox -e py311-test-pyside6\n  tox -e py311-test-pyqt5\n  tox -e py311-test-pyqt6\n\nUsage\n=====\n\nThis widget is intended to be used within your own Qt application. Please read the documentation\nto see examples of usage and details on how to use it and extend its functionalities.\n\nCompatibility\n=============\n\nCurrently works with PyQt5, PyQt6 and PySide6. There's no plans of implementing a compatibility\nlayer with PySide2 for now.\n\nSupport\n=======\n\nThere is no warranty or support at all. Use it at your own risk.\nIf you find an issue, please report it and the maintainers will try or help to fix.\n\nContributing\n============\n\nAny contribution is welcome and appreciated.\nBefore contributing, please read the \"Contributing\" section of the documentation.\n\nAuthors and acknowledgment\n==========================\n\nThis work was developed by the authors at the Centro de Imagens e Espectroscopia por \nResson\u00e2ncia Magn\u00e9tica (CIERMag), at the `S\u00e3o Carlos Institute of Physics <https://www2.ifsc.usp.br/english/>`_, \nUniversity of S\u00e3o Paulo, Brazil.\n\n\nMaintainer(s)\n-------------\n\nThese people were/are maintainers of this project.\n\n- 2023-current - `Breno H. Pelegrin da S. <brenohqsilva@gmail.com>`_\n- 2023-current - `Daniel C. Pizetta <daniel.pizetta@alumni.usp.br>`_\n- 2018-2020 - `Eduardo R. Falvo <dudu.falvo@gmail.com>`_\n\nContributor(s)\n--------------\n\nThese people contributed to bug fixes, improvements, and new features.\n\n- 2023-current - `Breno H. Pelegrin da S. <brenohqsilva@gmail.com>`_ - All development since 2023\n- 2018-2020 - `Eduardo R. Falvo <dudu.falvo@gmail.com>`_ - Initial development of the project\n\nLicense\n=======\n\nThis project is licensed under `GNU Lesser General Public License (LGPLv3) <https://www.gnu.org/licenses/lgpl-3.0.html>`_.\n\nProject status\n==============\n\nThis project is still on **Beta**.\nIt is being actively developed and should reach its first stable release soon.\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "ScientificSpinbox - A Qt widget to manipulate physical quantities",
    "version": "1.0.0.dev9",
    "project_urls": {
        "Documentation": "https://pqwidget.readthedocs.io/",
        "Homepage": "https://dpizetta.gitlab.io/pqwidget",
        "Issues": "https://gitlab.com/dpizetta/pqwidget/issues",
        "Source": "https://gitlab.com/dpizetta/pqwidget"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44eafd9426a1a072da7aed50273b6d15489fdcf4c30a7c41d64bf42dcdf59420",
                "md5": "24d5ba89438bc54b13b2160beaf5e55d",
                "sha256": "72d2b2615218857835f72178d242a6a0e4164d9f058cf8cebdd0271c265c5e5e"
            },
            "downloads": -1,
            "filename": "scientific_spinbox-1.0.0.dev9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "24d5ba89438bc54b13b2160beaf5e55d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 46419,
            "upload_time": "2025-01-06T19:22:15",
            "upload_time_iso_8601": "2025-01-06T19:22:15.832348Z",
            "url": "https://files.pythonhosted.org/packages/44/ea/fd9426a1a072da7aed50273b6d15489fdcf4c30a7c41d64bf42dcdf59420/scientific_spinbox-1.0.0.dev9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a1ac964f025f8f4058638101fbbf9b3b2add97c4cf2987292c0ac65812df07f",
                "md5": "65ea7ae8d6cba2b17e8a9a976b7f0308",
                "sha256": "6b70c6a91ab8ed5fe4868b340b7000f77f8e92984f15b991f57cb1a5bad6af94"
            },
            "downloads": -1,
            "filename": "scientific_spinbox-1.0.0.dev9.tar.gz",
            "has_sig": false,
            "md5_digest": "65ea7ae8d6cba2b17e8a9a976b7f0308",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 39952,
            "upload_time": "2025-01-06T19:22:18",
            "upload_time_iso_8601": "2025-01-06T19:22:18.267486Z",
            "url": "https://files.pythonhosted.org/packages/7a/1a/c964f025f8f4058638101fbbf9b3b2add97c4cf2987292c0ac65812df07f/scientific_spinbox-1.0.0.dev9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-06 19:22:18",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "dpizetta",
    "gitlab_project": "pqwidget",
    "lcname": "scientific-spinbox"
}
        
Elapsed time: 0.46011s