Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #10 : Making testing-framework module #11

Open
wants to merge 3 commits into
base: public
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ temp/
example_models/Si/models/GAP/*
!example_models/Si/models/GAP/README
.DS_Store
*.eggs
*.egg-info
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ directory. This routine loads up a file called `bulk.xyz` from the same test dir
(this is why the full path name of the `test.py` script has to be
passed as the first argument), and calculates the Energy-Volume curve
of that structure, and also computes the elastic constants.

Install
-------

To use `testingframework` as a module, go to the git_dir and run

```bash
pip install -e .
```
`-e` command ensures that changes to the scirpts will be kept up do date upon import.
Now utilities can be importes as `from testingframework.share.utilities`
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from setuptools import setup, find_packages

PACKAGENAME = "testingframework"
DESCRIPTION = "Module for testing various interatomic potentials"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Module" or "Package" ?

AUTHOR = "Libatoms"
AUTHOR_EMAIL = ""

version = {}
with open("version.py") as fp:
exec(fp.read(), version)

setup(
name=PACKAGENAME,
packages=find_packages(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no __init__.py in the testingframework directory, that may be useful there

version=version["__version__"],
description=DESCRIPTION,
long_description=open("README.md").read(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we read this in above just like the other parts? just being a little petty here, but with ... as is nicer for this, even though we can be pretty sure that the file will be closed properly like this as well.

install_requires=["scipy", "numpy", "matplotlib", "pandas>=0.21.0", "scipy",],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • scipy is duplicated
  • ase is not there
  • pandas is only used in the demo notebook, not the package
  • anything else?

there are optional dependencies, that I wouldn't want to install unless needed, like torch, torchani, pyjulip, etc.

setup_requires=["pytest-runner",],
tests_require=["pytest",],
author=AUTHOR,
author_email=AUTHOR_EMAIL,
package_data={"": ["data/*", "calib/data/*"],},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these directories don't seem to exist

)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Model for Stillinger-Weber with original parameters for Si (Z=14)

from quippy.potential import Potential
from utilities import path_of_file
from testingframework.share.utilities import path_of_file


# A module defining a module needs to define only one variable,
Expand Down
Loading