Skip to content

Commit

Permalink
import libpysal instead of pysal for doctests and add CHANGELOG.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
weikang9009 committed May 18, 2018
1 parent a79bce4 commit ae9dc2b
Show file tree
Hide file tree
Showing 7 changed files with 287 additions and 37 deletions.
22 changes: 21 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,24 @@
.rope*
.idea/
notebooks/.ipynb_checkpoints/
.DS_Store
.DS_Store
.ipynb_checkpoints/
*.bak
.eggs/
*.egg-info/

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__
28 changes: 28 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
v<1.1.0>, 2018-05-17

This release is the first tagged release of pointpats on Github.
Starting from this release, pointpats supports python 3.5 and 3.6 only.

GitHub stats for 2017/04/22 - 2018/05/17

These lists are automatically generated, and may be incomplete or contain duplicates.


We closed a total of 9 issues, 4 pull requests and 5 regular issues;
this is the full list (generated with the script
:file:`tools/github_stats.py`):

Pull Requests (4):

* :ghpull:`12`: b'chore: libpysal is 3 only now so removing travis tests on python 2'
* :ghpull:`11`: b'try removing conversion and see if this passes'
* :ghpull:`10`: b'updating license'
* :ghpull:`9`: b'Update the Readme file, change the relative URL links to absolute URLs'

Issues (5):

* :ghissue:`12`: b'chore: libpysal is 3 only now so removing travis tests on python 2'
* :ghissue:`11`: b'try removing conversion and see if this passes'
* :ghissue:`10`: b'updating license'
* :ghissue:`9`: b'Update the Readme file, change the relative URL links to absolute URLs'
* :ghissue:`8`: b'Relative links to notebooks on pypi landing page are broken'
50 changes: 25 additions & 25 deletions pointpats/distance_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,11 @@ class Genv(Envelopes):
Examples
--------
>>> import pysal as ps
>>> from points.distance_statistics import Genv
>>> from pysal.contrib import shapely_ext
>>> from points.process import PoissonPointProcess
>>> from points.window import Window
>>> import libpysal as ps
>>> from pointpats.distance_statistics import Genv
>>> from libpysal.cg import shapely_ext
>>> from pointpats.process import PoissonPointProcess
>>> from pointpats.window import Window
>>> va = ps.open(ps.examples.get_path("vautm17n.shp"))
>>> polys = [shp for shp in va]
>>> state = shapely_ext.cascaded_union(polys)
Expand Down Expand Up @@ -748,11 +748,11 @@ class Fenv(Envelopes):
Examples
--------
>>> import pysal as ps
>>> from points.distance_statistics import Fenv
>>> from pysal.contrib import shapely_ext
>>> from points.process import PoissonPointProcess
>>> from points.window import Window
>>> import libpysal as ps
>>> from pointpats.distance_statistics import Fenv
>>> from libpysal.cg import shapely_ext
>>> from pointpats.process import PoissonPointProcess
>>> from pointpats.window import Window
>>> va = ps.open(ps.examples.get_path("vautm17n.shp"))
>>> polys = [shp for shp in va]
>>> state = shapely_ext.cascaded_union(polys)
Expand Down Expand Up @@ -828,11 +828,11 @@ class Jenv(Envelopes):
Examples
--------
>>> import pysal as ps
>>> from points.distance_statistics import Jenv
>>> from pysal.contrib import shapely_ext
>>> from points.process import PoissonPointProcess
>>> from points.window import Window
>>> import libpysal as ps
>>> from pointpats.distance_statistics import Jenv
>>> from libpysal.cg import shapely_ext
>>> from pointpats.process import PoissonPointProcess
>>> from pointpats.window import Window
>>> va = ps.open(ps.examples.get_path("vautm17n.shp"))
>>> polys = [shp for shp in va]
>>> state = shapely_ext.cascaded_union(polys)
Expand Down Expand Up @@ -905,11 +905,11 @@ class Kenv(Envelopes):
Examples
--------
>>> import pysal as ps
>>> from points.distance_statistics import Kenv
>>> from pysal.contrib import shapely_ext
>>> from points.process import PoissonPointProcess
>>> from points.window import Window
>>> import libpysal as ps
>>> from pointpats.distance_statistics import Kenv
>>> from libpysal.cg import shapely_ext
>>> from pointpats.process import PoissonPointProcess
>>> from pointpats.window import Window
>>> va = ps.open(ps.examples.get_path("vautm17n.shp"))
>>> polys = [shp for shp in va]
>>> state = shapely_ext.cascaded_union(polys)
Expand Down Expand Up @@ -980,11 +980,11 @@ class Lenv(Envelopes):
Examples
--------
>>> import pysal as ps
>>> from points.distance_statistics import Lenv
>>> from pysal.contrib import shapely_ext
>>> from points.process import PoissonPointProcess
>>> from points.window import Window
>>> import libpysal as ps
>>> from pointpats.distance_statistics import Lenv
>>> from libpysal.cg import shapely_ext
>>> from pointpats.process import PoissonPointProcess
>>> from pointpats.window import Window
>>> va = ps.open(ps.examples.get_path("vautm17n.shp"))
>>> polys = [shp for shp in va]
>>> state = shapely_ext.cascaded_union(polys)
Expand Down
6 changes: 3 additions & 3 deletions pointpats/pointpattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PointPattern(object):
Examples
--------
>>> from points.pointpattern import PointPattern
>>> from pointpats.pointpattern import PointPattern
>>> points = [[66.22, 32.54], [22.52, 22.39], [31.01, 81.21],
... [9.47, 31.02], [30.78, 60.10], [75.21, 58.93],
... [79.26, 7.68], [8.23, 39.93], [98.73, 77.17],
Expand All @@ -60,9 +60,9 @@ class PointPattern(object):
>>> pp.lambda_hull
0.0022667153468973137
>>> pp.hull_area
5294.0039500000003
5294.00395
>>> pp.mbb_area
7638.2000000000007
7638.200000000001
"""
def __init__(self, points, window=None, names=None, coord_names=None):
Expand Down
16 changes: 8 additions & 8 deletions pointpats/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ class PoissonPointProcess(PointProcess):
Examples
--------
>>> import pysal as ps
>>> import libpysal as ps
>>> import numpy as np
>>> from points.window import Window, poly_from_bbox
>>> from pysal.contrib import shapely_ext
>>> from pointpats.window import Window, poly_from_bbox
>>> from libpysal.cg import shapely_ext
Open the virginia polygon shapefile
>>> va = ps.open(ps.examples.get_path("virginia.shp"))
Expand Down Expand Up @@ -339,10 +339,10 @@ class PoissonClusterPointProcess(PointProcess):
Examples
--------
>>> import pysal as ps
>>> import libpysal as ps
>>> import numpy as np
>>> from points.window import Window, poly_from_bbox
>>> from pysal.contrib import shapely_ext
>>> from pointpats.window import Window, poly_from_bbox
>>> from libpysal.cg import shapely_ext
Open the virginia polygon shapefile
>>> va = ps.open(ps.examples.get_path("virginia.shp"))
Expand Down Expand Up @@ -433,8 +433,8 @@ def realize(self, n):
l, b, r, t = self.window.bbox
d = self.radius
# get parent points
pxs = np.random.uniform(l, r, (n/self.children, 1))
pys = np.random.uniform(b, t, (n/self.children, 1))
pxs = np.random.uniform(l, r, (int(n/self.children), 1))
pys = np.random.uniform(b, t, (int(n/self.children), 1))
cents = np.hstack((pxs, pys))
# generate children points
pnts = [runif_in_circle(self.children, d, center) for center in cents]
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

from distutils.command.build_py import build_py

with open('README.rst') as file:
long_description = file.read()

pth = os.path.dirname(os.path.abspath(__file__))+ '/requirements.txt'

REQUIREMENTS = [i.strip() for i in open(pth).readlines()]
Expand All @@ -15,6 +18,7 @@
setup(name='pointpats',
version=version,
description='Methods and Functions for planar point pattern analysis',
long_description = long_description,
url='https://github.com/pysal/pointpats',
maintainer='Hu Shao',
maintainer_email='shaohutiger@gmail.com',
Expand Down
Loading

0 comments on commit ae9dc2b

Please sign in to comment.