Giter Club home page Giter Club logo

renku-python's Issues

metadata: properly serialize nested JSON-LD-aware classes

  • Implement following helper attributes builders: jsonld.container.(set|list|index)
    • example usage: jsonld.container.list(Author)

Options

a) build a single @context from all nested objects
b) include @context in each nested object + implement custom loader?

create basic CLI

Need a CLI that allows for this workflow at a minimum:

$ renga login
  • guides the user through obtaining an offline token
  • set up the platform access points
  • create a ~/.renga.conf file that stores user settings and tokens
$ renga init <project>
  • initialize a project, including adding a node to the KG
  • creates a .renga metadata file for project-specific configuration
$ renga add
  • add code and/or data from KG
  • from git repo
  • from URL
renga notebook
  • launch a notebook, mounting . in the notebook container and setting it up with the proper environment for interacting with the platform

Better errors + cleanup when `renga init` is executed in an already existing git repo

If you run renga init in an already existing git repo, the error is confusing, and hard to know about the -f flag.
Also, it does not rollback or cleanup the .renga folder it created in the process, which throws error when you try a renga init -f later.

If you run renga init in an already existing renga repo, the error is confusing as you get a FileExistsError.

from_config doesn't work as advertised

In [4]: client = renga.from_config(endpoint='http://localhost')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-b511b07226e7> in <module>()
----> 1 client = renga.from_config(endpoint='http://localhost')

~/Projects/renga-python/renga/cli/_client.py in from_config(config, endpoint)
     31     """
     32     if config is None:
---> 33         config = read_config()
     34         project_config_path = get_project_config_path()
     35         if project_config_path:

TypeError: read_config() missing 1 required positional argument: 'path'

fix renga notebook cli

  • renga notebook fails
  • renga notebook show doesn't show the running notebooks
  • implement renga notebook stop
  • implement numbering of running notebooks for easier navigation?
  • implement automatic opening of chosen notebook in browser

will be done in #31

extracting submodule history fails if not modified by renga

Sequence to reproduce:

mkdir foo
mkdir bar
cd foo
renga init
echo woop > ../woop
renga datasets add dataset ../woop
cd ../bar
renga init
renga datasets create dataset
renga datasets add dataset ../foo/data/dataset/woop
renga run wc data/dataset/foo/data/dataset/woop > woop.wc
cd ../foo
echo woop2 > data/dataset/woop
git commit -am 'commiting changes to woop'
cd ../bar
git submodule update --rebase --remote
git commit -am 'update submodule'
renga status

On branch master
Files generated from outdated inputs:
  (use "renga log <file>..." to see the full lineage)

	woop.wc:

Normally it should display: <name_of_submodule>@<commit_sha1>.

Renga init with endpoint does not save it

Scenario:

renga init --endpoint https://example.com --autosync

Then the following is not working:

renga contexts list

I can fix by changing .renga/config.yml from:

core:
  autosync: true
  generated: '2017-10-25T11:36:10.689296'
  name: MyProject
endpoints:
  https://example.com:
    vertex_id: '20688'

to

core:
  autosync: true
  generated: '2017-10-25T11:36:10.689296'
  name: MyProject
  default: https://example.com
endpoints:
  https://example.com:
    vertex_id: '20688'

but it would be nice to have it inferred from the init command.

Import datasets from renku-aware repos

Importing from a git repository that contains a .renku directory should automatically reuse the included metadata about authors/creators of various entities.

  • remove the local filesystem path (privacy issues)
  • reference the original dataset metadata file: $ref: ...
  • use submodule index to iterate over files when importing from a Git repo

addresses SwissDataScienceCenter/renku#135

Re-run CWL steps on the hosted platform

  • use the CI pipeline functionality of gitlab to rerun steps
  • create custom images for rerunning renga-generated steps
  • create a .gitlab-ci.yml automatically in each renga repo

cli: fix issues with `datasets add`

  • authors are removed after calling add (related to #119)
  • files/<NAME>/path is not serialized as str but pathlib.PosixPath
  • check how the target is joined to origin path (//)
  • warn when importing local git repository
  • adding a specific file without using -t doesn't work

Construct workflows from steps

link together several steps to form a workflow

  • construct a CWL workflow from a file's provenance graph
  • resolve dependency paths and save workflow to disk for reuse

trying to access a nonexistent context should return a 404

inside a renga-deployed notebook:

import renga
client = renga.from_env()
client.contexts[0]

--> HTTP 500

from the logs:

sqlalchemy.exc.StatementError: (builtins.ValueError) bytes is not a 16-char string 
[SQL: 'SELECT contexts.created AS contexts_created, contexts.updated AS contexts_updated, contexts.id AS contexts_id, contexts.spec AS contexts_spec, contexts.jwt AS contexts_jwt 
FROM contexts 
WHERE contexts.id = %(param_1)s'] [parameters: [{'%(140547263475216 param)s': '0'}]]

renga io buckets throws an error

$ renga io buckets

Traceback (most recent call last):
  File "/Users/rok/.virtualenvs/renga/bin/renga", line 11, in <module>
    load_entry_point('renga', 'console_scripts', 'renga')()
  File "/Users/rok/.virtualenvs/renga/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/rok/.virtualenvs/renga/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/rok/.virtualenvs/renga/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/rok/.virtualenvs/renga/lib/python3.6/site-packages/click/core.py", line 1064, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/Users/rok/.virtualenvs/renga/lib/python3.6/site-packages/click/core.py", line 621, in make_context
    self.parse_args(ctx, args)
  File "/Users/rok/Projects/renga-python/renga/cli/_group.py", line 28, in parse_args
    if args[0] in self.commands:
IndexError: list index out of range

Publish docs

  • include autodoc for clients and cli
  • enable hook for Read the Docs

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.