Skip to content

Commit

Permalink
Changes for PyPI submission #17, fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
virgesmith committed Jul 16, 2018
1 parent 81d459e commit d2cf720
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.md
include doc/*
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Build Status](https://travis-ci.org/nismod/ukpopulation.png?branch=master)](https://travis-ci.org/nismod/ukpopulation) [![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)
[![status](http://joss.theoj.org/papers/269be2c1044e902e2cf7716bc9f0f7c0/status.svg)](http://joss.theoj.org/papers/269be2c1044e902e2cf7716bc9f0f7c0)
[![Version 1.0.0](https://zenodo.org/badge/doi/10.5281/zenodo.1250366.svg)](https://github.com/nismod/ukpopulation/releases/tag/1.0.0)
[![PyPI version](https://badge.fury.io/py/ukpopulation.svg)](https://badge.fury.io/py/ukpopulation)

# ukpopulation: UK Demographic Projections

Expand Down Expand Up @@ -112,19 +113,20 @@ This package uses the [UKCensusAPI](http://github.com/virgesmith/UKCensusAPI) pa

Requires Python 3.5 or higher. Dependencies *should* resolve automatically, but if not see [troubleshooting](#troubleshooting)

Install from git repo:

```bash
$ pip install --process-dependency-links git+https://github.com/nismod/ukpopulation.git
$ python3 -m pip install git+https://github.com/nismod/ukpopulation.git
```
It appears that the `--process-dependency-links` flag is necessary for successful installation because the UKCensusAPI dependency is (currently) only installable from git.

Some of the examples (see below) plot graphs and have a dependency on matplotlib, which can be installed with
```bash
$ pip install matplotlib
$ python3 -m pip install matplotlib
```

## Testing

The test data cache directory contains a file NOMIS_API_KEY which defines a dummy key for testing purposes only. The test suit can be run using:
First Clone the repo or a fork of it. The test data cache directory contains a file NOMIS_API_KEY which defines a dummy key for testing purposes only. The test suit can be run from the (project root dir) using:

```bash
$ ./setup.py test
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ requests
openpyxl
beautifulsoup4
lxml
git+https://github.com/virgesmith/UKCensusAPI@master#egg=ukcensusapi-1.0.0
ukcensusapi
40 changes: 20 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
#!/usr/bin/env python3

from setuptools import setup
import setuptools

def readme():
with open('README.md') as f:
return f.read()

setup(name='ukpopulation',
version='1.0.1',
description='Download, collate, cache, and query Population projections',
setuptools.setup(
name='ukpopulation',
version='1.0.2',
description='Download, cache, collate, filter and extrapolate UK Population estimates and projections',
long_description=readme(),
long_description_content_type="text/markdown",
url='https://github.com/nismod/ukpopulation',
author='Andrew P Smith, Tom Russell',
author_email='[email protected], [email protected]',
license='MIT',
packages=['ukpopulation'],
zip_safe=False,
install_requires=[
'distutils_pytest',
'numpy',
'pandas',
'requests',
'openpyxl',
'beautifulsoup4',
'lxml',
'ukcensusapi'
],
dependency_links=['git+https://github.com/virgesmith/UKCensusAPI.git@master#egg=ukcensusapi-1.0.0'],
packages=setuptools.find_packages(),
install_requires=["numpy",
"pandas",
"requests",
"openpyxl",
"beautifulsoup4",
"lxml",
"ukcensusapi"],
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
),
test_suite='nose.collector',
tests_require=['nose'],
python_requires='>=3'
tests_require=['nose']
)
2 changes: 1 addition & 1 deletion ukpopulation/nppdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def __download_ppp(self):
pop90plus["C_AGE"] = 90

# remove the aggregated categories from the original and append the aggregate
ppp = ppp[ppp.C_AGE < 90].append(pop90plus, ignore_index=True)
ppp = ppp[ppp.C_AGE < 90].append(pop90plus, ignore_index=True, sort=False)

return ppp

Expand Down

0 comments on commit d2cf720

Please sign in to comment.