Opened 12 years ago
Closed 12 years ago
#36690 closed submission (fixed)
EGSimulation
Reported by: | ben@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | nerdling (Jeremy Lavergne) | |
Port: | EGSimulation |
Description
By using a simulation of firm sizes (using a lognormal distribution) and specified geographic regions, standard deviations and employee head count, we can compute the critical regions for the Ellison & Glaeser statistic. In the process, it also calculates herfindahl values and provides critical regions.
Attachments (7)
Change History (22)
Changed 12 years ago by ben@…
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Changed 12 years ago by ben@…
Attachment: | Portfile.2 added |
---|
comment:2 Changed 12 years ago by ben@…
I've added the file "Portfile.2" which addresses Ryan's comments and diff.diff, which is a difference file from the two port files (someone at some point told me MacPorts preferred those).
comment:3 Changed 12 years ago by mf2k (Frank Schima)
This port does not properly use the unified python portgroup.
- Change
categories
tocategories-append
to not overwrite the python category - Change
depends_lib
todepends_lib-append
to not overwrite required dependencies - The dependencies themselves must be written like
port:py${python.version}-numpy
- The entire depends_lib-append lines must be placed inside a
if {$subport != $name} {
block - Did the listed maintainer agree to maintain this port?
comment:4 Changed 12 years ago by mf2k (Frank Schima)
Also, the port name should be "py-EGSimulation".
Changed 12 years ago by ben@…
Attachment: | Portfile.3 added |
---|
Changed 12 years ago by ben@…
comment:5 follow-up: 6 Changed 12 years ago by ben@…
macsforever2000 -
I've updated the port file to account for your suggestions: 2 and 3 (I've uploaded a new port file, portfile 3, as well as a diff -- a diff to the original). I did not do the others for the following reasons:
1) This script isn't a python module. In fact it has nothing to do with python other than it is written in it. What it is is a command line tool for economist that goes with a paper we just submitted to JUE studying firm agglomeration. Generally when you look through the macports categories, the category they are in depends on what they do, not what they are written in.
4) I've tested it with a if {$subport != $name} { block and it results in the dependancies not being installed when they are not already installed
5) The maintainer is me, but that address is associated to my university address.
For the same reason as 1, I have not renamed it to py-EGSimulation.
comment:6 Changed 12 years ago by mf2k (Frank Schima)
That's fine. In that case, you need to add variants for different python versions so people can choose which python version they want. I'd suggest at least python26 and python27 variants and maybe python32 if it works with the python 3 series. Also, you can no longer use ${python.version} and ${python.default_version } because they rely on a chosen pyXY subport, which you don't have.
comment:7 Changed 12 years ago by mf2k (Frank Schima)
See the ROOT port for an example among many others.
Changed 12 years ago by ben@…
Attachment: | Portfile.4 added |
---|
Changed 12 years ago by ben@…
Attachment: | diff.2.diff added |
---|
comment:8 Changed 12 years ago by ben@…
According to your portgroup documentation here:
http://guide.macports.org/chunked/reference.portgroup.html
the portgroup for python is loading port:pythonXY by default. From Portfile.3 and Portfile.4, I've been using append as you suggest.
I've added 26 support, though for performance reasons they really should use 27.
Note: Latest version is Portfile.4 ; there is also a diff file diff.2.diff which is the difference between the original submission and Portfile.4
comment:9 Changed 12 years ago by mf2k (Frank Schima)
Unless you name the port "py-EGSimulation" and use subports, there is no way to choose py26. So this really cannot work. Have you tried it? I've never seen the unified python portgroup used in this way before. Unfortunately it is not fully documented yet.
Also, you do not need to attach diffs. This is a new port and only the latest portfile matters.
Changed 12 years ago by ben@…
Attachment: | Portfile.5 added |
---|
comment:10 Changed 12 years ago by ben@…
I don't want them to install a py26 version. As I said, for performance reasons that doesn't make sense. For people doing real work with this tool, they will set the iteration count up at 100000 or so, every little bit counts and py27 is the fastest version (I'm not saying python 2.7 is faster, in general, or anything. Specifically: this tool with our particular packages, i.e. numpy, scipy etc is fastest under python 2.7). (I know because we built an enormous critical value table with this tool)
Yes, I've tested every portfile I've attached. Portfile.5 is really what I want (which I removed the 26 reference). I thought you were insisting that I have py26 support. If I misunderstood you, I'm sorry.
comment:11 Changed 12 years ago by ben@…
I haven't heard any comments on portfile.5; does that mean everyone is ok with it? If not please let me know what I need to do to make it so.
comment:12 follow-up: 13 Changed 12 years ago by nerdling (Jeremy Lavergne)
Cc: | snc@… added |
---|
Portfile.5 still seems written like a python module.
You should remove the PortGroup and simply use depends_run-append port:python27 (whichever depends_* are appropriate for your needs).
comment:13 Changed 12 years ago by pixilla (Bradley Giesbrecht)
Replying to snc@…:
Portfile.5 still seems written like a python module.
You should remove the PortGroup and simply use depends_run-append port:python27 (whichever depends_* are appropriate for your needs).
The ports use setup.py and not configure/make. Isn't it nice to use the python PortGroup in this case?
comment:14 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|---|
Port: | EGSimulation added |
Status: | new → assigned |
There's nothing wrong with using the python portgroup for a program, rather than a module. And there's no need for the author to provide variants for different python versions, especially when the author (who is also the author of the software in this case) says python27 is the best version to use. That's the version we'd like MacPorts users to be using anyway.
comment:15 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks for this port! I've committed it in r99349 with these changes:
- made use of github portgroup
- added required "platforms" variable
- removed "python.default_version 27" since that's the default
- fixed livecheck
- rearranged some lines
The license should be listed as "public-domain" (no spaces in license names).
The line "extract.mkdir no" can be removed; that's the default.
There is a github portgroup that could be used, but for this port it might not actually help simplify anything.