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

Nurture dashboard exporter #7

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Conversation

George-D-S
Copy link

This would then need deploying to Live so I can setup a cron job to produce the 2 exports.

@George-D-S George-D-S requested a review from kaselis May 16, 2018 14:22
@coveralls
Copy link

coveralls commented May 17, 2018

Coverage Status

Coverage decreased (-0.4%) to 60.515% when pulling d36c552 on nurture-dashboard-exporter into 52c4852 on master.

@kaselis
Copy link
Contributor

kaselis commented May 17, 2018

I've tried running it, and got this:

Traceback (most recent call last):
  File "C:\Users\nbk3415\projects\radar\venv36\Scripts\radar-exporter-script.py", line 11, in <module>
    load_entry_point('radar', 'console_scripts', 'radar-exporter')()
  File "c:\users\nbk3415\projects\radar\radar\exporter\__main__.py", line 118, in main
    cursor.execute(sqlstring)
sqlite3.OperationalError: unrecognized token: ":"

@George-D-S
Copy link
Author

I've rebased my copy with the main one and don't get the error when I run it.

Are you using the same INI file? That error would be explained if there was an exporter or column that had a colon character in it as the code isn't escaping those.

@George-D-S
Copy link
Author

Having struggled with this all afternoon I've decided to make it error with NotImplemented if someone tries to export the results table. Fiona wants this available and, at the moment I think the UKRDC work is more pressing. I also can't imagine why someone would want to actually do this though as its a non-normalised structure.

Where I got to was that when I tried treating it as a "standard" extract something would complain due to its use of getattr when (I think) Python doesn't allow attributes to be defined in anything but ascii.

I then tried to write a custom plain_rows function but had problems getting the number of columns to match the number of data items which I couldn't explain. Some of this was possibly due to there being multiple results of a certain type for the same patient/hospital/time. This would also create further difficulties in the naming of columns etc.

Just to note as well that as my venv is Python 2.7 I had to install https://github.com/Drekin/win-unicode-console to stop it complaining when I tried to print certain values etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants