Git Product home page Git Product logo

oe_find_sds-public's Introduction

Python 3 Updates codecov python version

FIND MISSING SDS FOR CHEMICALS IN OPEN ENVENTORY


This program is designed specifically for Open Enventory to fix issue with molecule missing sds (could not be extracted through "Read data from supplier") This programs does:

CONTENTS


DETAILS

This programs does:

  1. Connect into mysql database and find molecule in 'molecule' table of specific database and find those molecule with missing sds
  2. Try to download sds files into a folder in /var/lib/mysql/missing_sds (For Linux environment with LAMP stack)
  3. Update those SQL entries with new downloaded sds files

REQUIREMENTS

  • Python 3.6+
  • Linux machine root access to the server hosting Open Enventory (to create a download folder if not existed). If user does not have root account (or sudo), you can:
    1. Change the download_path to a different location that you have read and write permission.
    2. Comment out exit(1) in find_sds.py file

USAGE

  1. Clone this repository:

    git clone https://github.com/khoivan88/oe_find_sds-public.git    #if you have git
    # if you don't have git, you can download the zip file then unzip
  2. Change into the directory of the program:

    cd oe_find_sds-public

NOTE

  • This file is made for Linux environment, you should be able to used it on other OS by changing the location of the "download_path"
    • Make sure you use an absolute path
    • For Windows:
      • Use of either forward slashes (/) or backward slashes (\) should be ok!

      • If you use XAMPP (or similar PHP, Apache, SQL package), you can try this path:

        download_path = r'C:/xampp/mysql/data/missing_sds'

  1. (Optional): create virtual environment for python to install dependency: Note: you can change oe_find_sds_venv to another name if desired.

    python -m venv oe_find_sds_venv   # Create virtual environment
    source oe_find_sds_venv/bin/activate    # Activate the virtual environment on Linux
    # oe_find_sds_venv\Scripts\activate    # Activate the virtual environment on Windows
  2. Install python dependencies:

    pip install -r requirements.txt
  3. Run the program:

    python oe_find_sds/find_sds.py
    • Answer questions for:
      • confirming running under root
      • mySQL root password (typing password will not be shown on screen)
      • the name of the database you want to update (twice to confirm)

VERSIONS

See here for the most up-to-date

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.