Code Monkey home page Code Monkey logo

Comments (4)

ianneilmacleod avatar ianneilmacleod commented on September 15, 2024

GXMVU.fight_plot() just stops too.

from gxpy.

ianneilmacleod avatar ianneilmacleod commented on September 15, 2024

Just remembered what causes this. A group was not started. I'll correct in Python, but we should address the behaviour for 9.3+.

from gxpy.

ianneilmacleod avatar ianneilmacleod commented on September 15, 2024

@jbgeosoft understanding that the underlying core is asserting, we need a better behaviour to expose the assertion, or we need to be able to document it. Here is a code snippet that asserts at the GVMVU call. Comment out the line to see expected behaviour. The bug in the Python code is that GXMVU is writing the a view that has not started a group, and asserts rather than raise an error. Before fixing the assertion we can use this example to think about how to provide the assertion information to a developer using the API.

import geosoft.gxapi as gxapi
import geosoft.gxpy.gx as gx
import geosoft.gxpy. map as gxmap
import geosoft.gxpy.view as gxview
import geosoft.gxpy.group as gxgroup

gxc = gx.GXpy()

with gxmap.Map.figure((0, 0, 1000, 1000)) as gmap:
    with gxview.View.open(gmap, "data") as v:
        gxapi.GXMVU.arrow(v.gxview, 500, 500, 450, 450, 0.5, 30, 1) # asserts
        with gxgroup.Draw(v, "arrow") as g:
            gxapi.GXMVU.arrow(g.view.gxview, 500, 500, 450, 450, 0.5, 30, 1)

See also fe6927e, which includes test_group.py -> test_force_assert() to assert from a test.

from gxpy.

ianneilmacleod avatar ianneilmacleod commented on September 15, 2024

Replaced by #55

from gxpy.

Related Issues (20)

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.