OHDSI / dbt-synthea

[Under development] A dbt ETL project to convert a Synthea synthetic data set into the OMOP CDM
https://ohdsi.github.io/dbt-synthea/
Apache License 2.0
16 stars 6 forks source link

[BUG] `cffi` Python Package Missing but Required #88

Open TheCedarPrince opened 4 weeks ago

TheCedarPrince commented 4 weeks ago

I was using miniconda to initialize the virtual environment for this project. Everything nearly worked except I got an error after pip3 install -r requirements being that cffi was missing from requirements but was needed. I installed cffi with a separate command and everything worked as expected. Here was the list of my packages and their versions -- maybe the requirements.txt needs this package? Can anyone reproduce this error?

Package                   Version
------------------------- -----------
agate                     1.9.1
annotated-types           0.7.0
appdirs                   1.4.4
attrs                     24.2.0
babel                     2.16.0
black                     24.8.0
certifi                   2024.8.30
cffi                      1.17.1
cfgv                      3.4.0
chardet                   5.2.0
charset-normalizer        3.3.2
click                     8.1.7
colorama                  0.4.6
css-html-js-minify        2.5.5
daff                      1.3.46
dbt-adapters              1.7.0
dbt-common                1.10.0
dbt-core                  1.8.7
dbt-duckdb                1.8.0
dbt-extractor             0.5.1
dbt-semantic-interfaces   0.5.1
deepdiff                  7.0.1
diff_cover                9.2.0
distlib                   0.3.8
duckdb                    1.1.1
filelock                  3.16.1
identify                  2.6.1
idna                      3.10
importlib-metadata        6.11.0
iniconfig                 2.0.0
isodate                   0.6.1
Jinja2                    3.1.4
jinja2-simple-tags        0.6.1
jsonschema                4.23.0
jsonschema-specifications 2023.12.1
leather                   0.4.0
Logbook                   1.5.3
MarkupSafe                2.1.5
mashumaro                 3.13.1
minimal-snowplow-tracker  0.0.2
more-itertools            10.5.0
msgpack                   1.1.0
mypy-extensions           1.0.0
networkx                  3.3
nodeenv                   1.9.1
ordered-set               4.1.0
packaging                 24.1
parsedatetime             2.6
pathspec                  0.12.1
pip                       24.2
platformdirs              4.3.6
pluggy                    1.5.0
pre-commit                3.8.0
prompt_toolkit            3.0.47
protobuf                  4.25.5
pycparser                 2.22
pydantic                  2.9.2
pydantic_core             2.23.4
Pygments                  2.18.0
pytest                    8.3.3
python-dateutil           2.9.0.post0
python-slugify            8.0.4
pytimeparse               1.1.8
pytz                      2024.2
PyYAML                    6.0.2
radian                    0.6.12
rchitect                  0.4.6
referencing               0.35.1
regex                     2024.9.11
requests                  2.32.3
rpds-py                   0.20.0
setuptools                75.1.0
six                       1.16.0
sqlfluff                  3.2.0
sqlfluff-templater-dbt    3.2.0
sqlparse                  0.5.1
tblib                     3.0.0
text-unidecode            1.3
tqdm                      4.66.5
typing_extensions         4.12.2
urllib3                   2.2.3
virtualenv                20.26.6
wcwidth                   0.2.13
wheel                     0.44.0
zipp                      3.20.2
lawrenceadams commented 4 weeks ago

Interesting! I've not had this as an issue before! It seems to run fine locally in my testing and in CI!

Could I ask what platform you're running this on, etc?


Edit: I noticed that my mac has this installed through homebrew as a result of installing python through it - I imagine the image the ubuntu-latest uses on the CI will have this by default as well...

image
TheCedarPrince commented 4 weeks ago

oh interesting! I am running Fedora Desktop 39 and provisioning my python environments through miniconda. I generally never touch system python but that is interesting your cffi installed through homebrew seems to interact with your virtual environments if you set-up dbt-synthea with the virtualenv set-up.

lawrenceadams commented 4 weeks ago

oh interesting! I am running Fedora Desktop 39 and provisioning my python environments through miniconda. I generally never touch system python but that is interesting your cffi installed through homebrew seems to interact with your virtual environments if you set-up dbt-synthea with the virtualenv set-up.

Ahh I see!

I think a lot of distributions do include it by default, but maybe not as many as I had thought. The GitHub actions do include it as a system package (points to here) - hence I've never had this issue! In fairness I think the GitHub actions images, along with the codespace images, include everything but the kitchen sink - and so we've never hit this as a problem.

Given this will probably effects others we should probably throw it in the common.in mix.

Do you have the exact output for the error out of interest? I'm just wondering what depends on it

TheCedarPrince commented 3 weeks ago

Strange, I am unable to reproduce the error. Hm.