Code Monkey home page Code Monkey logo

large-scale-temporal-shift-study's People

Contributors

cxji avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

large-scale-temporal-shift-study's Issues

No version argument in data extraction scripts

In replace_zeros_with_null_in_measurement.py there is no version argument as is mentioned in the guide:

To identify measurements with value 0 that should be null and replace them with null, first get a preliminary version of the reference ranges by running python3 replace_zeros_with_null_in_measurement.py --create_table=range_{direction} --version=[int] to produce cdm_measurement_aux.measurement_{direction}_references, a table with the most likely reference range for each measurement concept. Set {direction} to low and high.

Host hardcoded in creation of sqlalchemy engine

I think in general the sqlalchemy.create_engine needs to be revised. To get it working for me I used:

engine = sqlalchemy.create_engine(f`postgresql://{config.user}:{config.password}@{config.host}/{config.dbname}`, echo=False)

Then I added user, password and host to the config file.

Might also be worth refactoring the engine creation and session execution out into a separate function since it's included in multiple functions and is always the same (that I've seen so far)

Wrong import of session scope

Here session scope is imported as:

from utils import session_scope but I believe it should be from utils.dbutils import session_scope

Likewise I needed to modify the import in load_lab_reference.py to the same but I see that you add the directory to the path there. From which directory are you supposed to run the scripts in data_extraction?

Conda env file not suitable for windows

The conda_env_pkgs.txt file is pinning specific binary builds of packages which only work on linux. Unfortunately I need to use windows to access a database. Is it possible to include a file with no build specific info and only the direct dependencies of the project ? For example the following command should work:

conda env export --no-builds --from-history -f conda_env_no_build.yml

cdm_measurement_aux schema is hardcoded in sql files

I think in many cases users only have one writable schema tied to their users. To get this to work in my case I removed cdm_measurement_aux schema and replaced with {scratch_schema}. I then added the scratch_schema to the config file:

scratch_schema = `my_user_name`

Then when formatting the sql file I add this variable. I think this is more in line with situations where users can't create their own schemas but have a fixed one they can write to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.