Skip to content

Commit

Permalink
version 0.7.0 as seen on pypi (#1284)
Browse files Browse the repository at this point in the history
  • Loading branch information
bqpd authored Mar 21, 2018
1 parent 71478ca commit d139ce4
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Edward Burnell and Warren Hoburg
Copyright (c) 2018 Edward Burnell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 5 additions & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ gpkit/constraints/tight.py
gpkit/exceptions.py
gpkit/interactive/__init__.py
gpkit/interactive/chartjs.py
gpkit/interactive/linking_diagram.py
gpkit/interactive/sankey.py
gpkit/interactive/plotting.py
gpkit/interactive/plot_sweep.py
gpkit/interactive/ractor.py
gpkit/interactive/sensitivity_map.py
gpkit/interactive/widgets.py
gpkit/keydict.py
gpkit/modified_ctypesgen.py
Expand All @@ -36,7 +35,9 @@ gpkit/nomials/math.py
gpkit/nomials/map.py
gpkit/nomials/substitution.py
gpkit/nomials/variables.py
gpkit/pint/usd_cpi.txt
gpkit/_pint/__init__.py
gpkit/_pint/usd_cpi.txt
gpkit/globals.py
gpkit/repr_conventions.py
gpkit/small_classes.py
gpkit/small_scripts.py
Expand All @@ -60,6 +61,7 @@ gpkit/tests/t_vars.py
gpkit/tests/test_repo.py
gpkit/tools/__init__.py
gpkit/tools/autosweep.py
gpkit/tools/docstring.py
gpkit/tools/fmincon.py
gpkit/tools/spdata.py
gpkit/tools/tools.py
Expand Down
2 changes: 1 addition & 1 deletion checkpy3.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cp gpkit/env/settings .
sed -i '1s/.*/installed_solvers : mosek_cli/' gpkit/env/settings
cat gpkit/env/settings
python3 -c docs/source/examples/simpleflight.py
python3 docs/source/examples/simpleflight.py
mv settings gpkit/env
6 changes: 3 additions & 3 deletions docs/source/citinggpkit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Citing GPkit
If you use GPkit, please cite it with the following bibtex::

@Misc{gpkit,
author={Edward Burnell and Warren Hoburg},
author={Edward Burnell},
title={GPkit software for geometric programming},
howpublished={\url{https://github.com/convexengineering/gpkit}},
year={2017},
note={Version 0.6.0}
year={2018},
note={Version 0.7.0}
}
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@

# General information about the project.
project = u'gpkit'
copyright = u'2017 Edward Burnell and Warren Hoburg'
copyright = u'2018 Edward Burnell'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.6'
version = '0.7'
# The full version, including alpha/beta/rc tags.
release = '0.6.0'
release = '0.7.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
12 changes: 12 additions & 0 deletions docs/source/releasenotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ Release Notes

This page lists the changes made in each point version of gpkit.

Version 0.7.0
=============
* Variable's values are now used only in their first ConstraintSet; in other ConstraintSets they're free variables
* Variable values can be preserved by setting ``constant=True`` during variable declaration
* MOSEK home directory can be set by a ``MSKHOME`` environment variable at build time
* ``sol(var)`` now always returns Pint Quantities, even if the variable is dimensionless
* ``sol[...][var]``, on the other hand, now always returns floats / numpy arrays of floats
* Optional boundedness checking in docstring (see usage in `docs <http://gpkit.readthedocs.io/en/latest/modelbuilding.html#multipoint-analysis-modeling>`_)
* Automatic boundedness checking for GPs
* `Sankey diagrams <http://gpkit.readthedocs.io/en/latest/visint.html>`_
* Many other fixes

Version 0.6.0
=============
* new much faster NomialMap data structure (#682)
Expand Down
2 changes: 1 addition & 1 deletion gpkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"GP and SP modeling package"
__version__ = "0.6.0"
__version__ = "0.7.0"

from ._pint import units, ureg, DimensionalityError
from .globals import settings
Expand Down
7 changes: 3 additions & 4 deletions gpkit/nomials/map.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"Implements the NomialMap class"
from collections import defaultdict
import numpy as np
from .. import units as ureg_at_init
from ..exceptions import DimensionalityError
from ..small_classes import HashVector, Quantity, Strings
from ..small_scripts import mag
from ..varkey import VarKey
from .substitution import parse_subs

DIMLESS_QUANTITY = Quantity(1, "dimensionless") if ureg_at_init else 1
DIMLESS_QUANTITY = Quantity(1, "dimensionless")


class NomialMap(HashVector):
Expand Down Expand Up @@ -179,8 +178,8 @@ def mmap(self, orig):
"""
m_from_ms = defaultdict(dict)
pmap = [{} for _ in self]
origexps = orig.keys()
selfexps = self.keys()
origexps = list(orig.keys())
selfexps = list(self.keys())
for orig_exp, self_exp in self.expmap.items():
total_c = self.get(self_exp, None)
if total_c:
Expand Down
6 changes: 3 additions & 3 deletions gpkit/nomials/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ def __eq__(self, other):
if isinstance(other, MONS):
try: # if both are monomials, return a constraint
return MonomialEquality(self, "=", other)
except ValueError, e: # units mismatch or infeasible constraint
print "Infeasible monomial equality:", e
except ValueError as e: # units mismatch or infeasible constraint
print("Infeasible monomial equality: %s" % e)
return False
return super(Monomial, self).__eq__(other)

Expand Down Expand Up @@ -491,7 +491,7 @@ def sens_from_dual(self, la, nu, result):
return self._was_sig_now_posy_senss(nu, result)
presub, = self.unsubbed
if hasattr(self, "pmap"):
nu_ = np.zeros(len(presub.cs))
nu_ = np.zeros(len(presub.hmap))
for i, mmap in enumerate(self.pmap):
for idx, percentage in mmap.items():
nu_[idx] += percentage*nu[i]
Expand Down
1 change: 1 addition & 0 deletions gpkit/small_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from operator import xor
import numpy as np
from . import ureg
from functools import reduce # pylint: disable=redefined-builtin

try:
isinstance("", basestring)
Expand Down
6 changes: 3 additions & 3 deletions gpkit/solution_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .small_scripts import mag, isnan
from .repr_conventions import unitstr

DIMENSIONLESS = Quantity(1, "dimensionless")
DIMLESS_QUANTITY = Quantity(1, "dimensionless")


def senss_table(data, showvars=(), title="Sensitivities", **kwargs):
Expand Down Expand Up @@ -111,13 +111,13 @@ def subinto(self, posy):
# if uniting on get ever becomes a speed hit, cache the results
if isinstance(got, dict):
for key, value in got.items():
got[key] = value*(key.units or DIMENSIONLESS)
got[key] = value*(key.units or DIMLESS_QUANTITY)
else:
if hasattr(posy, "units"):
units = posy.units
else:
units = list(self["variables"].keymap[posy])[0].units
got = got*(units or DIMENSIONLESS)
got = got*(units or DIMLESS_QUANTITY)
return got
elif not hasattr(posy, "sub"):
raise ValueError("no variable '%s' found in the solution" % posy)
Expand Down
4 changes: 0 additions & 4 deletions run_tests.py.lprof

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

LICENSE = """The MIT License (MIT)
Copyright (c) 2017 Edward Burnell and Warren Hoburg
Copyright (c) 2018 Edward Burnell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -49,11 +49,11 @@
name="gpkit",
description="Package for defining and manipulating geometric "
"programming models.",
author="Edward Burnell and Warren Hoburg",
author="Edward Burnell",
author_email="[email protected]",
url="https://www.github.com/convexengineering/gpkit",
install_requires=["numpy >= 1.12.1", "pint >= 0.7", "scipy"],
version="0.6.0.0",
version="0.7.0.0",
packages=["gpkit", "gpkit.tools", "gpkit.interactive", "gpkit.constraints",
"gpkit.nomials", "gpkit.tests", "gpkit._mosek", "gpkit._pint"],
package_data={"gpkit": ["env/*"],
Expand Down

0 comments on commit d139ce4

Please sign in to comment.