Repository navigation
Merge V04/christian into develop requested - #124
Conversation
Bringing the latest develop into CD branch
Including nsat-bandsdk.md
Adding nsat
wildsm
left a comment
There was a problem hiding this comment.
I ran
python3 -m pip install -r requirements_conj.txt
followed by
python3 -m pytest tests.py
and obtained
==================================== test session starts =====================================
platform linux -- Python 3.10.12, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/wild/oldcomp/repos/bandframework/software/nuclear_saturation
plugins: cov-5.0.0, dash-2.17.1, anyio-4.3.0
collected 0 items / 1 error
=========================================== ERRORS ===========================================
_________________________________ ERROR collecting tests.py __________________________________
tests.py:51: in <module>
from modules.SaturationAnalysis import drischler_satbox
modules/SaturationAnalysis.py:23: in <module>
GenericDataSet(set_specifier="brown", filenames=["brown/satpoints_brown.csv"]),
modules/DataSets.py:161: in __init__
self.data_frame = super().read_csv_files(self.filenames)
modules/DataSets.py:101: in read_csv_files
data_read = pd.read_csv(f"{data_path}/{file}", comment=comment, dtype=dtype)
/home/wild/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py:1026: in read_csv
return _read(filepath_or_buffer, kwds)
/home/wild/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py:620: in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
/home/wild/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py:1620: in __init__
self._engine = self._make_engine(f, self.engine)
/home/wild/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py:1880: in _make_engine
self.handles = get_handle(
/home/wild/.local/lib/python3.10/site-packages/pandas/io/common.py:873: in get_handle
handle = open(
E FileNotFoundError: [Errno 2] No such file or directory: 'data/brown/satpoints_brown.csv'
====================================== warnings summary ======================================
../../../../../.local/lib/python3.10/site-packages/matplotlib/projections/__init__.py:63
/home/wild/.local/lib/python3.10/site-packages/matplotlib/projections/__init__.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
modules/DataSets.py:357
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:357: DeprecationWarning: invalid escape sequence '\%'
label=f'{row["label"]} ({level*100:.0f}\%)')
modules/DataSets.py:478
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:478: DeprecationWarning: invalid escape sequence '\i'
label = "Schunck $\it{et~al.}$ (\'20" + f", {level*100:.0f}\%)"
modules/DataSets.py:478
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:478: DeprecationWarning: invalid escape sequence '\%'
label = "Schunck $\it{et~al.}$ (\'20" + f", {level*100:.0f}\%)"
modules/DataSets.py:482
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:482: DeprecationWarning: invalid escape sequence '\i'
label = "Giuliani $\it{et~al.}$ (\'22" + f", {level*100:.0f}\%)"
modules/DataSets.py:482
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:482: DeprecationWarning: invalid escape sequence '\%'
label = "Giuliani $\it{et~al.}$ (\'22" + f", {level*100:.0f}\%)"
modules/DataSets.py:486
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:486: DeprecationWarning: invalid escape sequence '\i'
label = "McDonnell $\it{et~al.}$ (\'15" + f", {level*100:.0f}\%)"
modules/DataSets.py:486
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:486: DeprecationWarning: invalid escape sequence '\%'
label = "McDonnell $\it{et~al.}$ (\'15" + f", {level*100:.0f}\%)"
modules/DataSets.py:518
/home/wild/oldcomp/repos/bandframework/software/nuclear_saturation/modules/DataSets.py:518: DeprecationWarning: invalid escape sequence '\i'
label=label.replace(" $\it{et~al.}$", "+"))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================== short test summary info ===================================
ERROR tests.py - FileNotFoundError: [Errno 2] No such file or directory: 'data/brown/satpoints_brown.csv'
!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!
================================ 9 warnings, 1 error in 2.04s ================================
The reason for this error appears to be related to the case sensitivity in linux.
For example, the source code is calling for brown/satpoints_brown.csv but the data directory has directory Brown.
I believe all directories in data/ should be changed to lower case.
|
Thank you, @wildsm ! Yes, the reason you pointed out is correct. I'm aware that MacOS is case-insensitive while Linux is not, and I thought I had fixed it. Anyway, I've changed the path to files related to "Brown" to uppercase. The |
added nsat to changelog
wildsm
left a comment
There was a problem hiding this comment.
Yes, that worked.
I was left with a single warning, which I believe (as the text notes) is attributable to the testing environment I was using:
=============================== warnings summary ===============================
../../../../../.local/lib/python3.10/site-packages/matplotlib/projections/__init__.py:63
/home/wild/.local/lib/python3.10/site-packages/matplotlib/projections/__init__.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================== 5 passed, 1 warning in 135.02s (0:02:15) ===================
I'll leave this PR open for a couple hours in case anyone else spots something (including in the edits I made to include nsat in v04).
Thanks @cdrischler
The
nuclear_saturationmodule is ready to be tested and integrated into the upcoming BAND framework v0.4. The corresponding pre-print can be found here. Contact: Christian Drischler (drischler@ohio.edu).