Skip to content

Commit

Permalink
Fix various tiny bugs which caused warnings in Pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
rpep committed May 9, 2019
1 parent a3e0f6e commit 1437040
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion fidimag/common/chain_method_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ def initialise_integrator(self,
self.n_dofs_image,
mass=1,
stepsize=1e-4)
self.integrator.set_options()
# Note: disabled as at the moment, set_options does not
# do anything for the Verlet integrator!
# self.integrator.set_options()
# In Verlet algorithm we only use the total force G and not YxYxG:
self._llg_evolve = False
else:
Expand Down
2 changes: 1 addition & 1 deletion fidimag/common/chain_method_integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def run_until(self, t):
return 0

def set_options(self, rtol=1e-8, atol=1e-8):
warnings.warn("Tolerances not available for VerletIntegrator")
raise NotImplementedError("Tolerances not available for VerletIntegrator")

def _step(self, t, y, h, f):
"""
Expand Down
2 changes: 1 addition & 1 deletion fidimag/common/nebm_spherical.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class NEBM_Spherical(ChainMethodBase):
"""
r"""
ARGUMENTS -----------------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,11 @@ def glob_files(path, excludes, extension="*.cpp"):
'fidimag.extensions',
'fidimag.common',
],
ext_modules=cythonize(ext_modules, nthreads=nthreads, compiler_directives={'linetrace': True}),
ext_modules=cythonize(ext_modules,
nthreads=nthreads,
compiler_directives={
'linetrace': True,
'language_level': '3',
}
),
)
2 changes: 1 addition & 1 deletion tests/test_skyrmion_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def init_m_multiple_sks(pos, r, sk_pos):


def test_skx_num_atomistic():
"""
r"""
Test the *finite spin chirality* or skyrmion number for
a discrete spins simulation in a two dimensional lattice
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


def test_sst_field_1d():
"""
r"""
This is a direct test of the STT C library
We create a 1-D 4 spins system along the x direction with the
following components:
Expand Down

0 comments on commit 1437040

Please sign in to comment.