Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming classes and functions #10

Closed
3 tasks done
achubaty opened this issue Jul 15, 2016 · 6 comments
Closed
3 tasks done

renaming classes and functions #10

achubaty opened this issue Jul 15, 2016 · 6 comments

Comments

@achubaty
Copy link
Owner

achubaty commented Jul 15, 2016

with #3, @ecologics how do you feel about the following:

  • rename functions to remove the "gs" prefix;
  • rename gsGOC class to GOC and gsMPG to MPG;
  • rename all 'GOC' methods, removing the "GOC" prefix.
@achubaty
Copy link
Owner Author

Go for it. It will break some of my analyses! But I will never run these again, likely. Let's move on, and get it right.

Paul

you always have the orginal grainscape package you could use for re-analysis if worse comes to worst :)

if you're OK with renaming, I'll go ahead. I will specify that the old names are deprecated though.

@achubaty
Copy link
Owner Author

original name new name
gsGOC GOC
gsGOCCorridor corridor
gsGOCDistance distance
gsGOCPoint point
gsGOCVisualize visualize
gsGraphDataFrame graphdf
gsMPG MPG
gsThreshold threshold

@ecologics
Copy link
Collaborator

Hmm Alex!  corridor, distance, point and visualize can only be
  applied to GOC objects.  By giving them such simple names, it
  might give the impression that you can run these on MPGs too (and
  it kind of makes sense that you should be able to do this, but the
  functionality doesn't exist).
Does it make sense to name them GOCCorridor, GOCDistance and
  GOCPoint to make this point?  

Just raising a flag, here.  Go with what you think is a package
  best practise.


Paul


  --
  Paul Galpern, Ph.D.
    Landscape | Ecology | Informatics
    Assistant Professor | University of Calgary
    Faculty of Environmental Design (primary)
    Department of Biological Sciences (adjunct)
    o: 403.220.7436 | m: 403.614.9331
    w: ecologics.ucalgary.ca


On 17/10/2016 1:21 PM, Alex Chubaty
  wrote:






        original name
        new name




        gsGOC
        GOC


        gsGOCCorridor
        corridor


        gsGOCDistance
        distance


        gsGOCPoint
        point


        gsGOCVisualize
        visualize


        gsGraphDataFrame
        graphdf


        gsMPG
        MPG


        gsThreshold
        threshold



  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.










  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/achubaty/grainscape2","title":"achubaty/grainscape2","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/achubaty/grainscape2"}},"updates":{"snippets":[{"icon":"PERSON","message":"@achubaty in #10: **original name**  | **new name**\r\n-------------------------|-------\r\n`gsGOC`            | `GOC`\r\n`gsGOCCorridor`    | `corridor`\r\n`gsGOCDistance`    | `distance`\r\n`gsGOCPoint`       | `point`\r\n`gsGOCVisualize`   | `visualize`\r\n`gsGraphDataFrame` | `graphdf`\r\n`gsMPG`            | `MPG`\r\n`gsThreshold`      | `threshold`\r\n"}],"action":{"name":"View Issue","url":"https://github.com/achubaty/grainscape2/issues/10#issuecomment-254306291"}}}

@achubaty
Copy link
Owner Author

I'm formalizing the definitions of these as methods, so the will only be applied to GOC objects.

In the same way that the plot generic has specific plot methods for different classes, these will likewise dispatch according to object class.

@achubaty
Copy link
Owner Author

It also means we can (at a later time) write corresponding methods for MPG objects.

@ecologics
Copy link
Collaborator

Beautiful!
Not thinking S4.
Paul


  --
  Paul Galpern, Ph.D.
    Landscape | Ecology | Informatics
    Assistant Professor | University of Calgary
    Faculty of Environmental Design (primary)
    Department of Biological Sciences (adjunct)
    o: 403.220.7436 | m: 403.614.9331
    w: ecologics.ucalgary.ca


On 17/10/2016 1:29 PM, Alex Chubaty
  wrote:



  It also means we can (at a later time) write corresponding
    methods for MPG objects.
  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.










  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/achubaty/grainscape2","title":"achubaty/grainscape2","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/achubaty/grainscape2"}},"updates":{"snippets":[{"icon":"PERSON","message":"@achubaty in #10: It also means we can (at a later time) write corresponding methods for MPG objects."}],"action":{"name":"View Issue","url":"https://github.com/achubaty/grainscape2/issues/10#issuecomment-254308328"}}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants