Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] GRIP engine embedded in a python library #316

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

kellrott
Copy link
Member

@kellrott kellrott commented Aug 21, 2024

TODO:

  • setup.py
  • Unit testing
  • pip install
  • Documentation
  • Better type/error checking
  • Fix error logging

@kellrott kellrott requested a review from bwalsh August 22, 2024 23:08
Copy link
Collaborator

@bwalsh bwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See questions. I tried following steps in pygripTest setup but I think I'm missing a step

python setup.py install --user
- name: install pygrip
run: |
python setup.py install --user
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python setup.py install --user produces:

...
Installed /Users/walsbr/.local/lib/python3.9/site-packages/pygrip-0.8.0-py3.9-macosx-12.4-arm64.egg
Processing dependencies for pygrip==0.8.0
Searching for pygrip==0.8.0
Reading https://pypi.org/simple/pygrip/
No local packages or working download links found for pygrip==0.8.0
error: Could not find suitable distribution for Requirement.parse('pygrip==0.8.0')```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to 3.12, works now

Using /Users/walsbr/bmeg/grip/venv/lib/python3.12/site-packages
Finished processing dependencies for pygrip==0.8.0```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it doesn't look like it installed?

$ pip freeze | grep pygrip
>>>  (no hits)
python -c "import pygrip"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/walsbr/bmeg/grip/pygrip/__init__.py", line 9, in <module>
    from gripql.query import QueryBuilder
ModuleNotFoundError: No module named 'gripql.query'```

$ pytest test/pygrip_test/test_pygrip.py
========================================================================================== test session starts ==========================================================================================
platform darwin -- Python 3.12.1, pytest-8.1.1, pluggy-1.4.0
rootdir: /Users/walsbr/bmeg/grip
collected 0 items / 1 error

================================================================================================ ERRORS =================================================================================================
___________________________________________________________________________ ERROR collecting test/pygrip_test/test_pygrip.py ____________________________________________________________________________
ImportError while importing test module '/Users/walsbr/bmeg/grip/test/pygrip_test/test_pygrip.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../.pyenv/versions/3.12.1/lib/python3.12/importlib/init.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test/pygrip_test/test_pygrip.py:2: in
import pygrip
E ModuleNotFoundError: No module named 'pygrip'
======================================================================================== short test summary info ========================================================================================
ERROR test/pygrip_test/test_pygrip.py```

- name: Check out code
uses: actions/checkout@v2
- name: Python Dependencies for Conformance
run: pip install requests numpy PyYAML
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May need to include setuptools

test FHIR load

adds jsonpath-ng for reference searches

improves traversal tests
@matthewpeterkort
Copy link
Collaborator

Tests pass. Seems like the data frame association function lists for every vertex all of the edges that are 1 edge away from each other.

In order to make this strategy more flexible like the data-framer is currently, the dataframe_associations function would need to be significantly built out to detect fhir edge locations in the dict and aggregate associations automatically.

Can see how adding edge search via FHIR schema Rel paths would aide in this process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants