Open ashiklom opened 4 years ago
Sounds like a good plan to me.
I fully support this and can try to provide support/help if needed. FWIW, I use most of the data.atmosphere functions outside of PEcAn already (resulting in me commenting out the functions you mention), so it'll be easier for me to keep PEcAn mainline functions up to date with my debugging if this happens.
This issue is stale because it has been open 365 days with no activity.
@ashiklom can I work on this issue?
@moki1202 Since data.atmosphere
is very tightly coupled to the overall PEcAn workflow, I would strongly suggest that you set yourself up to run the workflow with your version of the code first. Then, as you're working on this issue, you can run local workflows and make sure everything still works before submitting the pull request.
@ashiklom to remove dependancy on PEcAn.remote::fqdn()
, I can just move the base\remote\R\fqdn file to modules\data.atmosphere and make appropriate adjustments in the description file right?
I would copy, not move, so that other code is not affected.
@ashiklom just noticed that this issue won't need much work once the packages are uploaded to CRAN right?
Maybe. But "once the packages are uploaded to CRAN" refers to what's likely a very long time in the future; possibly, never, depending on how that task goes. So I wouldn't necessarily count on it.
In my opinion, the opposite sequencing makes more sense --- that is, make this package (and other PEcAn modules) more mutually independent, then upload them one by one to CRAN.
I propose that
PEcAn.data.atmosphere
be a general tool for downloading and processing meteorological data (including gapfilling, formatting to PEcAn standard, etc.), but not provide functions that are specific to the PEcAn workflow. if we can makedata.atmosphere
be self-contained, that will make it easier to install and test and make people more inclined to use it outside of the standard PEcAn workflow (which is its own form of testing).The current PEcAn dependencies in
data.atmosphere
arePEcAn.DB
andPEcAn.remote
(andPEcAn.logger
, but it's tiny and rarely changes, so I'm not including it).PEcAn.DB
is primarily used inmet.process
and associated helpers. I propose we movemet.process
and friends toPEcAn.workflow
, which should eliminate the dependency onPEcAn.DB
and the need for a database.PEcAn.remote
is only used for itsfqdn()
for figuring out the current machine's hostname. I propose we either: (1) Create an internal copy offqdn()
that lives indata.atmosphere
and is not exported (it's a small function unlikely to change in the future, so I think this is well worth eliminating a bulky, non-CRAN dependency); or (2) set thehost
information for remote downloads outside of thedownload.*
functions (for example, make it an optional argument of these functions, or just modify the outputdata.frame
outside of thedownload.*
functions).Thoughts?