Giter Club home page Giter Club logo

gits's People

Contributors

eugulixes avatar one001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gits's Issues

Rework terminal public methods

Now the Terminal has two public methods: write and dumphtml.
Such API doesn't provide the clear interface to the Terminal and it's not obvious what the write method is actually does.

The PR #84 provides all methods of the Terminal with the docstrings, but the write doesn't have it, because of the future rework that will be done in this issue.

Expand `dl` docstring

The dl capability is more difficult than it may seem, so its docstring should be expanded.

Test for capability `cap_cub1` is broken

ss.sF.ssssss....s.......ss..sss..ssss.sss....ss.......
======================================================================
FAIL: test_cap_cub1 (__main__.TestEmulator)
The terminal should have the possibility to move cursor left by 1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "gits/test/terminal_test.py", line 522, in test_cap_cub1
    self._check_cap_cub1((rand_x, 0))
  File "gits/test/terminal_test.py", line 503, in _check_cap_cub1
    self.assertEqual(cur_x - 1, term._cur_x)
AssertionError: 0 != 79

----------------------------------------------------------------------
Ran 54 tests in 0.491s

FAILED (failures=1, skipped=24)

additional scripts for run server and test

It's painful each time to write:

  1. Start the server: env PYTHONPATH=`pwd` ../gits-env/bin/python bin/server
  2. Run the tests: env PYTHONPATH=`pwd` ../gits-env/bin/python gits/test/terminal_test.py

Can we have some helper shell script for this?

terminal: divide and conquer

  • ConfigReader

    Loads configuration files related to matching escape sequences to capabilities.

  • Screen

    Contains data for renderer. Will contain rules about setting, updating the screen cell (color, attribute).

  • HTMLRenderer

    Gets data from Screen and ConfigReader and builds HTML.

  • CommandExecutor

    Matches the raw escape sequence to the capability and executes this capability.

  • Terminal

    High level logic, a facade, under the HTMLRenderer, CommandExecutor, ConfigReader, Screen. As a result, only the terminal should be able to the wide world.

`_cap_cup` should never set `_eol` to True`

Such programs like vi may send something like \E[23;80H (set the vertical and horizontal positions of the cursor to y and x). The current implementation of cup will set _eol to True in this case and _echo will write a character on the next line. It's obviously a bug.

expand travis CI

Now, we only run tests for gits for one platform. Need to test, built, run gits for following platforms:

  • fedora
  • debian
  • ubuntu - 14.04
  • ubuntu - 16.04
  • centos 5
  • centos 7

add resizing

The existing implementation uses the hardcoded screen size (24x80).

Implement hiding/unhiding cursor

Each time an interactive program runs, it tells the terminal to hide the cursor. When it exits, the cursor should be restored.

portability

During a building gits for varios platforms I've realized that living with a python and nodejs at the same time is a big pain in the ass.

Let's begin with Linux Mint:

  • It doesn't have a setuptools on a startup.
  • nodejs has a different location, that's why we need to create a symlink to make our npm run start works.

Fedora 24:

  • A zero problem with an installation (of course it's a good point).
  • Broken htop, vim, nano, man (I won't provide a screenshot demonstrating it, but all console oriented tools work incorrectly)
  • Also I have a short dance with a tambourine with installing pip, virtualenv properly

MacOS:

  • SSH daemon is always turn off on a start up and I always forget to turn it on and spend some time to figure it out WTF with our login util, that's why I think we need to mention that SSH daemon should be started before running gits.

I specify only a little problems above, because I didn't notice all problems and forgot some of them.

Overall wishes:

  • We need to rework CI by adding different platforms (#95).
  • We need to provide a more simple interface for running gits (I think we should have something like gits start and that's it, user doesn't care about running a client at first, that running a server), we can achieve this by providing a tool, that will operate our low-level python lib and npm package.
  • We need to provide a make file with set of simple targets: build, test. By build target I mean that user will have a ready tool to run gits on any platform (except windows). By test target I mean a simple way of running all gits test (now we don't have it).

Can we move our doc back to github from readthedoc? It's a personal experience, but it's more convenient to have all stuff about gits in a one place.

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.