Code Monkey home page Code Monkey logo

mumuki-bibliotheca-api's People

Contributors

afska avatar aguspina avatar dggluz avatar faloi avatar fedescarpa avatar felipecalvo avatar flbulgarelli avatar javi avatar julian-berbel avatar luchotc avatar mumukibot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mumuki-bibliotheca-api's Issues

El código extra de la guía no se guarda bien

Me está pasando con esta guía: http://bibliotheca.mumuki.io/#/guides/mumukiproject/mumuki-guia-ruby-polimorfismo

Yo tenía un código extra, que ahora quiero borrar y no puedo. La secuencia que más o menos logré sistematizar es esta:

  1. Voy a la vista de guía, borro el código extra y guardo.
  2. Recargo laboratorio, el código extra no está.
  3. Miro en GitHub, no hay nuevos commits, el código extra sigue estando ahí. Si abro otra pestaña con bibliotheca, el código también aparece ahí.
  4. Modifico algo de algún ejercicio, guardo.
  5. El código extra vuelve a aparecer en laboratorio.

Guide identity lost after import

If you import a guide, and you retrieve it by the generated id, it works. But if you import again the same guide, its id changes and fetching it fails.

Import API does not show errors

Currently, if the guide is ill-formed, it just produces a 500 error instead of using HTTP 400 and better explaining what is going on.

Improve choices support

Currently, our choices support is quite basic: only single or multiple choice.

However, sometimes there may be multiple combinations of choices - for example both {a, b, e} and {b, c, e} may be right, or all choices may be equally right.

Record guide change author

We should record who did the change in the git repository for logging purposes.

We could

  • use the git author field, setting it like '#{commiter_name} <#{commiter_email}>', at export
  • add to the requested auth0 scope the user and email fields at the editor, so that the JWT token holds that information too.

Ignore assets folder on export

To be able to upload images, we need a folder that is not deleted on each export. That folder should be named assets and will be ignored by Bibliotheca when exporting.

Books

Add the ability of creating, editing and publishing books also in bibliotheca.

Some notes:

  • In atheneum, Books are a collection of lessons, and each leason has a number and an associated guide. We should keep this model.
  • This change should impact in editor too
  • Books may be either "original" or "editions": the difference is that the second kind of book has an associated parent, so that it inherits the configuration of it.
    • For example, you can create a book that has a parent, and add to the new book only two lessons: 4 and 8. Assuming the original book had 7 lessons, the 4th lesson in the edition books overrides that one in the original book. And the 8th lesson is just an addition.
    • We could also reify the concept of swapping lessons or so, but I think it is not necessary right now.
  • Books should also be persisted in a github repository, as JSON similar to the book builder DSL in Atheneum: https://github.com/mumuki/mumuki-atheneum/blob/master/db/seeds/central.rb

@npasserini @faloi @ArielUmansky

Avoid unexpected errors to be included in the response

This is what happens now when you try to create a repo.

{"message":"git clone '--' 'https://TOKEN:@github.com/sagrado-corazon-alcal/mumuki-guia-fundamentos-alternativa-condicional-if' '/tmp/mumuki.Bibliotheca::IO::Export20160106-247357-1gq0aqi/.' 2\u003e\u00261:Cloning into '/tmp/mumuki.Bibliotheca::IO::Export20160106-247357-1gq0aqi/.'...\nfatal: https://d3c50216018596b4f4e8eae3d2cbeb3f2196f6b3:@github.com/sagrado-corazon-alcal/mumuki-guia-fundamentos-alternativa-condicional-if/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?"}

Be able to rename Guide slugs

This is a complex task. It should involve:

  • Renaming repository
  • Renaming all references in bibliotheca
  • Notify this change as a GuideChange event
  • Renaming all references in laboratory
  • Renaming all references in classroom

Simple test should be easier to code

In order to allow more people to write their own exercises, providing a simpler interface for entering a test is essential.

Nowadays, the content writer must have a deep understanding of the language, test framework and/or runner details in order to write their own tests.

We should be able to enter simple tests as fixture-tables, using a clean an simple UI. It should translate to a simple, generic, cross-language spec of a test, like the following:

Testing a function

subject:  succ
examples: 
- arguments: 
   - 1
 return: 2
- arguments: 
   - 4
 return: 5

Testing a procedure that performs I/O

subject:  echo
examples: 
- input: helllo
  output: hello
- input: world 
  output: world

Testing a program that performs I/O

examples: 
- input: helllo
  output: hello
- input: world 
  output: world

Others

We should still define how we want to declare testing of subroutines that perfom some kind of modification of a global matricial state, like in gobstones, SQL or QSIM.

See https://github.com/flbulgarelli/tester

Use rugged gem

Ruby-Git gem is now deprecated. We should switch to rugged, which is the new default

Structure authors information

image

To be able to do something like this in the future, authors info should be structured. My proposal is to begin with just a tag list of names (ideally with autocompletion based on previous guides) instead of the textbox, then we can adapt this in any way we want.

Document and normalize environment variables

Currently Bibliotheca needs the following ENV variables:

MUMUKI_BIBLIOTHECA_CLIENT_SECRET
MUMUKI_BIBLIOTHECA_CLIENT_ID
MUMUKIBOT_GITHUB_TOKEN
ATHENEUM_USER
ATHENEUM_PASSWORD
ATHENEUM_URL

They do not follow any naming convention, nor are documented anywhere. We should fix that.

Generate LICENSE files without txt extension

Currently, when bibliotheca exports a guide as a github repository, it adds a LICENSE.txt file with CC-SA 4 License. This is fine, except that it should be named as LICENSE.

By doing such rename, the license of the project gets properly parsed by Github.

Before:

image

After:

image

More information here

Rename github_repository to slug

We are storing guides in github, and its logical ID corresponds to a github repository. However, we should hide that fact, and leave it as an implementation detail

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.