Package: girder-tech-journal
Assumes a certain folder structure so far for the main page display:
The top level collection ID value is what should be used in the configuration page
It will then search for the folders under each, to find all available journal “issues”From each of those “issues”, it will query for a “submission” which is an available folder
in the “issue”.  Eventually, this folder will have metadata for the rest of the information
that needs to be shown.  A sample structure is found in a graphic diagram below, with the Girder
type in parenthesis:OTJ (collection)
├── 2016 Jan-Jun (folder)
│   ├── Submission 1 (folder)
│   │   └── Revision 1
|   |       └── blah.tar
│   │   └── Revision 2
|   |       └── blah_v2.tar
│   └── Submission 2 (folder)
│   │   └── Revision 1
│           └── Paper.docx
└── 2016 Jun-Dec (folder)
    └── Submission 3 (folder)
        └── Revision 1
            └── Paper2.docxSetup InstructionsInstall pre-requisite programsFollow the GirderSystem Prerequisitesdocumentation to ensure that all
necessary programs are available for the pip-installed version of Girder.Note:The Technical Journal plugin requires Node.js 8+. When following the
documentation to enable the Node.js APT repository, use:curl-sLhttps://deb.nodesource.com/setup_8.x|sudo-Ebash-Note:The Technical Journal plugin requires that MongoDB is at least 3.4+. When following the
documentation to install MongoDB, replace ‘3.2’ with ‘3.4’echo"deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main"\|sudotee/etc/apt/sources.list.d/mongodb-org-3.4.listorecho"deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse"\|sudotee/etc/apt/sources.list.d/mongodb-org-3.4.listSet up Technical Journal pluginThe plugin can either be installed directly from pip:pipinstallgirder-tech-journalOr by cloning this repositorygitclonehttps://github.com/girder/tech_journalcdtech_journalpipinstall.In the git repo directory, follow theInstallationdocumentation to create a
virtual environment and install Girder from pypi. Do not install the web client
libraries yet. The following instructions assume you have entered the virtual
environment.Install yarnnpminstall-gyarnInstall web packages:cdgirder-tech-journal-guiyarninstallTo run the development server:yarnrunserveTo build the standalone web application for production:yarnrunbuildIf you’ve cloned the repo and are developing for the plugin, there is a custom command insetup.pythat will
automate installing yarn packages, building the frontend for production, and copying the dist folder to the proper location.
To use this, run:python setup.py build_ui.WARNINGIf you rungirder servein development mode, the standalone frontendwill notbe served at/tech_journal.
This is because it is expected that the frontend will be served on its own (E.g.yarn run serve) in order
to see the changes being made. If for some reason you need to serve the frontend at/tech_journal, you will need
to rungirder servein production mode. However be aware that in this case it is serving the pre-built files,
and thus no changes will take affect until you rebuild the frontend (E.g. by runningpython setup.py build_ui).Install girder_workerThe submission upload page has the capability to submit a GitHub URL and
have the Tech Journal download themasterbranch of the repository
to be made available as the download of the submission.  To do this,
it utilizes thegirder_workertool. This is automatically installed when
installing the Tech Journal plugin.Install RabbitMQFollowRabbitMQdocumentation to install.After installation, ensure that the service is runningservice --status-all | grep rabbitmq
  [ + ]  rabbitmq-serverInstall Tech Journal TasksThe package found in thetech_journal_tasksdirectory will also need
to be installed into the environment prior to starting thegirder_workerprogram.This is accomplished by entering thetech_journal_tasksdirectory
and executing the setup.py file with theinstalldirective.cdtech_journal_taskspipinstall.Start girder_workerExecuting thegirder_workerprogram will start the task listener. If
one has accepted the default installation for RabbitMQ, there will be no
changes necessary to the girder_worker configuration to allow it to connect
to RabbitMQ.  Start girder_worker with the following command:girder-worker-linfoWhen viewing the first set of output, ensure that theprocessGitHubandsurveySubmissiontasks are listed under the[tasks]header:snyder@midas-vm:~$ girder-worker -l info
<....>

[tasks]
  . girder_worker.docker.tasks.docker_run
  . girder_worker.run
  .tech_journal_tasks.tasks.processGithub.tech_journal_tasks.tasks.surveySubmissionConfigure the pluginOpen a new terminal and activate the virtual environment.cdtech_journal.~/girder_env/bin/activateBuild the Girder web client and start the server:girderbuildgirderserveNote:although ordinarily Girder would want to rebuild the newly activated
plugin, you do not need to do that now, since we are building this plugin in a
“standalone” mode, outside the control of Girder’s build systemCreate Admin UserOpenhttp://localhost:8080/in your web browser, and you should see the
Girder welcome page.The first user to be created in the system is automatically given admin
permission over the instance, so the first thing you should do after starting
your instance for the first time is to register a user. After that succeeds,
you should see a link appear in the navigation bar that says Admin console.Generate Folder StructureFirst, generate a “Collection” to represent the total information of the OTJ.
This can be accomplished by clicking onCollectionsin the left menu and
then clicking on theCreate Collectionbutton. Enter a name and a
description, then clickCreate.This creation of the collection can also be done by utilizing theplugins/admin/journalpage of the OTJ.NoteThe description of the collection must contain the string__journal__to be picked up by certain OTJ pages.The “Unique ID” of this folder, which can be found by clicking on the blue
button with  anion it, will be used later to configure the Tech Journal
plugin.Then, generate a folder within that collection to be the first “Issue” that will
be submitted to. This is accomplished by clicking on theCollection Actionsmenu and selectingCreate folder here.  TheCollection Actionsbutton
can be found to the right of the blue button from above. Enter a name and
description for the first folder and then click “Create” again.Enable the Technical Journal pluginTo enable the plugin, head to theAdmin Consoleand click on thePluginslink.A list of the current plugins will be shown, scroll down to theTechnical Journal Pluginand enable it by switching theOFFslider
to the on position.Click on theConfigure Pluginicon, which looks like a small gear.This will show the 5 fields that are used to configure a Midas instance of
the Technical Journal.  Only theDefault Journalentry will need to be
filled out at this point.  Enter theUnique IDof the collection that was
generated above and clickSave Configuration.Once that has been saved, the plugin should be configured and ready to be used.
Visit the entry point of the plugin by visiting:http://<webroot>/tech_journalOr something like this for a localhost instance:http://localhost:8080/tech_journalWARNINGSome of the links,JournalandHelp, in the menu bar do not point to
valid locations within the plugin yet.  TheHomeandNew Submissionlinks will take you to the correct pages.ReleasingTo update the PyPI release:First increment the version is setup.py. Then run:cdgirder-tech-journal-gui;yarnrunbuild;cd..;pythonsetup.pysdist;tox-erelease