feat(python): Python Bindings
Python Bindings are working again
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from ._gridfire import *
|
||||
import sys
|
||||
|
||||
from ._gridfire import type, utils, engine, solver, exceptions, partition, reaction, screening, io, policy
|
||||
from ._gridfire import type, utils, engine, solver, exceptions, partition, reaction, screening, io, policy, config
|
||||
|
||||
sys.modules['gridfire.type'] = type
|
||||
sys.modules['gridfire.utils'] = utils
|
||||
@@ -13,8 +13,61 @@ sys.modules['gridfire.reaction'] = reaction
|
||||
sys.modules['gridfire.screening'] = screening
|
||||
sys.modules['gridfire.policy'] = policy
|
||||
sys.modules['gridfire.io'] = io
|
||||
sys.modules['gridfire.config'] = config
|
||||
|
||||
__all__ = ['type', 'utils', 'engine', 'solver', 'exceptions', 'partition', 'reaction', 'screening', 'io', 'policy']
|
||||
__all__ = ['type', 'utils', 'engine', 'solver', 'exceptions', 'partition', 'reaction', 'screening', 'io', 'policy', 'config']
|
||||
|
||||
__version__ = "v0.7.4_rc2"
|
||||
import importlib.metadata
|
||||
|
||||
try:
|
||||
_meta = importlib.metadata.metadata('gridfire')
|
||||
__version__ = _meta['Version']
|
||||
__author__ = _meta['Author']
|
||||
__license__ = _meta['License']
|
||||
__email__ = _meta['Author-email']
|
||||
__url__ = _meta['Home-page'] or _meta.get('Project-URL', '').split(',')[0].split(' ')[-1].strip()
|
||||
__description__ = _meta['Summary']
|
||||
except importlib.metadata.PackageNotFoundError :
|
||||
__version__ = 'unknown - Package not installed'
|
||||
__author__ = 'Emily M. Boudreaux'
|
||||
__license__ = 'GNU General Public License v3.0'
|
||||
__email__ = 'emily.boudreaux@dartmouth.edu'
|
||||
__url__ = 'https://github.com/4D-STAR/GridFire'
|
||||
|
||||
def gf_metadata():
|
||||
return {
|
||||
'version': __version__,
|
||||
'author': __author__,
|
||||
'license': __license__,
|
||||
'email': __email__,
|
||||
'url': __url__,
|
||||
'description': __description__
|
||||
}
|
||||
|
||||
def gf_version():
|
||||
return __version__
|
||||
|
||||
def gf_author():
|
||||
return __author__
|
||||
|
||||
def gf_license():
|
||||
return __license__
|
||||
|
||||
def gf_email():
|
||||
return __email__
|
||||
|
||||
def gf_url():
|
||||
return __url__
|
||||
|
||||
def gf_description():
|
||||
return __description__
|
||||
|
||||
def gf_collaboration():
|
||||
return "4D-STAR Collaboration"
|
||||
|
||||
def gf_credits():
|
||||
return [
|
||||
"Emily M. Boudreaux - Lead Developer",
|
||||
"Aaron Dotter - Co-Developer",
|
||||
"4D-STAR Collaboration - Contributors"
|
||||
]
|
||||
Reference in New Issue
Block a user