Skip to content

Commit

Permalink
Merge branch 'release-0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-maddox committed Nov 6, 2015
2 parents a970e36 + d92a24e commit bc24e59
Show file tree
Hide file tree
Showing 12 changed files with 153 additions and 303 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Changes in 0.9:

- added `dielectric` and `dielectric_high_frequency` parameters
- added `meff_e_L_DOS` and `meff_e_X_DOS` parameters
- improved error messages
- fixed `MethodParameter.get_references` endless loop
- fixed `nonparabolicity` parameter (temperature dependence was wrong)
- fixed `luttinger32` parameter
- fixed lattice matching of type 3 quaternatries

Changes in 0.8:

- Near complete rewrite of internals
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.txt
include CHANGELOG.txt
include doc/PYPI_DESCRIPTION.rst
include LICENSE/*
include LICENSE.txt
56 changes: 31 additions & 25 deletions developers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ implement it.
How To Release a New Version
============================

When you want release a new version, follow these directions. First, create a
release branch by branching off of the develop branch (substitute in the
appropriate version number):
When you want release a new version, follow these directions. First, bump the
version number on the develop branch, if it hasn't already been bumped. From
the root of the git repository run these commands (substitute the
appropriate version number):

git checkout -b release-?.? develop

Next, bump the version number, if it hasn't already been bumped. From the root
of the git repository run these commands (again, substituting the appropriate
version number):
git checkout develop
echo "__version__ = '0.9'" > src/openbandparams/version.py
git commit -am "Bump version to 0.9"

Next, create a release branch by branching off of the develop branch (again,
substituting the appropriate version number):

echo "__version__ = '?.?'" > src/openbandparams/version.py
git commit -am "Bumbed version number to ?.?"
git checkout -b release-0.9 develop

Now is a good time to run the unit tests and examples, to make sure you haven't
missed any bugs:
Expand Down Expand Up @@ -106,40 +107,41 @@ might look something like this:
`-- index.html

Starting from the `code` directory, execute these commands to copy the html
files from `openbandparams` into `openbandparams-gh-pages/0.8`:
files from `openbandparams` into `openbandparams-gh-pages/0.9`:

rm -rf openbandparams-gh-pages/0.8
cp -R openbandparams/doc/_build/html openbandparams-gh-pages/0.8
rm -rf openbandparams-gh-pages/0.9
cp -R openbandparams/doc/_build/html openbandparams-gh-pages/0.9

Now, if 0.8 didn't exist yet, we need to add it to the front page index.
Now, if 0.9 didn't exist yet, we need to add it to the front page index.
Open `openbandparams-gh-pages/index.html` and find the following line:

<li class="toctree-l1"><a class="reference internal" href="0.7">0.7</a></li>
<li class="toctree-l1"><a class="reference internal" href="0.8">0.8</a></li>

Copy and paste this line just above it:

<li class="toctree-l1"><a class="reference internal" href="0.8">0.8</a></li>
<li class="toctree-l1"><a class="reference internal" href="0.9">0.9</a></li>

Now, commit the changes and push them to github:

cd openbandparams-gh-pages
git add .
git commit -m "added v0.8 documentation"
git commit -m "added v0.9 documentation"
git push origin gh-pages
cd ../openbandparams

Next, merge the changes from the release branch into the master branch, and
tag the release:

git checkout master
git merge --no-ff release-?.?
git tag -a v?.?
git merge --no-ff release-0.9
git tag -a v0.9
git push origin

Then run the following commands from the root of the git repository to build
and upload the release to PyPI:

python setup.py build sdist bdist_egg
python setup.py register upload
python setup.py register sdist bdist_egg upload

Now go to the github page to "create a release" and upload the 'egg', 'zip',
and 'tar.gz' files from the 'dist' directory.
Expand All @@ -149,12 +151,16 @@ If any changes were made during the release branche, merge the release branch
into the develop branch, and then delete the release branch:

git checkout develop
git merge --no-ff release-?.?
git branch -d release-?.?
git push origin
git merge --no-ff release-0.9
git branch -d release-0.9

You might want to make a doc-0.9 branch, in case you find errors in the
documentation you want to correct.

git branch doc-0.9 develop

You can also go ahead and bump the version number now, so that future builds
of the documentation already have the correct version number:

echo "__version__ = '?.?'" > src/openbandparams/version.py
git commit -am "Bumbed version number to ?.?"
echo "__version__ = '0.10'" > src/openbandparams/version.py
git commit -am "Bumbed version number to 0.10"
8 changes: 8 additions & 0 deletions src/openbandparams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
__all__ += parameter.__all__
from .parameter import *

from . import alloy
__all__ += alloy.__all__
from .alloy import *

from . import iii_v_zinc_blende_alloy
__all__ += iii_v_zinc_blende_alloy.__all__
from .iii_v_zinc_blende_alloy import *

from . import iii_v_zinc_blende_binary
__all__ += iii_v_zinc_blende_binary.__all__
from .iii_v_zinc_blende_binary import *
Expand Down
13 changes: 10 additions & 3 deletions src/openbandparams/alloy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

from .parameter import Parameter, MethodParameter

__all__ = ['Alloy']


class Alloy(object):

Expand All @@ -30,7 +32,7 @@ def __init__(self, name, elements, parameters=None):
self._aliases = {}
if parameters is not None:
for parameter in parameters:
self.add_parameter(parameter)
self.set_parameter(parameter)

def __eq__(self, other):
return (type(self) == type(other) and
Expand All @@ -45,8 +47,13 @@ def __getattribute__(self, name):
return self._parameters[name]
elif name in self._aliases:
return self._parameters[self._aliases[name]]

item = super(Alloy, self).__getattribute__(name)

try:
item = super(Alloy, self).__getattribute__(name)
except AttributeError as e:
msg = e.message.replace('object',
"object '{}'".format(self.name))
raise AttributeError(msg)
if isinstance(item, MethodParameter):
# make sure MethodParameters defined with the class
# are bound to this Alloy
Expand Down
Loading

0 comments on commit bc24e59

Please sign in to comment.