Giter VIP home page Giter VIP logo

ingress's People

Contributors

nexushoratio avatar

Watchers

 avatar  avatar

ingress's Issues

Improve address scoring in `latlng_to_address()`

I have at least one example where the reverse geocoding picks a really bad result.

https://developers.google.com/maps/documentation/geocoding/requests-reverse-geocoding

Right now we only allow a result_type of street_address, but with my example, premise is MUCH better. In particular, the good has a location_type of ROOFTOP while the other had RANGE_INTERPOLATED.

But, from a set of one, it is not yet possible to determine that premise is always better than street_address. More testing is needed.

Also, currently, scores are a simple summation of weights. A tuple-like solution would probably be better. Also, switch from a dictionary of weights to proper enums.

Make `pylint` happy

After configuring pylint, there is a list of disabled settings in the config file that need to be addressed.

Help output is way too cluttered

usage: ingress [-h] [-L {debug,info,warning,error}]
          {import,unimport,export,flatten,find-missing-labels,merge-bookmarks,codes-set,codes-get,codes-delete,codes-prune,update,bounds,trim,cluster,make-donuts,clean-json,show-portals,routes}
          ...

Perform a number of Ingress related functions.

options:
  -h, --help            show this help message and exit
  -L {debug,info,warning,error}, --loglevel {debug,info,warning,error}
                        Log level

commands:
  {import,unimport,export,flatten,find-missing-labels,merge-bookmarks,codes-set,codes-get,codes-delete,codes-prune,update,bounds,trim,cluster,make-donuts,clean-json,show-portals,routes}
                        subparser help
    import              Update the database with portals listed in a bookmarks
                        file.
    unimport            Remove portals listed in a bookmarks file from the
                        database.
    export              Export all portals as a bookmarks file.
    flatten             Load portals from BOOKMARKS and write out as lists
                        using PATTERN.
    find-missing-labels
                        Look through globs of bookmarks for missing labels. It
                        will remove portals with missing labels from the
                        bookmarks and add them to a newly created bookmarks
                        file instead. The contents of the destination
                        bookmarks file will be destroyed.
    merge-bookmarks     Merge multiple bookmarks files into one. Inputs will
                        be the files specified by the glob arguments. The
                        contents of the destination bookmarks file will be
                        destroyed.
    codes-set           Sets a location code, creating it if necessary.
    codes-get           Display one or more location codes.
    codes-delete        Delete a location code.
    codes-prune         Prune portals based upon keep status of location
                        codes.
    update              Update the locations and directions for portals in a
                        bookmarks file.
    bounds              Create a drawtools file outlining portals in multiple
                        bookmarks files.
    trim                Trim a bookmarks file to only include portals inside a
                        bounds.
    cluster             Find clusters of portals together and save the
                        results. The clustering results are saved into
                        FILENAME.
    make-donuts         Automatically group portals into COUNT sized bookmarks
                        files. The idea is to provide a series of bookmarks
                        that would be suitably sized groups for efficient
                        capturing. Given a starting marker specified in the
                        drawtools file, a circle (donut hole) that includes
                        COUNT portals will be created. The size of this hole
                        will inform the size of concentric rings (donuts). The
                        donut will be broken down into bites that contain
                        roughly COUNT portals. The command will try to balance
                        between between the number of portals in a bite and
                        how big (in area) a bite would be. For example, it
                        will try to avoid having a bite be the entire donut
                        because it reaches out to a sparsely populated area.
    clean-json          Clean and format a json file.
    show-portals        Show portals sorted by date. They will be exported to
                        a bookmarks file.
    routes              Calculate an optimal route between portals listed in a
                        bookmarks file.

I spent a lot of time looking into alternatives to argparse, but I did no find any I like. Too many are so heavily based on decorators (e.g., click) as to be unusable, IMO. The amount of work that would be needed to make them do things like we already do here (defining shared flags in modules, then using them else where), might as well stick with what is already written.

Unsurprisingly, Google's absl stuff would probably do what I want, particularly since it probably also comes with the logging stuff I like, but I am still kind of pissed at being laid off.

I suspect there will be a series of small changes here as things get tweaked.

Remove `code` column

Will replace with expanded support for codes, where each portal can have multiple:

  • ZCTA
  • County
  • State
  • Country

etc.

Will allow user to import any boundary set they wish. But, for now, just remove codes.

Move to a modern file layout

Previously, my approach was to put all of my code into a single git repo. Binaries (shell script, python main, etc), lived in ~/bin, Python modules lived under ~/py with, I think, some sort of symlink from .local. And so on (everything I was doing was Bash or Python). That's why modules like app and humanize, which are shared across projects, live where they are. This is pretty much the way Google's monorepo works. And it allowed me to just always run at HEAD. Which, for personal stuff, like ~/bin and dotfiles, is fine.

When I uploaded this project, I took that old repo I'd rediscovered, and cut it it into pieces using the git-filter-repo. Probably a better way of developing this stuff.

But, it means I need to figure out how folks do this in the rest of the world.

There are many options to choose from.

Like I mentioned over in my work over in the userscript repo, I am really not keen on things like pip, npm, cpan, or melpa . They are fine for finding things, but NOT for just randomly pulling in crap off the Internet and running it. Did we learning nothing from the telnet random.host | sh days?!?! But anyway, if it is not installable via apt install on my Debian system, I am unlikely to use it. I may vendor something into this repo. Or make my own .deb, but unlikely to use pip.

So I do not have a lot of incentive to learn something like setuptools and friends.

I pretty fond of Google's PAR file stuff, which I think eventually lead to the existence of the zipapp and pex stuff (not sure on the history there). So I will likely go with something like.

I am pretty confident I will make mistakes and undo things. But that is why I am doing this: to break things and see if I can fix them!

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.