User:Mike: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Mike (talk | contribs)
No edit summary
Mike (talk | contribs)
No edit summary
Line 25: Line 25:
* Find a problem about module 'ascpy' in my branch, which cannot be found in canvas.py.  
* Find a problem about module 'ascpy' in my branch, which cannot be found in canvas.py.  


* But when I run canvas.py of main trunk, module 'ascpy' can be found, but another error is called:
* But when I run canvas.py of main trunk, module 'ascpy' can be found, but another error is called:'''libascend.so.1: cannot open shared object file: No such file or directory'''
 
libascend.so.1: cannot open shared object file: No such file or directory




Line 35: Line 33:


  scons -j4
  scons -j4
* set paths properly before run canvas.py:
export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH
export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH


* find a bug of Adrian's branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.
* find a bug of Adrian's branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.
Line 86: Line 89:


[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help
* Undo button works (finishing the work of Adrian), redo haven't been implemented yet.




== Discussion notes of June 6 2016 ==
== Discussion notes of June 6 2016 ==
* Buttons now have labels. By adding ''tb.set_style(Gtk.ToolbarStyle.BOTH)'' after ''tb = Gtk.Toolbar()''


* Delete unnecessary .svg image files in ascend/mike/pygtk/canvas/ only leave defaultblock.svg
* Delete unnecessary .svg image files in ascend/mike/pygtk/canvas/ only leave defaultblock.svg
Line 94: Line 101:
* Block icons should be generated by strings, instead of load image. [http://svn.ascend4.org/branches/mike/models/test/canvas/brayton_fprops_rachel.a4c Example format here]
* Block icons should be generated by strings, instead of load image. [http://svn.ascend4.org/branches/mike/models/test/canvas/brayton_fprops_rachel.a4c Example format here]


* I can improve blocks, firstly to make sure they can be solved in canvas.
* Currently svn version is updated to [http://code.ascend4.org/ascend/branches/mike/?view=log 3110]
 
* I can improve blocks, firstly to make sure they can be properly solved in canvas.

Revision as of 04:13, 6 June 2016


Name: Tengda Han (Mike)

University: ANU

Email: u5612799@anu.edu.au

Summary: I am doing GSOC2016 for ASCEND, and I will do something on Canvas function.

Discussion notes of 12 May 2016

To get the canvas GUI running in the trunk code, I used:

john@thunder:~/ascend/trunk2$ ./pygtk/canvas/canvas.py


May 12 to May 22

  • Set development environment and play with canvas.
  • Find a problem about module 'ascpy' in my branch, which cannot be found in canvas.py.
  • But when I run canvas.py of main trunk, module 'ascpy' can be found, but another error is called:libascend.so.1: cannot open shared object file: No such file or directory


Discussion notes of 23 May 2016

  • cannot find module 'ascpy' is because I need to compile by
scons -j4
  • set paths properly before run canvas.py:
export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH
export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH
  • find a bug of Adrian's branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.


May 23 to May 29

  • Tested Adrian's branch on ubuntu 16.04 LTS. Previous bug doesn't exist (ascend kills the terminal)
  • Try to understand Gaphas and libavoid.
  • Link 'libavoid' on ASCEND wiki has 404 error.
  • When 'scons' ASCEND in Ubuntu16.04, SWIG error comes. sulution here


Discussion notes of 30 May 2016

  • When try to run canvas.py, should set PYTHONPATH to
ascend_trunk/trunk/model/johnpye/fprops/python
  • For Adrian's version
canvas.py doesn't work because of
Error: sys.path must be a list of directory names
Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:
cd ~/desired directory
git clone https://github.com/amolenaar/gaphas
git checkout gtk3
git pull
sudo python setup.py install
However, after canvas.py pops up, TypeError: Couldn't find conversion for foreign struct 'cairo.Context' occurs when click on blank canvas


May 30 to June 5

  • Solved TypeError: Couldn't find conversion for foreign struct 'cairo.Context' by
sudo apt-get python-gi-cairo

This package is a Python Cairo bindings for the GObject library

  • If problems occur when installing gaphas by
sudo apt-get install python-gaphas

Check the universe repository before installation may help

  • Undo button works (finishing the work of Adrian), redo haven't been implemented yet.


Discussion notes of June 6 2016

  • Buttons now have labels. By adding tb.set_style(Gtk.ToolbarStyle.BOTH) after tb = Gtk.Toolbar()
  • Delete unnecessary .svg image files in ascend/mike/pygtk/canvas/ only leave defaultblock.svg
  • Currently svn version is updated to 3110
  • I can improve blocks, firstly to make sure they can be properly solved in canvas.