import datac
import numpy as np
import os

params = {"temp_sun": 6000.}
bandgaps = np.linspace(0, 3.25, 100)

abscissae = datac.generate_abscissae(bandgaps, "bandgap", params)
pwd = os.getcwd()
testdir = "test"
filename = "data.dat"

fqpn = os.path.join(pwd, testdir, filename)
datac.write_json(fqpn, abscissae)

import datac
import numpy as np
import os
import unittest

class dummyclass(object):
    """
    Simple class for testing `generate_ordinates`
    """
    def __init__(self, params):
        pass

    def fun(self):
        """
        Return value of `True`
        """
        return True


params = {"temp_sun": 6000.}
bandgaps = np.linspace(0, 3.25, 100)

abscissae = datac.generate_abscissae(bandgaps, "bandgap", params)
data = datac.generate_ordinates(abscissae, dummyclass, "fun")

Add dummy class to test generate_ordinates
Add dummy class to test generate_ordinates

  import datac
  import numpy as np
  import os
+ import unittest
+ 
+ class dummyclass(object):
+     """
+     Simple class for testing `generate_ordinates`
+     """
+     def __init__(self, params):
+         pass
+ 
+     def fun(self):
+         """
+         Return value of `True`
+         """
+         return True
+ 
  
  params = {"temp_sun": 6000.}
  bandgaps = np.linspace(0, 3.25, 100)
  
  abscissae = datac.generate_abscissae(bandgaps, "bandgap", params)
+ data = datac.generate_ordinates(abscissae, dummyclass, "fun")
- pwd = os.getcwd()
- testdir = "test"
- filename = "data.dat"
  
- fqpn = os.path.join(pwd, testdir, filename)
- datac.write_json(fqpn, abscissae)
- 
Add dummy class to test generate_ordinates
## Code Before:
import datac
import numpy as np
import os

params = {"temp_sun": 6000.}
bandgaps = np.linspace(0, 3.25, 100)

abscissae = datac.generate_abscissae(bandgaps, "bandgap", params)
pwd = os.getcwd()
testdir = "test"
filename = "data.dat"

fqpn = os.path.join(pwd, testdir, filename)
datac.write_json(fqpn, abscissae)

## Instruction:
Add dummy class to test generate_ordinates
## Code After:
import datac
import numpy as np
import os
import unittest

class dummyclass(object):
    """
    Simple class for testing `generate_ordinates`
    """
    def __init__(self, params):
        pass

    def fun(self):
        """
        Return value of `True`
        """
        return True


params = {"temp_sun": 6000.}
bandgaps = np.linspace(0, 3.25, 100)

abscissae = datac.generate_abscissae(bandgaps, "bandgap", params)
data = datac.generate_ordinates(abscissae, dummyclass, "fun")
