Skip to content

Commit

Permalink
Merge pull request #390 from deepanshs/djs/mon_py
Browse files Browse the repository at this point in the history
rem mon py
  • Loading branch information
deepanshs authored Oct 22, 2024
2 parents a1ac77e + dbdd1fa commit 7a47239
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 15 deletions.
1 change: 0 additions & 1 deletion docs/installation/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ following operating systems:
- `csdmpy>=0.6 <https://csdmpy.readthedocs.io/en/stable/>`_
- `pydantic>=2.8 <https://pydantic-docs.helpmanual.io>`_
- `nmrglue>=0.9 <https://nmrglue.readthedocs.io/>`_
- monty>=2.0.4
- typing-extensions>=3.7
- numexpr>=2.8.4
- psutil>=5.4.8
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ matplotlib>=3.3.3
csdmpy>=0.6
astropy>=5.1
pydantic>=2.8
monty>=2.0.4
typing-extensions>=3.7
lmfit>=1.0.2
pandas>=1.1.3
Expand Down
1 change: 0 additions & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies:
- pandas>=1.1.3
- pip
- pip:
- monty>=2.0.4
- csdmpy>=0.6
- astropy>=5.1
- pydantic>=2.8
Expand Down
1 change: 0 additions & 1 deletion environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies:
- pandas>=1.1.3
- pip
- pip:
- monty>=2.0.4
- csdmpy>=0.6
- astropy>=5.1
- pydantic>=2.8
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies:
- matplotlib>=3.3.4
- joblib>=1.0.0
- pandas>=1.1.3
- monty>=2.0.4
- csdmpy>=0.6
- astropy>=5.1
- pydantic>=2.8
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ matplotlib>=3.3.4
csdmpy>=0.6
astropy>=5.1
pydantic>=2.8
monty>=2.0.4
typing-extensions>=3.7
lmfit>=1.0.3
pandas>=1.1.3
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ matplotlib>=3.3.4
csdmpy>=0.6
astropy>=5.1
pydantic>=2.8
monty>=2.0.4
typing-extensions>=3.7
lmfit>=1.0.3
pandas>=1.1.3
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ def fftw_info(self):
"numpy>=1.20",
"csdmpy>=0.6",
"pydantic>=2.8",
"monty>=2.0.4",
"typing-extensions>=3.7",
"psutil>=5.4.8",
"joblib>=1.0.0",
Expand Down
5 changes: 3 additions & 2 deletions src/mrsimulator/method/tests/lib_tests/test_methods.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
from os import path

import numpy as np
import pytest
from monty.serialization import loadfn
from mrsimulator.method import Method
from mrsimulator.method.lib import BlochDecaySpectrum
from mrsimulator.method.lib import ThreeQ_VAS
Expand All @@ -11,7 +11,8 @@
__email__ = "[email protected]"

MODULE_DIR = path.dirname(path.abspath(__file__))
TESTDATA = loadfn(path.join(MODULE_DIR, "test_data.json"))
with open(path.join(MODULE_DIR, "test_data.json")) as f:
TESTDATA = json.load(f)

MAS_DIM = {
"count": 128,
Expand Down
10 changes: 7 additions & 3 deletions src/mrsimulator/spin_system/isotope.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Base Isotope class."""
import json
from os import path
from typing import ClassVar
from typing import Dict

from monty.serialization import loadfn
from pydantic.v1 import BaseModel
from pydantic.v1 import validator

Expand All @@ -12,8 +12,12 @@

MODULE_DIR = path.dirname(path.abspath(__file__))

ISOTOPE_DATA = loadfn(path.join(MODULE_DIR, "isotope_data.json"))
REFERENCE_DATA = loadfn(path.join(MODULE_DIR, "references.json"))
with open(path.join(MODULE_DIR, "isotope_data.json")) as f:
ISOTOPE_DATA = json.load(f)

with open(path.join(MODULE_DIR, "references.json")) as f:
REFERENCE_DATA = json.load(f)

DEFAULT_ISOTOPE = {
"spin_multiplicity": 2,
"gyromagnetic_ratio": 0,
Expand Down
5 changes: 3 additions & 2 deletions src/mrsimulator/tests/test_root_level_funcs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import os

import pytest
from monty.serialization import loadfn
from mrsimulator import __version__
from mrsimulator import dict
from mrsimulator import load
Expand All @@ -16,7 +16,8 @@


MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
TEST_DATA = loadfn(os.path.join(MODULE_DIR, "test_data.json"))
with open(os.path.join(MODULE_DIR, "test_data.json")) as f:
TEST_DATA = json.load(f)

# mrsimulator save and load test

Expand Down

0 comments on commit 7a47239

Please sign in to comment.