Code Monkey home page Code Monkey logo

Comments (6)

eliotmcintire avatar eliotmcintire commented on July 4, 2024 1

FWIW, the replacement code above worked perfectly with the new branch (windowsTesting)

from spades.project.

CeresBarros avatar CeresBarros commented on July 4, 2024

I traced down the second error to the fact that packagePath is "D:/GitHub/LandR-tutorials/packages" but, internally, .libPaths()[1] becomes "D:/GitHub/LandR-tutorials/packages/4.3". The later is, of course more appropriate, but is not the path that 1) the user specifies and 2) or that setupProject uses to place the packages -- I see them being places in packagePath not .libPaths()[1]

from spades.project.

eliotmcintire avatar eliotmcintire commented on July 4, 2024

A couple things:

  1. setupProject is intended to be "first" not after packages are loaded. The chances are VERY high that this will not work because you installed and loaded LandR from your personal folder, then switched package directory then you will try to find LandR and it won't be there. Put all packages inside the setupProject.

This is the reason you had problems with data.table ... you installed and loaded LandR from one place, then loaded it, then you tried to deal with package dependencies within setupProject. Just remove your first line of Require, it is unnecessary. If you need to have a line for SpaDES.project installation, then you must just install it manually. Restart R. In general, it is hard to work on packages whose job it is to install the same packages.

So --> this is an unusual problem that you are trying to develop content within SpaDES.project, but you did not do it in a way that doesn't prevent you from creating problems.

  1. name is not the same as basename(paths$projectPath); this warning will have been shown. You must have them be the same. SpaDES.project overrides "Name" with the basename(paths$projectPath), but gives the warning.

  2. Your code did not create the same errors you had, so I couldn't address them directly. Suffice, they should disappear if you do above steps.

Require::Install("PredictiveEcology/SpaDES.project@windowsTesting")

out <- setupProject(name = "LandRDemo_vegOnly",
                    options = list("reproducible.useTerra" = TRUE),
                    paths = list(projectPath = "C:/GitHub/LandR-tutorials/LandRDemo_coreVeg",
                                 modulePath = "C:/GitHub/LandR-tutorials/LandRDemo_coreVeg/modules",
                                 scratchPath = tempdir(),
                                 packagePath = "C:/GitHub/LandR-tutorials/packages"),
                    modules = c("PredictiveEcology/Biomass_speciesData@terra-migration",
                                "PredictiveEcology/Biomass_borealDataPrep@terra-migration",
                                "PredictiveEcology/Biomass_speciesParameters@development",
                                "PredictiveEcology/Biomass_core@terra-migration",
                                "PredictiveEcology/Biomass_validationKNN@development"),
                    packages = c("PredictiveEcology/LandR@development",
                                 "terra")
)

from spades.project.

eliotmcintire avatar eliotmcintire commented on July 4, 2024

Please see windowsTesting branch for other fixes that are relevant that this example does not hit... but it will.

from spades.project.

CeresBarros avatar CeresBarros commented on July 4, 2024

Indeed, I've tested it myself and only found a wee browser that needed removing see #36

from spades.project.

CeresBarros avatar CeresBarros commented on July 4, 2024

on this note:

name is not the same as basename(paths$projectPath); this warning will have been shown. You must have them be the same. SpaDES.project overrides "Name" with the basename(paths$projectPath), but gives the warning.

oops, that was my bad, they were supposed to be the same!

from spades.project.

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.