Giter Club home page Giter Club logo

asclepius's People

Contributors

fmakosza avatar piyushahuja avatar xophmeister avatar

Watchers

 avatar  avatar  avatar

asclepius's Issues

Move to use a common iRODS wrapper

iRODS is a dependency which both the planner and executor initialise in the same way:

  • ssl_settings = {'ssl_context':
    ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH)}
    coll_buffer = []
    objects = []
    collections = []
    with iRODSSession(irods_env_file=ENV_FILE, **ssl_settings) as session:
  • from irods.session import iRODSSession
    env_file = os.path.expanduser('/nfs/users/nfs_m/mercury/.irods/irods_environment.json')
    ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None)
    ssl_settings = {'ssl_context': ssl_context}
    with iRODSSession(irods_env_file=env_file, **ssl_settings) as session:

Consider making a suite of common classes, one of which would be an iRODS wrapper -- others include things like time handing, logging and the AVU model, etc. -- that can be injected into the planner and executor classes, respectively. Then, if the implementation of the iRODS wrapper needs to change (for whatever reason), its interface can remain and no downstream changes will need to be made to its dependants.

For example, in the above examples, the way each module is defining the iRODS environment configuration path is different: one loads from a central configuration and another has it hard-coded. A unified interface would resolve this bifurcation in a single place without having to change code everywhere. This unified interface could then, say, be extended to source the iRODS environment configuration following the following precedence (highest priority first):

  1. From the IRODS_ENVIRONMENT_FILE environment variable;
  2. From a specified file, say in some configuration file;
  3. Finally falling back to the default of ~/.irods/irods_environment.json (or failing, if this doesn't exist).

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.