Menu

#66 external links for external projects

workingwiki
open
None
5
2013-05-07
2011-02-23
Lee Worden
No

It has been suggested, if I understand correctly, that when a project on wiki A has a prerequisite project on wiki B, it should link to the appropriate ManageProject page on wiki B.

Currently the URI in the listing is a link to a local ManageProject page for a local project object that is basically contains nothing but the external URI. That is, there is a project description on wiki A for the prerequisite project and that's what we link to. I think there are good reasons for this (*). But at least, when you get to the ManageProject page on wiki A it should link to wiki B's ManageProject page.

(*) for instance, you may want to do operations on that project on the local wiki, such as <project-file filename="fname" project="pe-ww:EXTERNAL-URI/">, and save configuration info on the project such as whether to use the default makefiles.</project-file>

Discussion

  • Lee Worden

    Lee Worden - 2012-02-07

    that for instance isn't very convincing. the setting for default makefiles should be the one on the project's home wiki.

    there may be valid scenarios in future setups, though. Suppose project A is housed on my wiki, wiki A, and calls on project B which is housed on wiki B on a completely different server at a different university. In this case, wiki B would probably use a ProjectEngine instance on its server to do computations. So on wiki A I need to have a local copy of project B. We don't currently have the code to pull the project files from wiki B to project engine A, but it's my intention to provide it. Once that is in place, we'll have scenarios like this one, and the issue is this: if clicking the prerequisite project link takes me to wiki B, then clicking "sync" on that page will sync the files to project engine B. The only way for wiki A's editors to sync those files into project engine A is if there's a project page on wiki A for project engine B. That's why I did it that way.

    So really we probably need to have both links.

     
  • Lee Worden

    Lee Worden - 2012-02-07

    All that said, it would probably make sense to just link to wiki B in the current code and reserve the possibility of adding a second "local" link sometime later.

     
  • Lee Worden

    Lee Worden - 2012-02-07

    On the technical side, the thing to do is fix up WWInterface::make_manage_project_link() so it has an optional $local=true argument (defaults to false) to control whether it makes a local link for the project or a link to its page on its home wiki.

     
  • Lee Worden

    Lee Worden - 2012-02-07

    this also raises the question of non-local links for non-WW projects. for instance, when a prerequisite project is on github.com, not on a wiki, I guess we should link to there.

    to this end, the link-making should actually be done in the ProjectDescription object, so it can be handled polymorphically by the different kinds of projects. (Though there are only two classes currently, WorkingWikiProjectDescription for WW projects and ExternalProjectDescription for "everything else". Even so, it's better to separate the cases by putting them there than to do it redundantly in some other part of the code.)

    So, adding ProjectDescription::manage_project_link($local=false). Hopefully it'll be easy and helpful to migrate the code from WWInterface over to here.

     
  • Lee Worden

    Lee Worden - 2012-02-07

    On the other hand, I can't cover all the possible places that outside links might need to point to for git, svn and cvs projects, so I'm going to need to use a configurable variable to let people add their own cases. And I can implement the whole thing using that variable, so I think the ProjectDescription:: thing is overkill. I'm just going to put the feature in WWInterface::make_manage_project_link().

     
  • Lee Worden

    Lee Worden - 2012-02-07

    implemented in r821.

     
  • Lee Worden

    Lee Worden - 2012-08-02

    Hmm, I took pe-git: out of the variable for external links, because I need on-wiki project pages so I can look into the directory when something doesn't work right.

     

Anonymous
Anonymous

Add attachments
Cancel