Giter Club home page Giter Club logo

Comments (7)

AllanCameron avatar AllanCameron commented on July 24, 2024

Hi Teun. I'm glad you brought this up. I think now is a good time to think about renaming. I had previously got into the habit of putting periods before functions I didn't want to export, but this isn't really helpful within the roxygen ecosystem, and sometimes proves an annoyance, so we should probably remove the periods.

For the parameter names you mentioned, my thoughts are

  • include_line -> text_only (needs flipped logically)
  • cut_path -> gap (short and doesn't need flipped logically)
  • flip_inverted -> upright
  • offset -> I think I'd keep this but maybe change the variable name to something else, like offset_paths
  • keep_straight -> straight

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

putting periods before functions

I think this works for functions that you want to export but not expose. I think the typical way to indicate a function is internal is to declare the following in the roxygen comments:

#' @keywords internal

cut_path -> gap (short and doesn't need flipped logically)

This is nice and better than what I could come up with.

I think now is a good time to think about renaming

There are indeed some function in the package that have changed meaning over the course of development. I think .get_path_points() doesn't really get points on a path but it places the text, so maybe a better name might be place_text()? Perhaps .get_surrounding_lines() could be make_gap()? Any functions you'd like to mark for renaming?

from geomtextpath.

AllanCameron avatar AllanCameron commented on July 24, 2024

I don't really see the value of roxygen comments for non-exported functions. If no docs are built, then standard comments to help with maintenance and debugging should be adequate. It's reasonable to preface them with roxygen tags to help package building of course.

from geomtextpath.

AllanCameron avatar AllanCameron commented on July 24, 2024

I agree with your suggestions for .get_path_points and .get_surrounding_lines. I had wondered if the file name geometry_helpers.R had become a bit inaccurate too, but I can't really think of anything more appropriate at the moment.

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

Yes good point. I think splitting them out to text_placement.R and path_handling.R or something might be better. The path_handling.R file can also get the dedup_path, pathify, prepare_path and .add_path_grob functions.

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

I'll go and rename some of the parameters according to the suggestions, and maybe split the geometry_helpers.R file.

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

I think we can close this for now

from geomtextpath.

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.