Git Product home page Git Product logo

bln-etl's People

Contributors

palewire avatar zstumgoren avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

palewire

bln-etl's Issues

Add BLN API and Project wrapper

Basic wrapper class that cribs most frequently used bits from the BLN sdk, and provides a simple Project and file-oriented interface for managing files on the platform.

  • Client.user_projects - returns Project instances
  • Client.open_projects - returns Project instances
  • Project.get(id='foo')
  • Project.create(name='bar')
  • Project.upload_files (or just File.upload?)
  • Project.files
  • Project.slug (first 15 of UUID and first 20 of project name)
  • Test coverage for
    • Project.files
    • File.delete

Open source the repo

  • Add Apache 2.0 license
  • Set GH repo to public
  • Update README pip install instructions

Debug file upload testing issue in order to avoid hitting the live platform

Using @pytest.mark.vcr() to record web interactions for testing produces the below error related to creating file upload URIs. We've sidestepped by marking such tests as a "webtest" and allowing them to hit the live platform, but it's worth investigating more deeply for a potential fix that avoids hitting the live platform.

    def test_project_upload_files():
        # NOTE: This is a live webtest to sidestep headaches
        # related to handling errors raised during the process
        # of generating file upload URIs (KeyError: 'createFileUploadUri')
        kwargs = {
            'is_open': False ,
            'description': 'This is a test project.'
        }
        uuid = '<FAKE_UUID>'
        project = Project.get(uuid, TOKEN)
        to_upload = [
            fixture_path('test.csv'),
            fixture_path('test2.csv')
        ]
        project.upload_files(to_upload)
        expected = ['test.csv', 'test2.csv']
        actual = [f.name for f in project.files]
>       assert project.files == expected

Add Git Repository wrapper

Basic wrapper class that shells out to git cli utilities. At outset, just need the basics to clone and update:

  • Repository('/local/path/to/repo')
  • Repository.clone
  • Repository.pull

Update "webtests" to use a dynamically created, module-scope platform project

The current webtests assume the existence of (and access to) a Test project created by me. This is gross, since other folks can't use it without being added to the project as admins and the tests will break if the project gets deleted (its UUID is hard-coded in several tests).

Update the test setup with a module-scope fixture that bootstrap and tear down a new platform project on each run of webtests.

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.