Skip to content

Commit

Permalink
Add setuptools and update install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
timwis committed Oct 9, 2019
1 parent 250ff23 commit fb5fe90
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
data
venv
*.egg-info
__pycache__
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pipenv-setup = "*"

[packages]
click = "*"
Expand Down
82 changes: 80 additions & 2 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
easier to use by denormalising it, concatenating the files, adding headers, and
standardising some of the formatting.

## Usage
With Python 3 and [Pipenv][pipenv] installed:
## Installation
Ensure you have Python 3.7+ installed on your machine.

```
pip3 install --user "git+https://github.com/timwis/code-point-open-transformer#egg=code-point-open-transformer"
```

1. Clone this repository and run `pipenv install` within it.
2. Download the [Code-Point Open][cpo] dataset and unzip it.
3. Activate a local environment using `pipenv shell`.
4. Run the script using `python bin/cli.py /path/to/unzipped_data/ /path/to/output_dir/`
## Usage
```
Usage: codepointopen [OPTIONS] PACKAGE_DIR OUTPUT_DIR
The script will write a `.csv` file for every set of regions included in the code-point
open "code list" files. It will also merge all the data files, converting linked values
to [CURIE][curie] format. Finally, it modifies the `Postcode` column to format it with a
single space
Improve usability of Code-Point Open data and link to lookup files
```

This script does the following:

Expand Down
Empty file.
File renamed without changes.
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from setuptools import setup

setup(
name="code_point_open_transformer",
version="2.0",
py_modules=["code_point_open_transformer"],
install_requires=[
"click==7.0",
"openpyxl==3.0.0",
"tqdm==4.36.1",
"xlrd==1.2.0",
],
dependency_links=[],
entry_points="""
[console_scripts]
codepointopen=code_point_open_transformer.cli:main
""",
)

0 comments on commit fb5fe90

Please sign in to comment.