I was wondering if we could add a setup.py and change the file strucutre to allow for the testing-framework functions to be imported.
Benefits:
- Functions could be used ouside of the testing-framework setting, while still working there
- Rather than having to be careful in what working dir one is and using
import utils *, one could import testingframeowrk.utils, allowing for better editor support and more varied folder structure. - All tests would effectively become "shared", and useable accorss different tets
To Do:
- Move all files to a subfolder
testingframework, such that it could be imported as from testingframework.utilities import *, note that testing-framework would not be valid subdirectory name. - Adding a
setup.py file, something like below.
Potential setup.py
fromsetuptoolsimportsetup, find_packagesPACKAGENAME="testingframework"DESCRIPTION="Testing Framework for atomistic models"AUTHOR="Libatoms"AUTHOR_EMAIL=""version= {}
withopen("version.py") asfp:
exec(fp.read(), version)
setup(
name=PACKAGENAME,
packages=find_packages(),
version=version["__version__"],
description=DESCRIPTION,
long_description=open("testing-framework/README.md").read(),
install_requires=["scipy", "numpy", "matplotlib", "pandas>=0.21.0", "scipy",],
setup_requires=["pytest-runner",],
tests_require=["pytest",],
author=AUTHOR,
author_email=AUTHOR_EMAIL,
package_data={"": ["data/*", "calib/data/*"],},
)Questions
- Would someones own implementation/use of the framework impeded by the file structure change?
I was wondering if we could add a
setup.pyand change the file strucutre to allow for thetesting-frameworkfunctions to be imported.Benefits:
import utils *, one could importtestingframeowrk.utils, allowing for better editor support and more varied folder structure.To Do:
testingframework, such that it could be imported asfrom testingframework.utilities import *, note that testing-framework would not be valid subdirectory name.setup.pyfile, something like below.Potential setup.py
Questions