Giter VIP home page Giter VIP logo

himach's People

Contributors

david6marsh avatar espinielli avatar

Stargazers

 avatar

Watchers

 avatar

himach's Issues

Shortcuts for subsonic aircraft

find_leg_really should test for subsonic aircraft and, if there is no avoid area, use a great circle direct from TOC to TOD.

summarise_routes doesn't like 3-letter airports

summarise_routes assumes airports have 4-letter ICAO codes, so if there's a mix of ICAO and IATA, then it fails with an "airports DLU< BAA" unknown or some such error.
(It also assumes the bidirectional, 2-character separator <>)

Retirement of map tools, rgdal and rgeos

Warning message:
The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
which was just loaded, will retire in October 2023.
Please refer to R-spatial evolution reports for details, especially
https://r-spatial.org/r/2023/05/15/evolution4.html.
It may be desirable to make the sf package available;
package maintainers should consider adding sf to Suggests:.
The sp package is now running under evolution status 2
(status 2 uses the sf package in place of rgdal)

Package overview alias

Dear maintainer,

You have file 'himach/man/himach.Rd' with \docType{package}, likely
intended as a package overview help file, but without the appropriate
PKGNAME-package \alias as per "Documenting packages" in R-exts.

This seems to be the consequence of the breaking change

Using @doctype package no longer automatically adds a -package alias.
Instead document _PACKAGE to get all the defaults for package
documentation.

in roxygen2 7.0.0 (2019-11-12) having gone unnoticed, see
r-lib/roxygen2#1491.

As explained in the issue, to get the desired PKGNAME-package \alias
back, you should either change to the new approach and document the new
special sentinel

"_PACKAGE"

or manually add

@Aliases himach-package

if remaining with the old approach.

Occasional bounding box errors

v0.1.2.
When find_routes on multiple airport pairs and drawing on cached results get warning messages such as
In min(bb[, 1L], na.rm = TRUE) : no non-missing arguments to min; returning Inf
but routes appear to be ok.
Seems to apply across a number of routes.

upcoming sf breaks himach tests on CRAN revdep checks

See also r-spatial/sf#1958 - we believe to have improved sf with this issue/PR. The revdep check output is


Package: himach
Check: tests
New result: ERROR
    Running ‘spelling.R’ [0s/0s]
    Running ‘testthat.R’ [32s/32s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library(testthat)
    > library(himach)
    > 
    > test_check("himach")
    [ FAIL 2 | WARN 0 | SKIP 1 | PASS 66 ]
    
    ══ Skipped tests ═══════════════════════════════════════════════════════════════
    • On CRAN (1)
    
    ══ Failed tests ════════════════════════════════════════════════════════════════
    ── Error (test_routes.R:94:3): find_route works with subsonic option ───────────
    Error in `st_sf(x, ..., agr = agr, sf_column_name = sf_column_name)`: sf_column_name %in% all_sfc_names is not TRUE
    Backtrace:
         ▆
      1. ├─utils::capture.output(...) at test_routes.R:94:2
      2. │ └─base::withVisible(...elt(i))
      3. ├─... %>% summarise_routes_for_test()
      4. ├─himach (local) summarise_routes_for_test(.)
      5. │ └─... %>% ... at test_routes.R:17:2
      6. ├─dplyr::mutate(...)
      7. ├─dplyr::summarise(...)
      8. ├─dplyr::group_by(., fullRouteID)
      9. ├─sf::st_drop_geometry(.)
     10. ├─dplyr::mutate(., envelope = st_area(envelope))
     11. ├─dplyr::mutate(., across(c(gc, crow), st_length), gc_length = gc)
     12. └─dplyr:::mutate.data.frame(...)
     13.   ├─dplyr::dplyr_col_modify(.data, cols)
     14.   ├─sf:::dplyr_col_modify.sf(.data, cols)
     15.   ├─base::NextMethod()
     16.   └─dplyr:::dplyr_col_modify.data.frame(.data, cols)
     17.     └─dplyr::dplyr_reconstruct(out, data)
     18.       ├─dplyr:::dplyr_reconstruct_dispatch(data, template)
     19.       └─sf:::dplyr_reconstruct.sf(data, template)
     20.         ├─sf::st_as_sf(data, sf_column_name = sfc_name, crs = crs, precision = prec)
     21.         └─sf:::st_as_sf.data.frame(...)
     22.           └─sf::st_sf(x, ..., agr = agr, sf_column_name = sf_column_name)
     23.             └─base::stopifnot(sf_column_name %in% all_sfc_names)
    ── Error (test_routes.R:134:3): Find multiple routes for multiple aircraft ─────
    Error in `st_sf(x, ..., agr = agr, sf_column_name = sf_column_name)`: sf_column_name %in% all_sfc_names is not TRUE
    Backtrace:
         ▆
      1. ├─utils::capture.output(...) at test_routes.R:134:2
      2. │ └─base::withVisible(...elt(i))
      3. ├─... %>% summarise_routes_for_test()
      4. ├─himach (local) summarise_routes_for_test(.)
      5. │ └─... %>% ... at test_routes.R:17:2
      6. ├─dplyr::mutate(...)
      7. ├─dplyr::summarise(...)
      8. ├─dplyr::group_by(., fullRouteID)
      9. ├─sf::st_drop_geometry(.)
     10. ├─dplyr::mutate(., envelope = st_area(envelope))
     11. ├─dplyr::mutate(., across(c(gc, crow), st_length), gc_length = gc)
     12. └─dplyr:::mutate.data.frame(...)
     13.   ├─dplyr::dplyr_col_modify(.data, cols)
     14.   ├─sf:::dplyr_col_modify.sf(.data, cols)
     15.   ├─base::NextMethod()
     16.   └─dplyr:::dplyr_col_modify.data.frame(.data, cols)
     17.     └─dplyr::dplyr_reconstruct(out, data)
     18.       ├─dplyr:::dplyr_reconstruct_dispatch(data, template)
     19.       └─sf:::dplyr_reconstruct.sf(data, template)
     20.         ├─sf::st_as_sf(data, sf_column_name = sfc_name, crs = crs, precision = prec)
     21.         └─sf:::st_as_sf.data.frame(...)
     22.           └─sf::st_sf(x, ..., agr = agr, sf_column_name = sf_column_name)
     23.             └─base::stopifnot(sf_column_name %in% all_sfc_names)
    
    [ FAIL 2 | WARN 0 | SKIP 1 | PASS 66 ]
    Error: Test failures
    Execution halted

upcoming sf 1.0-0 breaks himach on CRAN

Please see r-spatial/sf#1649

As you are aware sf 1.0-0 uses spherical geometry when working with ellipsoidal coordinates. Your package turns this off, but sf now prints a message to the user to notify it has been switched off. We see:

    `himach:::.onLoad()` produced output.

indicating that you should do this in .onAttach() rather than in .onLoad.

Map leakage again

With latest version (& dependencies?) there is again map leakage from Siberia across the North (ie a horizontal stripe).
eg plot EGLL - ZBAA with crs_Atlantic.
(not the case with crs_Pacific but is with a crs_120E).

Checks fail just in Solaris - tests fail

After submitting to CRAN, get a dozen errors, mostly of two varieties:

── Error (test_grid.R:34:3): Grid creation messaging ───────────────────────────
dplyr:::mutate_error/dplyr_error/rlang_error/error/condition
Error: Problem with mutate() column xy.
xy = st_cast(...).
✖ OGRCreateCoordinateTransformation(): transformation not available
Backtrace:

1. ├─testthat::expect_message(...) test_grid.R:34:2
2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
3. │ ├─testthat:::.capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. ├─himach::make_route_grid(...)
7. │ └─%>%(...)
8. ├─dplyr::mutate(...)
9. ├─dplyr:::mutate.data.frame(...)
10. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
11. │ ├─base::withCallingHandlers(...)
12. │ └─mask$eval_all_mutate(quo)
13. ├─sf::st_cast(...)
14. ├─sf::st_transform(...)
15. ├─sf:::st_transform.sfc(...)
16. │ ├─sf::st_sfc(...)
17. │ ├─base::structure(...)
18. │ └─sf:::CPL_transform(...)
19. ├─base::stop(...)
20. └─(function (e) ...
── Error (test_map.R:15:3): Route mapping ──────────────────────────────────────
dplyr:::mutate_error/dplyr_error/rlang_error/error/condition
Error: Problem with mutate() column ap_locs.
ap_locs = st_transform(...).
✖ OGRCreateCoordinateTransformation(): transformation not available
Backtrace:

1. ├─himach::make_airports(crs = crs_Pacific, warn = FALSE) test_map.R:15:2
2. │ └─%>%(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr:::mutate.data.frame(...)
5. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
6. │ ├─base::withCallingHandlers(...)
7. │ └─mask$eval_all_mutate(quo)
8. ├─sf::st_transform(...)
9. ├─sf:::st_transform.sfc(...)
10. │ ├─sf::st_sfc(...)
11. │ ├─base::structure(...)
12. │ └─sf:::CPL_transform(...)
13. ├─base::stop(...)
14. └─(function (e) ...

On some machines get OGRCreateCoordinateTransformation() returned NULL: PROJ available? error.

With v0.1.0, using built-in datasets, check on some machines gives an error including OGRCreateCoordinateTransformation() returned NULL: PROJ available?.

This is reported on several machines by CRAN for flavoyrs: r-patched-solaris-x86, r-oldrel-macos-x86_64. Different occasions on each when the error occurs.

Have partly reproduced this with a rhub::check() on 'solaris-x86-patched'.

Consider migrating make_route_envelope to lat long.

Being stricter on the principle that all the workings are in lat-long (s2) and only project for maps, need to switch make_route_envelope over [seems easy elsewhere]. But that might imply more changes later in the find_routes. To investigate.

Solve note on 'exportClasses' on check

Version: 0.3.1
Check: package namespace information
Result: NOTE
Found export directive that requires package ‘methods’:
‘exportClasses’
Remove all such namespace directives (if obsolete) or ensure that the
DESCRIPTION Depends or Imports field contains ‘methods’.

Occasional leakage in map

In airliner forecast, getting occasional leakage (of thin map?), eg in Europe case.
Quick fix - is to turn off the fat map.

20220515_europe viable routes

Import less

Use @importFrom more often than a blanket @import. Eg see ggplot2 vignette on using ggplot2 functions within packages.

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.