danielapai / bioverse

A simulation framework to assess the statistical power of future biosignature surveys
MIT License
7 stars 5 forks source link

[fix] OS-independent fix for the path parsing issue #44

Closed astral-carrier closed 7 months ago

astral-carrier commented 7 months ago

OS-independent fix for #41 using os.path, which also implements #42

Tested and confirmed to work for Tutorials 1 and 2 and Examples 1 and 2 on Windows and Ubuntu.

Still need someone else to test on macOS as I do not own an Apple computer.

kevinkhu commented 7 months ago

I tested this PR in a virtual environment with a new install of Bioverse with this PR. When running Tutorial1.ipynb, I encountered these warnings:

/home/kevin/.local/lib/python3.10/site-packages/pandas/core/computation/expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.8.1' currently installed).
  from pandas.core.computation.check import NUMEXPR_INSTALLED
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.3
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"

I ran pip install -U numexpr scipy and Tutorials 1 & 2, and Examples 1 & 2 ran without issue.

matiscke commented 7 months ago

@the-non-feline Did you run any tutorial/code from macOS that calls import_function_from_file ? If so, this is sufficiently tested and can be merged. Thanks!