import logging
from .logger import CPNestLogger
from .cpnest import CPNest

# Get the version number from git tag
from importlib.metadata import version, PackageNotFoundError

try:
    __version__ = version(__name__)
except PackageNotFoundError:
    # package is not installed
    __version__ = "unknown"

logging.setLoggerClass(CPNestLogger)

__all__ = ['model',
           'NestedSampling',
           'parameter',
           'sampler',
           'cpnest',
           'nest2pos',
           'proposal',
           'plot',
           'logger']


import logging
from .logger import CPNestLogger
from .cpnest import CPNest

# Get the version number from git tag
from pkg_resources import get_distribution, DistributionNotFound
try:
    __version__ = get_distribution(__name__).version
except DistributionNotFound:
    # package is not installed
    __version__ = "dev"

logging.setLoggerClass(CPNestLogger)

__all__ = ['model',
           'NestedSampling',
           'parameter',
           'sampler',
           'cpnest',
           'nest2pos',
           'proposal',
           'plot',
           'logger']


Revert "Get version using importlib"
Revert "Get version using importlib"

This reverts commit 5df63fc784121f113c14195c5ae63a6591e92ae6.

  import logging
  from .logger import CPNestLogger
  from .cpnest import CPNest
  
  # Get the version number from git tag
+ from pkg_resources import get_distribution, DistributionNotFound
- from importlib.metadata import version, PackageNotFoundError
- 
  try:
-     __version__ = version(__name__)
+     __version__ = get_distribution(__name__).version
- except PackageNotFoundError:
+ except DistributionNotFound:
      # package is not installed
-     __version__ = "unknown"
+     __version__ = "dev"
  
  logging.setLoggerClass(CPNestLogger)
  
  __all__ = ['model',
             'NestedSampling',
             'parameter',
             'sampler',
             'cpnest',
             'nest2pos',
             'proposal',
             'plot',
             'logger']
  
  
Revert "Get version using importlib"
## Code Before:
import logging
from .logger import CPNestLogger
from .cpnest import CPNest

# Get the version number from git tag
from importlib.metadata import version, PackageNotFoundError

try:
    __version__ = version(__name__)
except PackageNotFoundError:
    # package is not installed
    __version__ = "unknown"

logging.setLoggerClass(CPNestLogger)

__all__ = ['model',
           'NestedSampling',
           'parameter',
           'sampler',
           'cpnest',
           'nest2pos',
           'proposal',
           'plot',
           'logger']


## Instruction:
Revert "Get version using importlib"
## Code After:
import logging
from .logger import CPNestLogger
from .cpnest import CPNest

# Get the version number from git tag
from pkg_resources import get_distribution, DistributionNotFound
try:
    __version__ = get_distribution(__name__).version
except DistributionNotFound:
    # package is not installed
    __version__ = "dev"

logging.setLoggerClass(CPNestLogger)

__all__ = ['model',
           'NestedSampling',
           'parameter',
           'sampler',
           'cpnest',
           'nest2pos',
           'proposal',
           'plot',
           'logger']

