Coder Social home page Coder Social logo

lrma-cloud-utils's Introduction

lrmaCU

A python library for interacting with GCS, Cromwell, and Terra.

The repo is organized into two main components, src and notebooks.

src holds code for the core library, named lrmaCU, providing functions for

  • setting up and maintaining Terra workspace tables,
  • submit workflows on Terra workspaces,
  • interacting with GCS,
  • sending out email notifications,
  • diagnosing failed cromshell jobs.

notebooks contains example codes for using the library.

Installation

Two options:

  • clone this repo and pip install .

  • install from git directly, optionally specifying a commit/branch/tag

    python3 -m pip install --upgrade \
      git+https://github.com/broadinstitute/lrma-cloud-utils.git
    # or
    export commit_hash='...'
    python3 -m pip install --upgrade \
      git+https://github.com/broadinstitute/lrma-cloud-utils@${commit_hash}

When you add runtime dependencies, add them to requirements.txt.

Development

To do development in this codebase, the python3 development package must be installed.

After installation the development environment can be set up by the following commands:

python3 -mvenv venv
. venv/bin/activate
pip install -r dev-requirements.txt
pip install -e .

When you add development dependencies, add them to dev-requirements.txt.

Linting files

# run all linting commands
tox -e lint

# reformat all project files
black src tests setup.py

# sort imports in project files
isort -rc src tests setup.py

# check pep8 against all project files
flake8 src tests setup.py

# lint python code for common errors and codestyle issues
pylint src

Tests

# run all linting and test
tox

# run only (fast) unit tests
tox -e unit

# run only linting
tox -e lint

Note: If you run into "module not found" errors when running tox for testing, verify the modules are listed in test-requirements.txt and delete the .tox folder to force tox to refresh dependencies.

When running tox, you'll notice that the linter runs before black8. This is intentional. Rather than have it blindly reformat your code, I wanted to make sure you knew what you were doing wrong (i.e. against PEP 8 standards). You can configure this order to suit your needs.

When you add testing dependencies, add them to test-requirements.txt.

Versioning

We use bumpversion to maintain version numbers. DO NOT MANUALLY EDIT ANY VERSION NUMBERS.

Our versions are specified by a 3 number semantic version system (https://semver.org/):

major.minor.patch

To update the version with bumpversion do the following:

bumpversion PART where PART is one of:

  • major
  • minor
  • patch

This will increase the corresponding version number by 1.

lrma-cloud-utils's People

Contributors

shuang-broad avatar

Stargazers

Mark Walker avatar Simone Zhang avatar

Watchers

James Cloos avatar Kiran V Garimella avatar  avatar  avatar  avatar

Forkers

eviewan

lrma-cloud-utils's Issues

DO NOT CLOSE

This ticket is for keeping some utilities that should be incorporated in to the next release

Test test test

we probably need to set up a workspace specifically for testing

verify_before_submit doesn't check config change of wdl

Currently, verify_before_submit only checks for the success/failure of entities to be analyzed during the past few days, to avoid wasting computation.

However, it does not check fo the case of

  • updated WDL
  • updated config of workflow

Exactly how that's to be implemented takes thoughts.

`fill_in_entity_members` should have an input for the column name to update

fill_in_entity_members automatically creates or updates a new column with the name member_entity_types when you call the method. It should instead default to that value, and if another is given, that other value should be used.

This would involve adding another input variable (notionally, column), and changing the attributeListName option to be the column name given.

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.