Comments (6)
The example above can also be run on Colab with GLPK after the following:
!curl -L -O https://github.com/tulip-control/polytope/archive/master.zip
!unzip master.zip
!apt-get install libglpk-dev
!export CVXOPT_BUILD_GLPK=1 && cd polytope-master && pip install -r requirements/extras.txt
!cd polytope-master && pip install .
I recommend that we provide several examples in Jupyter notebooks that can be run on Binder and Colab. (This is related to tulip-control/tulip-control#206.)
temporary demo: https://colab.research.google.com/drive/1rLdDAke83DgzkciJUVGiAJX4BSJeUNsI
from polytope.
Now Binder can be used. To generate random polytopes in your web browser, go to https://beta.mybinder.org/v2/gh/tulip-control/polytope.git/master, launch, and try
%matplotlib inline
import numpy as np
import polytope as pc
V = np.random.random((5, 2))
print(V)
P = pc.qhull(V)
print(P)
P.plot()
from polytope.
I agree with omitting optional dependencies as for example cvxopt
from requirements.txt
. One possibility is to comment them, letting the user uncomment them as needed. Optional dependencies that are easy to install (e.g., pure Python and available from PyPI), if any (why omit them from install_requires
if they pose no challenges), could remain in requirements.txt
.
One benefit of commenting those dependencies is that an unfamiliar user would see them listed among the other entries. On the other hand, designing a developer's file for an unfamiliar user is an oxymoron.
I think that establishing semantic separation is a solid argument. I would like to avoid increasing the number of files in the repository's root, but otherwise I am fine with the alternatives. That install_requires
includes required dependencies suggests putting only extras in requirements.txt
, but on the other hand install_requires
does not pin the dependencies, which is what requirements files are for.
Looking at what the widely used Python packages do, I liked the most the approach of networkx
: a directory named requirements
. I suggest that we use this approach, which accommodates for multiple requirements files:
- without producing any clutter in the top directory, and
- while keeping it easy to find where the requirements files are located (instead of putting them under a directory with a different name).
This approach makes it possible to also include a README under the requirements/
directory, as networkx
demonstrates. Another little detail is that in such a directory, the prefix "requirements" can be dropped, so the files become requirements/default.txt
, requirements/extras.txt
etc., which requires about the same amount of typing (this is a secondary observation of course).
Unlike networkx
though, I think that requirements files should pin dependencies, in accord with standard practice for ensuring reproducibility.
from polytope.
I agree with your proposal to follow the practice of the networkx
project except that we pin dependency versions, i.e., use ==
instead of >=
for requirement specifiers.
Note that networkx
also uses requirements.txt in the root of the sourcetree. It only includes paths to the actual requirements files. It might be useful for us to do this, too, because it ensures that automation tools use the correct requirements.txt file.
from polytope.
Relevant to #15.
from polytope.
The suggested example worked on first try.
from polytope.
Related Issues (20)
- collect bibliography from source files HOT 3
- The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead
- Polytope error for 1D HOT 2
- update to `networkx >= 2.0` HOT 1
- cvxopt 1.2.0 bug HOT 5
- support Python 3.7 HOT 4
- create regression test for bug fix of PR #56
- release `polytope == 0.2.2` HOT 1
- Error message says "Cannot plot polytopes of dimension larger than 2", but can't plot dimension 1 aswell HOT 2
- Zero Volume for 14D polytope HOT 8
- remove support for Python 2.7, 3.5, 3.6 HOT 7
- support Python 3.10
- With large scales `reduce` can remove non-redundant hyperplanes HOT 2
- `.project` can return redundant hyperplanes despite `minrep == True` HOT 1
- Plotting polytopes on same plot/ adding "_get_patch" as an import option
- How to use cvxopt to find intersection between polytope HOT 4
- polytope volume changing on each trial HOT 2
- Polytope.reduce and removal of possibly overlapping polytopes HOT 3
- Updated release on PyPI? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polytope.