NASA-IMPACT / bps-numerical

1 stars 0 forks source link

Initial Code setup #1

Closed NISH1001 closed 2 years ago

NISH1001 commented 2 years ago

This iteration consists of a few modules and scripts, notably:

TODO

cc: @xhagrg

NISH1001 commented 2 years ago

@xhagrg can I merge now?

xhagrg commented 2 years ago

Fix the lint errors and we are golden.

NISH1001 commented 2 years ago

Fix the lint errors and we are golden.

The lining error is a bit weird as I am manually adding bps_numerical library to the external scripts at scripts/. So, before importing anything else, I have to do sys.path.append(...) (for time being, until we create a setup.py based installation)

For instance, the following code could remove the lining error "Module level import not at top of file (E402)", but the script will throw an error as we can't import the bps_numerical module beforehand:

import os
import sys
import time

import click
from bps_numerical.preprocessing import merge_gene_phenotype, standardize_gene_data
from loguru import logger

sys.path.append("./")
sys.path.append("../code/")
sys.path.append("./code/")

To resolve this, we could create setup.py (which I am thinking in the next release). Or perhaps PYTHONPATH works?

Edit:

PYTHONPATH worked