Skip to content

Commit

Permalink
[showyourwork] first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gh-actions committed Oct 5, 2023
0 parents commit ed1fdf0
Show file tree
Hide file tree
Showing 24 changed files with 9,980 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build pull request

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Build the article PDF
concurrency: showyourwork-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build the article PDF
id: build
uses: showyourwork/showyourwork-action@v1
with:
showyourwork-spec: git+https://github.com/showyourwork/showyourwork.git@be241a097ef213fc41f0d2ab4e2f9db4b0b04e7f#egg=showyourwork
env:
SANDBOX_TOKEN: ${{ secrets.SANDBOX_TOKEN }}
OVERLEAF_EMAIL: ${{ secrets.OVERLEAF_EMAIL }}
OVERLEAF_PASSWORD: ${{ secrets.OVERLEAF_PASSWORD }}
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build

on:
push:

jobs:
build:
runs-on: ubuntu-latest
name: Build the article PDF
concurrency: showyourwork-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build the article PDF
id: build
uses: showyourwork/showyourwork-action@v1
with:
showyourwork-spec: git+https://github.com/showyourwork/showyourwork.git@be241a097ef213fc41f0d2ab4e2f9db4b0b04e7f#egg=showyourwork
env:
SANDBOX_TOKEN: ${{ secrets.SANDBOX_TOKEN }}
OVERLEAF_EMAIL: ${{ secrets.OVERLEAF_EMAIL }}
OVERLEAF_PASSWORD: ${{ secrets.OVERLEAF_PASSWORD }}
14 changes: 14 additions & 0 deletions .github/workflows/process-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: process pull request

on:
workflow_run:
workflows: [build pull request]
types: [completed]

jobs:
process-pr:
runs-on: ubuntu-latest
name: Process pull request
steps:
- name: Process pull request
uses: showyourwork/showyourwork-action/process-pull-request@v1
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Snakemake and showyourwork temporaries
**/.snakemake
**/.showyourwork*

# Showyourwork output files
/*.pdf
report.html
arxiv.tar.gz

# Figure output
src/tex/figures/*

# Miscellaneous
__pycache__
*.synctex.gz
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 @showyourwork

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<p align="center">
<a href="https://github.com/showyourwork/showyourwork">
<img width = "450" src="https://raw.githubusercontent.com/showyourwork/.github/main/images/showyourwork.png" alt="showyourwork"/>
</a>
<br>
<br>
<a href="https://github.com/showyourwork/test-cache/actions/workflows/build.yml">
<img src="https://github.com/showyourwork/test-cache/actions/workflows/build.yml/badge.svg?branch=main" alt="Article status"/>
</a>
<a href="https://github.com/showyourwork/test-cache/raw/main-pdf/arxiv.tar.gz">
<img src="https://img.shields.io/badge/article-tarball-blue.svg?style=flat" alt="Article tarball"/>
</a>
<a href="https://github.com/showyourwork/test-cache/raw/main-pdf/ms.pdf">
<img src="https://img.shields.io/badge/article-pdf-blue.svg?style=flat" alt="Read the article"/>
</a>
</p>

An open source scientific article created using the [showyourwork](https://github.com/showyourwork/showyourwork) workflow.
Empty file added Snakefile
Empty file.
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- conda-forge::numpy=1.19.2
- conda-forge::pip=21.0.1
- conda-forge::python=3.9
- pip:
- matplotlib==3.4.3
105 changes: 105 additions & 0 deletions showyourwork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Enable rule caching on Zenodo?
cache_on_zenodo: true

# Workflow graph (DAG) generation
dag:
# Generate `dag.pdf` on each build?
render: false
# Graphviz layout engine
engine: sfdp
# Group files by type into plates?
group_by_type: false
# Custom graph attributes
graph_attr:
ranksep: "1"
nodesep: "0.65"
# Custom node attributes
node_attr:
shape: "box"
penwidth: "2"
width: "1"
# Files and glob patterns to ignore
# ignore_files:
# - src/tex/orcid-ID.png


# Externally-hosted datasets, e.g. on Zenodo
datasets:
# 10.5281/zenodo.6468327:
# contents:
# TOI640b.json: src/data/TOI640b.json

# Custom file dependencies
dependencies:
# src/scripts/my_script.py:
# - src/data/dataset_for_my_script.dat
# src/tex/ms.tex:
# - src/tex/stylesheet.tex

# Name of the `.tex` manuscript and corresponding `.pdf` article
ms_name: ms

# Optimize DAG by removing unnecessary jobs upstream of cache hits?
optimize_caching: false

# Overleaf sync settings
overleaf:
# Overleaf project ID (blank = disabled)
id:
# Perform sync on GitHub Actions?
gh_actions_sync: true
# List of files to push to Overleaf
push:
- src/tex/figures
- src/tex/output
# List of files to pull from Overleaf
pull:
- src/tex/ms.tex
- src/tex/bib.bib

# Always require all input files to be present on disk for workflow to pass?
require_inputs: true

# Allow cacheable rules to run on GitHub Actions?
run_cache_rules_on_ci: false

# Mapping of script file extensions to instructions for executing them
scripts:
py: python {script}

# Display of the `showyourwork` stamp on first page
stamp:
# Show the stamp?
enabled: true
# Stamp angle in degrees
angle: -20.0
# Stamp size in inches
size: 0.75
# Horizontal position in inches from right edge of paper
xpos: 0.50
# Vertical position in inches from top edge of paper
ypos: 0.50
# Display of the repo URL in the stamp
url:
# Show the URL?
enabled: true
# Maximum URL length to display
maxlen: 40

# Enable SyncTeX?
synctex: True

# Command-line options to be passed to tectonic when building the manuscript
tectonic_args: []

# Preprocessing script for arXiv tarball
# (such as to switch `minted` from `finalizecache` to `frozencache`)
# The script will be passed a directory containing the manuscript source
# as input, and should modify the contents of that directory in-place.
# preprocess_arxiv_script: my_preprocess_script.sh

# Enable verbose output?
verbose: false

# Version of `showyourwork` used to create this workflow
version: 0.4.4.dev12+gbe241a0
3 changes: 3 additions & 0 deletions src/data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Nothing in this folder should be tracked by git
*
!.gitignore
9 changes: 9 additions & 0 deletions src/scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Don't track figure output
*.pdf
*.eps
*.png
*.jpeg
*.jpg
*.tiff
*.gif
*.svg
2 changes: 2 additions & 0 deletions src/scripts/matplotlibrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce a non-interactive backend
backend: agg
29 changes: 29 additions & 0 deletions src/scripts/paths.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""
Exposes common paths useful for manipulating datasets and generating figures.
"""
from pathlib import Path

# Absolute path to the top level of the repository
root = Path(__file__).resolve().parents[2].absolute()

# Absolute path to the `src` folder
src = root / "src"

# Absolute path to the `src/data` folder (contains datasets)
data = src / "data"

# Absolute path to the `src/static` folder (contains static images)
static = src / "static"

# Absolute path to the `src/scripts` folder (contains figure/pipeline scripts)
scripts = src / "scripts"

# Absolute path to the `src/tex` folder (contains the manuscript)
tex = src / "tex"

# Absolute path to the `src/tex/figures` folder (contains figure output)
figures = tex / "figures"

# Absolute path to the `src/tex/output` folder (contains other user-defined output)
output = tex / "output"
2 changes: 2 additions & 0 deletions src/static/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Anything is game in this folder
!*
2 changes: 2 additions & 0 deletions src/tex/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Don't track TeX temporaries
*latexindent*
Loading

0 comments on commit ed1fdf0

Please sign in to comment.