Skip to content

Commit

Permalink
update automation documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chusloj committed Aug 25, 2020
1 parent 366eb20 commit f14a2c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion citation_pull/AUTOMATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Citation Management Automation
--------------------------
This document details the mechanisms for nightly automated updates to the Tax-Calculator citations within its Jupyter Book documentation. This process (and this documentation) is almost identical to those used by Peter Metz when [building the catalog of PSLModels.org](https://github.com/PSLmodels/PSL-Infrastructure/blob/fd03be906313702d61bc30267da156ff95d1ec97/Tools/Catalog-Builder/AUTOMATION.md).

`taxcalc_citation_pull.sh` is a bash script that runs a `curl` command to pull the latest `.bibtex` file containing Tax-Calculator citations from Zotero, commits changes to a new local branch, pushes the new local branch, pulls any changes from the new branch into the master branch, and finally deletes the new branch locally and remotely.
`taxcalc_citation_pull.sh` is a bash script that runs a `curl` command to pull the latest `.bibtex` file containing Tax-Calculator citations from Zotero and create a new file to cite each of the references in `hidden_cite.md` using `generate_cite_list.py`. The shell script then commits changes to a new local branch, pushes the new local branch, pulls any changes from the new branch into the master branch, and finally deletes the new branch locally and remotely.

`taxcalc_citation_pull.sh` is run nightly with a program called [Launchd](http://www.launchd.info), an open-source service management framework for managing scripts. To use Launchd, the user creates an agent, a program that runs in the background without requiring user input, that is specified in an XML file called a property list (plist) and saves the plist in the follow folder: `~/Library/LaunchAgents`. If the user's computer is asleep or shut down when the Launchd job is scheduled, the job will run once the computer is awake. To run the bash script every night at 1am, the plist should look similar to the following:

Expand Down

0 comments on commit f14a2c5

Please sign in to comment.