Skip to content

Commit

Permalink
Update rootstock on 2019-11-20 (#8)
Browse files Browse the repository at this point in the history
merges #8

updates rootstock to manubot/rootstock@277a769

used squash method for updating described at #5 (comment)
  • Loading branch information
dhimmel authored Nov 20, 2019
1 parent 5020816 commit d020443
Show file tree
Hide file tree
Showing 29 changed files with 784 additions and 352 deletions.
58 changes: 58 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# See https://www.appveyor.com/docs/getting-started-with-appveyor-for-linux/
skip_branch_with_pr: true

# Enable 'Do not build on "Push" events' in the AppVeyor project settings
# to only build commits from pull requests
branches:
only:
- master

# Only run AppVeyor on commits that modify at least one of the following files
# Delete these lines to run AppVeyor on all master branch commits
only_commits:
files:
- .appveyor.yml
- build/
- ci/install.sh
- content/

image: ubuntu
services:
- docker

install:
# Create the message with the triggering commit before install so it is
# available if the build fails
- TRIGGERING_COMMIT=${APPVEYOR_PULL_REQUEST_HEAD_COMMIT:-APPVEYOR_REPO_COMMIT}
- appveyor AddMessage "commit $TRIGGERING_COMMIT"
- source ci/install.sh

test_script:
- bash build/build.sh
- MANUSCRIPT_FILENAME=manuscript-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7}
- cp output/manuscript.html $MANUSCRIPT_FILENAME.html
- cp output/manuscript.pdf $MANUSCRIPT_FILENAME.pdf
- appveyor PushArtifact $MANUSCRIPT_FILENAME.html
- appveyor PushArtifact $MANUSCRIPT_FILENAME.pdf

build: off

cache:
- ci/cache

on_success:
- echo "Artifacts available from $APPVEYOR_URL/project/$APPVEYOR_ACCOUNT_NAME/$APPVEYOR_PROJECT_SLUG/builds/$APPVEYOR_BUILD_ID/artifacts"
- echo "Updated PDF available from $APPVEYOR_URL/api/buildjobs/$APPVEYOR_JOB_ID/artifacts/$MANUSCRIPT_FILENAME.pdf"

# The following lines can be safely deleted, which will disable AppVeyorBot
# notifications in GitHub pull requests
# Notifications use Mustache templates http://mustache.github.io/mustache.5.html
# See https://www.appveyor.com/docs/notifications/#customizing-message-template
# for available variables
notifications:
- provider: GitHubPullRequest
template: "AppVeyor [build {{buildVersion}}]({{buildUrl}})
{{#jobs}}{{#messages}} for {{message}} by @{{&commitAuthorUsername}}{{/messages}}{{/jobs}}
{{#passed}} is now complete. The rendered manuscript from this build is temporarily available for download at:\n\n{{/passed}}
{{#failed}} failed.{{/failed}}
{{#jobs}}{{#artifacts}}- [`{{fileName}}`]({{permalink}})\n{{/artifacts}}{{/jobs}}"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
output/*
!output/README.md

webpage/v

# When PDF building fails, a temporary symlink named images in the root
# directory is not removed.
/images

# Manubot cache directory
ci/cache

# Python
__pycache__/
*.pyc
Expand All @@ -17,6 +21,8 @@ __pycache__/
# Misc temporary files
*.bak

# System specific files

## Linux
*~
.Trash-*
Expand All @@ -29,3 +35,6 @@ __pycache__/
## Windows
Thumbs.db
[Dd]esktop.ini

## Text Editors
.vscode
30 changes: 11 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
dist: trusty
sudo: false
language: generic
services:
- docker
branches:
only:
- master
env:
- BUILD_DOCX=true
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh
--output-document miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source $HOME/miniconda/etc/profile.d/conda.sh
- hash -r
- conda config
--set always_yes yes
--set changeps1 no
install:
- conda env create --quiet --file build/environment.yml
- conda list --name manubot
- conda activate manubot
- source ci/install.sh
script:
- sh build/build.sh
- bash build/build.sh
cache:
directories:
- ci/cache
after_success:
- test $TRAVIS_BRANCH = "master" &&
test $TRAVIS_EVENT_TYPE = "push" &&
sh ci/deploy.sh
deploy:
provider: script
script: bash -o xtrace ci/deploy.sh
skip_cleanup: true
on:
branch: master
condition: $TRAVIS_EVENT_TYPE = "push"
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ The fully-formatted author response to peer review from _eLife_ is available in

Manubot is a system for writing scholarly manuscripts via GitHub.
Manubot automates citations and references, versions manuscripts using git, and enables collaborative writing via GitHub.
An [overview manuscript](https://greenelab.github.io/meta-review/ "Open collaborative writing with Manubot") presents the benefits of collaborative writing with Manubot and its unique features.
The [rootstock repository](https://git.io/fhQH1) is a general purpose template for creating new Manubot instances, as detailed in [`SETUP.md`](SETUP.md).
See [`USAGE.md`](USAGE.md) for documentation how to write a manuscript.

Please open [an issue](https://git.io/fhQHM) for questions related to Manubot usage, bug reports, or general inquiries.

### Repository directories & files

The directories are as follows:

+ [`content`](content) contains the manuscript source, which includes markdown files as well as inputs for citations and references.
+ [`output`](output) contains the outputs (generated files) from the manubot including the resulting manuscripts.
See [`USAGE.md`](USAGE.md) for more information.
+ [`output`](output) contains the outputs (generated files) from Manubot including the resulting manuscripts.
You should not edit these files manually, because they will get overwritten.
+ [`webpage`](webpage) is a directory meant to be rendered as a static webpage for viewing the HTML manuscript.
+ [`build`](build) contains commands and tools for building the manuscript.
Expand All @@ -38,32 +45,36 @@ The directories are as follows:

### Local execution

To run the Manubot locally, install the [conda](https://conda.io) environment as described in [`build`](build).
Then, you can build the manuscript on POSIX systems by running the following commands.
The easiest way to run Manubot is to use [continuous integration](#continuous-integration) to rebuild the manuscript when the content changes.
If you want to build a Manubot manuscript locally, install the [conda](https://conda.io) environment as described in [`build`](build).
Then, you can build the manuscript on POSIX systems by running the following commands from this root directory.

```sh
# Activate the manubot conda environment (assumes conda version >= 4.4)
conda activate manubot

# Build the manuscript, saving outputs to the output directory
sh build/build.sh
bash build/build.sh

# At this point, the HTML & PDF outputs will have been created. The remaining
# commands are for serving the webpage to view the HTML manuscript locally.
# This is required to view local images in the HTML output.

# Configure the webpage directory
python build/webpage.py
manubot webpage

# View the manuscript locally at http://localhost:8000/
# You can now open the manuscript webpage/index.html in a web browser.
# Alternatively, open a local webserver at http://localhost:8000/ with the
# following commands.
cd webpage
python -m http.server
```

Sometimes it's helpful to monitor the content directory and automatically rebuild the manuscript when a change is detected.
The following command, while running, will trigger both the `build.sh` and `webpage.py` scripts upon content changes:
The following command, while running, will trigger both the `build.sh` script and `manubot webpage` command upon content changes:

```sh
sh build/autobuild.sh
bash build/autobuild.sh
```

### Continuous Integration
Expand All @@ -74,7 +85,7 @@ Whenever a pull request is opened, Travis CI will test whether the changes break
The build process aims to detect common errors, such as invalid citations.
If your pull request build fails, see the Travis CI logs for the cause of failure and revise your pull request accordingly.

When a commit to the `master` branch occurs (for example, when a pull request is merged), Travis CI builds the manuscript and writes the results to the [`gh-pages`](https://github.com/dhimmel/rephetio-manuscript/tree/gh-pages) and [`output`](https://github.com/dhimmel/rephetio-manuscript/tree/output) branches.
When a commit to the `master` branch occurs (for example, when a pull request is merged), Travis CI builds the manuscript and writes the results to the [`gh-pages`](https://github.com/manubot/rootstock/tree/gh-pages) and [`output`](https://github.com/manubot/rootstock/tree/output) branches.
The `gh-pages` branch uses [GitHub Pages](https://pages.github.com/) to host the following URLs:

+ **HTML manuscript** at https://dhimmel.github.io/rephetio-manuscript/
Expand Down
Loading

0 comments on commit d020443

Please sign in to comment.