Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements: Install Flatten Tool from PyPI #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ cd rdls-spreadsheet-template

Subsequent instructions assume that your current working directory is `rdls-spreadsheet-template`, unless otherwise stated.

#### Initialise and update submodules:

```bash
git submodule init
git submodule update
```

#### Create and activate a Python virtual environment

The following instructions assume you have [Python 3.8](https://www.python.org/downloads/) or newer installed on your machine.
Expand Down
1 change: 0 additions & 1 deletion flatten-tool
Submodule flatten-tool deleted from dad983
6 changes: 6 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ def create_template(component, schema_url, wkt):
command = f"{command} --convert-wkt"
subprocess.run(command.split(" "))

# Truncate CSV filenames to 31 characters for Excel compatibility
filenames = os.listdir(temp_path)
for index, filename in enumerate(filenames):
if filename.split('.')[-1] == 'csv':
os.rename(os.path.join(temp_path, filename), os.path.join(temp_path, ''.join([filename.split('.csv')[0][:31], '.csv'])))

# Generate a mapping sheet to use as a source for field metadata
schema_table = mapping_sheet(schema, include_codelist=True)
field_metadata = {field["path"]: field for field in schema_table[1]}
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ click
ocdskit
requests
xlsxwriter
./flatten-tool
flattentool>=0.22
14 changes: 6 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile
Expand Down Expand Up @@ -28,10 +28,10 @@ defusedxml==0.7.1
# via odfpy
et-xmlfile==1.1.0
# via openpyxl
flattentool @ file:///mnt/9E863086863060C7/GDrive/Work/Repositories/risk_data_library/rdls-spreadsheet-template/flatten-tool
exceptiongroup==1.2.1
# via cattrs
flattentool==0.25.0
# via -r requirements.in
geojson==3.0.1
# via flattentool
idna==3.4
# via requests
ijson==3.2.3
Expand All @@ -48,8 +48,6 @@ jsonref==1.1.0
# ocdsmerge
lxml==4.9.3
# via flattentool
numpy==1.25.2
# via shapely
ocdsextensionregistry==0.3.8
# via ocdskit
ocdskit==1.1.8
Expand Down Expand Up @@ -80,14 +78,14 @@ requests-cache==1.1.0
# via ocdsextensionregistry
schema==0.7.5
# via flattentool
shapely==2.0.1
# via flattentool
six==1.16.0
# via
# url-normalize
# zodb
transaction==3.1.0
# via zodb
typing-extensions==4.12.2
# via cattrs
url-normalize==1.4.3
# via requests-cache
urllib3==2.0.4
Expand Down