import os

from smif.data_layer import DatafileInterface
from smif.http_api import create_app


def get_data_interface():
    """Return a data_layer.DataInterface
    """
    return DatafileInterface(
        os.path.join(os.path.dirname(__file__), '..', '..', 'smif', 'sample_project')
    )


APP = create_app(
    static_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    template_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    get_data_interface=get_data_interface
)

import os

from smif.data_layer import DatafileInterface
from smif.http_api import create_app


def get_data_interface():
    """Return a data_layer.DataInterface
    """
    return DatafileInterface(
        os.path.join(os.path.dirname(__file__), '..', 'sample_project')
    )


APP = create_app(
    static_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    template_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    get_data_interface=get_data_interface
)

Make path to sample project shorter
Make path to sample project shorter

  import os
  
  from smif.data_layer import DatafileInterface
  from smif.http_api import create_app
  
  
  def get_data_interface():
      """Return a data_layer.DataInterface
      """
      return DatafileInterface(
-         os.path.join(os.path.dirname(__file__), '..', '..', 'smif', 'sample_project')
+         os.path.join(os.path.dirname(__file__), '..', 'sample_project')
      )
  
  
  APP = create_app(
      static_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
      template_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
      get_data_interface=get_data_interface
  )
  
Make path to sample project shorter
## Code Before:
import os

from smif.data_layer import DatafileInterface
from smif.http_api import create_app


def get_data_interface():
    """Return a data_layer.DataInterface
    """
    return DatafileInterface(
        os.path.join(os.path.dirname(__file__), '..', '..', 'smif', 'sample_project')
    )


APP = create_app(
    static_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    template_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    get_data_interface=get_data_interface
)

## Instruction:
Make path to sample project shorter
## Code After:
import os

from smif.data_layer import DatafileInterface
from smif.http_api import create_app


def get_data_interface():
    """Return a data_layer.DataInterface
    """
    return DatafileInterface(
        os.path.join(os.path.dirname(__file__), '..', 'sample_project')
    )


APP = create_app(
    static_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    template_folder=os.path.join(os.path.dirname(__file__), '..', 'app', 'dist'),
    get_data_interface=get_data_interface
)
