Skip to content

Commit

Permalink
Add new files
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Jun 15, 2013
1 parent 7fd5857 commit 7c54aab
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 42 deletions.
8 changes: 4 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Installing
Build requirements
==================

These are external packages which you will need to install before installing dftatom.
These are external packages which you will need to install before installing pseudo_dojo.

:term:`python` 2.6 (or later but not python3)
:term:`python` 2.7 (or later but not python3)

:term:`numpy` 1.1 (or later)
array support for python
Expand All @@ -28,9 +28,9 @@ These are external packages which you will need to install before installing dft
Installing from source
======================

Once you have satisfied the requirements detailed above, you can build dftatom::
Once you have satisfied the requirements detailed above, you can build pseudo_dojo::

cd dftatom
cd pseudo_dojo
python setup.py build
python setup.py install

Expand Down
Empty file added pseudo_dojo/__init__.py
Empty file.
Empty file added pseudo_dojo/aedata/__init__.py
Empty file.
23 changes: 1 addition & 22 deletions pseudo_dojo/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
"""
Common test support for dftatom.
This single module should provide all the common functionality for abipy tests
in a single location, so that test scripts can just import it and work right away.
"""
import sys

from unittest import TestCase

import numpy.testing.utils as nptu

class DftAtomTest(TestCase):
"""Extend TestCase with functions from numpy.testing.utils that support ndarrays."""

@staticmethod
def assert_almost_equal(actual, desired, decimal=7, err_msg='', verbose=True):
return nptu.assert_almost_equal(actual, desired, decimal, err_msg, verbose)

@staticmethod
def assert_equal(actual, desired, err_msg='', verbose=True):
return nptu.assert_equal(actual, desired, err_msg=err_msg, verbose=verbose)
from pseudo_dojo.testing import *
File renamed without changes.
22 changes: 22 additions & 0 deletions pseudo_dojo/core/testing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Common test support for pseudo_dojo.
This single module should provide all the common functionality for tests
in a single location, so that test scripts can just import it and work right away.
"""
import sys

from unittest import TestCase

import numpy.testing.utils as nptu

class DftAtomTest(TestCase):
"""Extend TestCase with functions from numpy.testing.utils that support ndarrays."""

@staticmethod
def assert_almost_equal(actual, desired, decimal=7, err_msg='', verbose=True):
return nptu.assert_almost_equal(actual, desired, decimal, err_msg, verbose)

@staticmethod
def assert_equal(actual, desired, err_msg='', verbose=True):
return nptu.assert_equal(actual, desired, err_msg=err_msg, verbose=verbose)
Empty file added pseudo_dojo/dojo/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions pseudo_dojo/ppgen/ape/apecore.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import numpy as np

from dftatom.core.qatom import plot_aepp, plot_logders
from dftatom.ape.apeio import (ape_read_waves, ape_read_potentials, ape_read_densities,
from pseudo_dojo.ppgen.core.qatom import plot_aepp, plot_logders
from pseudo_dojo.ppgen.ape.apeio import (ape_read_waves, ape_read_potentials, ape_read_densities,
ape_read_logders, ape_read_dipoles, ape_check_ppeigen, ape_check_ghosts)

__version__ = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion pseudo_dojo/ppgen/ape/apeio.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#from pprint import pprint

from dftatom.core.qatom import RadialFunction, RadialWaveFunction, plot_aepp, plot_logders
from pseudo_dojo.ppgen.core.qatom import RadialFunction, RadialWaveFunction, plot_aepp, plot_logders

__version__ = "0.1"
__status__ = "Development"
Expand Down
4 changes: 2 additions & 2 deletions pseudo_dojo/ppgen/ape/apeobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from pprint import pprint
from subprocess import Popen, PIPE

from dftatom.core.qatom import QState, AtomicConfiguration, plot_waves, plot_logders
from dftatom.ape.apeio import (ape_read_waves, ape_read_potentials, ape_read_densities,
from pseudo_dojo.ppgen.core.qatom import QState, AtomicConfiguration, plot_waves, plot_logders
from pseudo_dojo.ppgen.ape.apeio import (ape_read_waves, ape_read_potentials, ape_read_densities,
ape_read_logders, ape_read_dipoles, ape_check_ppeigen, ape_check_ghosts)

__version__ = "0.1"
Expand Down
Empty file added pseudo_dojo/tables/__init__.py
Empty file.
22 changes: 11 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env python
"""Setup script for dftatom."""
"""Setup script for pseudo_dojo."""
import sys
import os

from glob import glob
from setuptools import find_packages

# This check is also made in dftatom/__init__, don't forget to update both when
# This check is also made in pseudo_dojo/__init__, don't forget to update both when
# changing Python version requirements.
if sys.version[0:3] < '2.7':
sys.stderr.write("ERROR: dftatom requires Python Version 2.7 or above. Exiting.")
sys.stderr.write("ERROR: pseudo_dojo requires Python Version 2.7 or above. Exiting.")
sys.exit(1)

# A few handy globals
Expand All @@ -34,7 +34,7 @@ def file_doesnt_end_with(test, endings):
#---------------------------------------------------------------------------

# release.py contains version, authors, license, url, keywords, etc.
release_file = pjoin('dftatom','core','release.py')
release_file = pjoin('pseudo_dojo','core','release.py')

with open(release_file) as f:
code = compile(f.read(), release_file, 'exec')
Expand All @@ -45,23 +45,23 @@ def file_doesnt_end_with(test, endings):
# return find_packages(exclude=())

def find_package_data():
"""Find dftatom's package_data."""
"""Find pseudo_dojo's package_data."""
# This is not enough for these things to appear in an sdist.
# We need to muck with the MANIFEST to get this to work
#package_data = {
# 'dftatom.testing' : ['*.txt'],
# 'dftatom.tests' : ['data/*'],
# 'pseudo_dojo.testing' : ['*.txt'],
# 'pseudo_dojo.tests' : ['data/*'],
#}
package_data = {}
return package_data


def find_scripts():
"""Find dftatom scripts."""
"""Find pseudo_dojo scripts."""
scripts = list()
#
# All python files in abipy/scripts
pyfiles = glob( pjoin('dftatom','scripts',"*.py") )
pyfiles = glob( pjoin('pseudo_dojo','scripts',"*.py") )
scripts.extend(pyfiles)
return scripts

Expand All @@ -71,10 +71,10 @@ def cleanup():
if "develop" not in sys.argv:
import shutil
try:
shutil.rmtree('dftatom.egg-info')
shutil.rmtree('pseudo_dojo.egg-info')
except:
try:
os.unlink('dftatom.egg-info')
os.unlink('pseudo_dojo.egg-info')
except:
pass

Expand Down

0 comments on commit 7c54aab

Please sign in to comment.