Skip to main content

Graph Based Imputation

Project description

py-grim

Graph Imputation

py-grim is the successor of GRIMM written in Python and based on NetworkX

GRIM Dependencies

How to develop on the project locally.

  1. Make sure the following pre-requites are installed.
    1. git
    2. python >= 3.8
    3. build tools eg make
  2. Clone the repository locally
    git clone git@github.com:pbashyal-nmdp/py-grim
    cd py-grim
    
  3. Make a virtual environment and activate it, run make venv
     > make venv
       python3 -m venv venv --prompt py-grim-venv
       =====================================================================
     To activate the new virtual environment, execute the following from your shell
     source venv/bin/activate
    
  4. Source the virtual environment
    source venv/bin/activate
    
  5. Development workflow is driven through Makefile. Use make to list show all targets.
     > make
     clean                remove all build, test, coverage and Python artifacts
     clean-build          remove build artifacts
     clean-pyc            remove Python file artifacts
     clean-test           remove test and coverage artifacts
     lint                 check style with flake8
     behave               run the behave tests, generate and serve report
     pytest               run tests quickly with the default Python
     test                 run all(BDD and unit) tests
     coverage             check code coverage quickly with the default Python
     dist                 builds source and wheel package
     docker-build         build a docker image for the service
     docker               build a docker image for the service
     install              install the package to the active Python's site-packages
     venv                 creates a Python3 virtualenv environment in venv
     activate             activate a virtual environment. Run `make venv` before activating.
    
  6. Install all the development dependencies. Will install packages from all requirements-*.txt files.
     make install
    
  7. The Gherkin Feature files, step files and pytest files go in tests directory:
    tests
    |-- features
    |   |-- algorithm
    |   |   `-- SLUG\ Match.feature
    |   `-- definition
    |       `-- Class\ I\ HLA\ Alleles.feature
    |-- steps
    |   |-- HLA_alleles.py
    |   `-- SLUG_match.py
    `-- unit
        `-- test_grim.py
    
  8. Package Module files go in the grim directory.
    grim
    |-- __init__.py
    |-- algorithm
    |   `-- match.py
    |-- model
    |   |-- allele.py
    |   `-- slug.py
    `-- grim.py
    
  9. Run all tests with make test or different tests with make behave or make pytest. make behave will generate report files and open the browser to the report.
  10. Use python app.py to run the Flask service app in debug mode. Service will be available at http://localhost:8080/
  11. Use make docker-build to build a docker image using the current Dockerfile.
  12. make docker will build and run the docker image with the service. Service will be available at http://localhost:8080/

======= History

0.0.1 (2021-08-25)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-grim-0.0.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

py_grim-0.0.3-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file py-grim-0.0.3.tar.gz.

File metadata

  • Download URL: py-grim-0.0.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for py-grim-0.0.3.tar.gz
Algorithm Hash digest
SHA256 59ad0348ee23954021a3260bb1fb656948d8cc1e4f5b5dbf4b66a1bffdb14f0e
MD5 fd7a37c0b7b898a6473df7dd67198059
BLAKE2b-256 23ec8d3633800d9f6e5da71bca50f43548e7b45f7bddf755ba5709763fa8ed89

See more details on using hashes here.

File details

Details for the file py_grim-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: py_grim-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for py_grim-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b77b7f4b3c4b9b32cc8d51002e741107935235f7f71d97898df34bb4c120ab21
MD5 6131746bb385685a9c1422bbd5915b95
BLAKE2b-256 07ce0fcb7d3e21644e9329ef6a16c68067967ac4470d5633717c634731a362a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page