Code Monkey home page Code Monkey logo

python_ics's Introduction

Description

Python wrapper for interfacing to IntrepidCS Hardware.

Installing

  • pip install python_ics

Platform specific Installation notes

Windows

Linux

  • Linux builds use libicsneo and are built against manylinux using cibuildwheel.
  • libicsneolegacy.so is bundled with the wheel and python_ics will automatically use it.

MacOS

  • Mac builds use libicsneo and are built using cibuildwheel
  • libicsneolegacy.dylib is bundled with the wheel and python_ics will automatically use it.

Documentation

http://python-ics.readthedocs.io/

Building from source

  • Building from source requires clang and clang-format to be present on the build machine.
  • python_ics has submodules, please be sure to initial all submodules also.
PS > git clone git@github.com:intrepidcs/python_ics.git

PS > cd python_ics

PS > git submodule update --init

PS > clang --version
clang version 11.1.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin

PS > clang-format --version
clang-format version 11.1.0

PS > python -m pip install .

Debugging on Windows with Visual Studio Code

  • Build and install python_ics for debug. When installing python choose the following:
    • Customize Installation -> Advanced Options
      • Check Download debugging symbols
      • Check Download debug binaries
  • Build python with debug:
    • Install Visual Studio 2019 build tools(NOTE: As of 2/5/24, it looks like MSVC 2022 does not build correctly with setuptools and debug configurations). You should be able to build from source already.
    • Create virtual environment and activate it (powershell):
      • python -m venv .venv
      • .\.venv\Scripts\Activate.ps1
    • Install dependencies:
      • python -m pip install -r requirements.txt
    • Build in debug (-g flag):
      • python setup.py build -g
    • Install into our virtual environment:
      • python setup.py install --force
    • Inside visual studio code:
      • Open the root python_ics directory
        • code C:\Path\To\python_ics
      • Make sure the python extension is installed (ctrl+shift+x)
      • Select the python interpreter from our virtual environment (bottom right with a python file open in the editor).
      • Open and place a breakpoint in src/icsdebug.py
      • launch "Python: Debug icsdebug.py"
        • Note the PID that is outputted to terminal (Can also add os.getpid() to watch window)
      • Place a breakpoint inside the function you'd like to debug in methods.cpp
      • launch "Debugger Attach" (launch.json) and enter the pid when prompted.
      • enjoy!

License - MIT

Copyright (c) Intrepid Control Systems, Inc.

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.

python_ics's People

Contributors

alexpux avatar biswa96 avatar bmjones2 avatar drebbe-intrepid avatar fairosaws avatar fvalla-mta avatar hollinsky-intrepid avatar ic3man5 avatar kjohannes-intrepidcs avatar kschwarz-intrepidcs avatar mkowalczyk-intrepid avatar pierreluctg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.