sdss-lvmpwi


Namesdss-lvmpwi JSON
Version 0.0.38 PyPI version JSON
download
home_pagehttps://github.com/sdss/lvmpwi
SummaryLvm Pwi4 Actor
upload_time2024-02-04 21:30:27
maintainer
docs_urlNone
authorFlorian Briegel
requires_python>=3.8,<4.0
licenseBSD-3-Clause
keywords astronomy software
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # lvmpwi

![Versions](https://img.shields.io/badge/python->3.7-blue)
[![Documentation Status](https://readthedocs.org/projects/sdss-lvmpwi/badge/?version=latest)](https://sdss-lvmpwi.readthedocs.io/en/latest/?badge=latest)
[![Travis (.org)](https://img.shields.io/travis/sdss/lvmpwi)](https://travis-ci.org/sdss/lvmpwi)
[![codecov](https://codecov.io/gh/sdss/lvmpwi/branch/main/graph/badge.svg)](https://codecov.io/gh/sdss/lvmpwi)

Lvm Planewave PWI Clu Wrapper

## Features

- CLU based wrapper for Planewave PWI.
- Uses a container for deployment and testing. 
- Uses podman¹ for building the container.

¹ Setting an alias to use docker might work.

    alias podman="sudo docker"

## Todo
- Container not using the host network

## Note
As of version 0.0.9 the container is renamed from ubuntu_lvmt_pwi to lvmpwi

## Quickstart
Beginning with version 0.0.9 the container doesnt have to be build, a container is download automatically from github.

    git clone https://github.com/sdss/lvmpwi.git
    cd lvmtan      
    poetry run container_start --simulator --name=lvm.sci.pwi&


## Prerequisites

Some linux distributions do not have python >= 3.7 as the standard python3 version.

### Centos 8.X

    # as root
    yum install python38-devel
    # as user 
    python3.8  -m pip  install --user --upgrade pip
    pip3.8 install poetry
    export PATH=~/.local/bin/:$PATH

### OpenSuSe 15.2/15.3

    # as root
    zypper ar https://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Leap_15.2/ devel_python
    zypper install python39-devel
    # as user 
    python3.9  -m pip  install --user --upgrade pip
    pip3.9 install poetry
    export PATH=~/.local/bin/:$PATH

## Quick start

### Download
    git clone https://github.com/sdss/lvmpwi.git
    cd lvmpwi      

### Build (optional)
    # update local py env
    poetry update
    poetry install
    
    # build sdist & wheel (optional)
    poetry build
    
    # build pwi container
    poetry run container_build
    # rebuild pwi container from scratch
    poetry run container_build --no-cache
        
### Run container

    poetry run container_start
    
    # with pwi4 port 8220 exposed
    poetry run container_start --debug
    poetry run container_stop
    
    # run container with vnc - uses a free port between 5900 - 5909
    poetry run container_start --without-ui
   
    # run container with killing current instance
    poetry run container_start --kill
    
    # run container using the local lvmpwi instead of the git version included into the container
    poetry run container_start --debug
    
    # start multiple pwi container with simulation screen size for vnc sessions
    poetry run container_start --simulator --name=lvm.sci.pwi&
    poetry run container_start --simulator --geom=800x600 --without-ui --name=lvm.skye.pwi&
    poetry run container_start --simulator --geom=800x600 --without-ui --name=lvm.skyw.pwi&
    poetry run container_start --simulator --geom=800x600 --without-ui --name=lvm.spec.pwi&
    
    # run autotuner from container
    # Note: the standard autotuner needs opengl, which is not available with tigervnc/tightvnc, only with turbovnc and native display.
    poetry run container_autotuner
    
### Run tests 

    # run tests
    poetry run pytest
    # ... include slow tests with enabled log to stdout
    poetry run pytest -p no:logging -s -v --runslow
    
### Run native pwi client interface


    # run python with path to native pwi interface¹
    export PYTHONPATH=python/lvmpwi/pwi/:$PYTHONPATH
    poetry run python
    
    # see also lvmpwi/python/lvmpwi/pwi/pwi4_client_demo.py²
    # the documentation of the api is inside the code.
    import time
    from pwi4_client import PWI4
    pwi4 = PWI4()
    s = pwi4.status()
    if not s.mount.is_connected:
        print ("Connecting to mount...")
        s = pwi4.mount_connect()
        print ("Mount connected:", s.mount.is_connected)
        
¹ [pwi4_client.py](https://github.com/sdss/lvmpwi/blob/main/python/lvmpwi/pwi/pwi4_client.py) 
² [pwi4_client_demo.py](https://github.com/sdss/lvmpwi/blob/main/python/lvmpwi/pwi/pwi4_client_demo.py) 
    
### Publish
    # publish to pypi
    poetry publish --username=USER --password=PASS
    # build rpm package
    poetry run python setup.py bdist_rpm
    # build deb package - needs python3-stdeb
    poetry run python setup.py --command-packages=stdeb.command bdist_deb


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sdss/lvmpwi",
    "name": "sdss-lvmpwi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "astronomy,software",
    "author": "Florian Briegel",
    "author_email": "briegel@mpia.de",
    "download_url": "https://files.pythonhosted.org/packages/8b/2f/890405f4ae5d36b3998da2b1167524346693c789a0432ef2b525640b9b17/sdss_lvmpwi-0.0.38.tar.gz",
    "platform": null,
    "description": "# lvmpwi\n\n![Versions](https://img.shields.io/badge/python->3.7-blue)\n[![Documentation Status](https://readthedocs.org/projects/sdss-lvmpwi/badge/?version=latest)](https://sdss-lvmpwi.readthedocs.io/en/latest/?badge=latest)\n[![Travis (.org)](https://img.shields.io/travis/sdss/lvmpwi)](https://travis-ci.org/sdss/lvmpwi)\n[![codecov](https://codecov.io/gh/sdss/lvmpwi/branch/main/graph/badge.svg)](https://codecov.io/gh/sdss/lvmpwi)\n\nLvm Planewave PWI Clu Wrapper\n\n## Features\n\n- CLU based wrapper for Planewave PWI.\n- Uses a container for deployment and testing. \n- Uses podman\u00b9 for building the container.\n\n\u00b9 Setting an alias to use docker might work.\n\n    alias podman=\"sudo docker\"\n\n## Todo\n- Container not using the host network\n\n## Note\nAs of version 0.0.9 the container is renamed from ubuntu_lvmt_pwi to lvmpwi\n\n## Quickstart\nBeginning with version 0.0.9 the container doesnt have to be build, a container is download automatically from github.\n\n    git clone https://github.com/sdss/lvmpwi.git\n    cd lvmtan      \n    poetry run container_start --simulator --name=lvm.sci.pwi&\n\n\n## Prerequisites\n\nSome linux distributions do not have python >= 3.7 as the standard python3 version.\n\n### Centos 8.X\n\n    # as root\n    yum install python38-devel\n    # as user \n    python3.8  -m pip  install --user --upgrade pip\n    pip3.8 install poetry\n    export PATH=~/.local/bin/:$PATH\n\n### OpenSuSe 15.2/15.3\n\n    # as root\n    zypper ar https://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Leap_15.2/ devel_python\n    zypper install python39-devel\n    # as user \n    python3.9  -m pip  install --user --upgrade pip\n    pip3.9 install poetry\n    export PATH=~/.local/bin/:$PATH\n\n## Quick start\n\n### Download\n    git clone https://github.com/sdss/lvmpwi.git\n    cd lvmpwi      \n\n### Build (optional)\n    # update local py env\n    poetry update\n    poetry install\n    \n    # build sdist & wheel (optional)\n    poetry build\n    \n    # build pwi container\n    poetry run container_build\n    # rebuild pwi container from scratch\n    poetry run container_build --no-cache\n        \n### Run container\n\n    poetry run container_start\n    \n    # with pwi4 port 8220 exposed\n    poetry run container_start --debug\n    poetry run container_stop\n    \n    # run container with vnc - uses a free port between 5900 - 5909\n    poetry run container_start --without-ui\n   \n    # run container with killing current instance\n    poetry run container_start --kill\n    \n    # run container using the local lvmpwi instead of the git version included into the container\n    poetry run container_start --debug\n    \n    # start multiple pwi container with simulation screen size for vnc sessions\n    poetry run container_start --simulator --name=lvm.sci.pwi&\n    poetry run container_start --simulator --geom=800x600 --without-ui --name=lvm.skye.pwi&\n    poetry run container_start --simulator --geom=800x600 --without-ui --name=lvm.skyw.pwi&\n    poetry run container_start --simulator --geom=800x600 --without-ui --name=lvm.spec.pwi&\n    \n    # run autotuner from container\n    # Note: the standard autotuner needs opengl, which is not available with tigervnc/tightvnc, only with turbovnc and native display.\n    poetry run container_autotuner\n    \n### Run tests \n\n    # run tests\n    poetry run pytest\n    # ... include slow tests with enabled log to stdout\n    poetry run pytest -p no:logging -s -v --runslow\n    \n### Run native pwi client interface\n\n\n    # run python with path to native pwi interface\u00b9\n    export PYTHONPATH=python/lvmpwi/pwi/:$PYTHONPATH\n    poetry run python\n    \n    # see also lvmpwi/python/lvmpwi/pwi/pwi4_client_demo.py\u00b2\n    # the documentation of the api is inside the code.\n    import time\n    from pwi4_client import PWI4\n    pwi4 = PWI4()\n    s = pwi4.status()\n    if not s.mount.is_connected:\n        print (\"Connecting to mount...\")\n        s = pwi4.mount_connect()\n        print (\"Mount connected:\", s.mount.is_connected)\n        \n\u00b9 [pwi4_client.py](https://github.com/sdss/lvmpwi/blob/main/python/lvmpwi/pwi/pwi4_client.py) \n\u00b2 [pwi4_client_demo.py](https://github.com/sdss/lvmpwi/blob/main/python/lvmpwi/pwi/pwi4_client_demo.py) \n    \n### Publish\n    # publish to pypi\n    poetry publish --username=USER --password=PASS\n    # build rpm package\n    poetry run python setup.py bdist_rpm\n    # build deb package - needs python3-stdeb\n    poetry run python setup.py --command-packages=stdeb.command bdist_deb\n\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Lvm Pwi4 Actor",
    "version": "0.0.38",
    "project_urls": {
        "Documentation": "https://sdss-lvmpwi.readthedocs.org",
        "Homepage": "https://github.com/sdss/lvmpwi",
        "Repository": "https://github.com/sdss/lvmpwi"
    },
    "split_keywords": [
        "astronomy",
        "software"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71c60a417a39a6a535b64644e1796c0714c01226d23d28c75ae33012b4186834",
                "md5": "5aeee857198629660c8af9beb9b8a4dd",
                "sha256": "c45bc65ed70cb9593cd2aeef60bc63118bb1145cba20539e32727bf7b0a7bcaf"
            },
            "downloads": -1,
            "filename": "sdss_lvmpwi-0.0.38-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5aeee857198629660c8af9beb9b8a4dd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 40771,
            "upload_time": "2024-02-04T21:30:26",
            "upload_time_iso_8601": "2024-02-04T21:30:26.423473Z",
            "url": "https://files.pythonhosted.org/packages/71/c6/0a417a39a6a535b64644e1796c0714c01226d23d28c75ae33012b4186834/sdss_lvmpwi-0.0.38-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b2f890405f4ae5d36b3998da2b1167524346693c789a0432ef2b525640b9b17",
                "md5": "6a20d9816145ccbd6f715cb2d8a32098",
                "sha256": "b9ec623c520f5b340739a23de22939490e6653286ea39c02b738bc00b338fdc7"
            },
            "downloads": -1,
            "filename": "sdss_lvmpwi-0.0.38.tar.gz",
            "has_sig": false,
            "md5_digest": "6a20d9816145ccbd6f715cb2d8a32098",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 51109,
            "upload_time": "2024-02-04T21:30:27",
            "upload_time_iso_8601": "2024-02-04T21:30:27.532287Z",
            "url": "https://files.pythonhosted.org/packages/8b/2f/890405f4ae5d36b3998da2b1167524346693c789a0432ef2b525640b9b17/sdss_lvmpwi-0.0.38.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-04 21:30:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sdss",
    "github_project": "lvmpwi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sdss-lvmpwi"
}
        
Elapsed time: 0.17232s