Skip to content

Commit 838f326

Browse files
author
gh-actions
committed
[showyourwork] first commit
0 parents  commit 838f326

24 files changed

+9979
-0
lines changed
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: build pull request
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: Build the article PDF
10+
concurrency: showyourwork-${{ github.ref }}
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Build the article PDF
18+
id: build
19+
uses: showyourwork/showyourwork-action@v1
20+
with:
21+
showyourwork-spec: git+https://github.com/showyourwork/showyourwork.git@cfdf11e504409474451d7382b24d2148ad060788#egg=showyourwork
22+
env:
23+
SANDBOX_TOKEN: ${{ secrets.SANDBOX_TOKEN }}
24+
OVERLEAF_TOKEN: ${{ secrets.OVERLEAF_TOKEN }}

.github/workflows/build.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: Build the article PDF
10+
concurrency: showyourwork-${{ github.ref }}
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Build the article PDF
18+
id: build
19+
uses: showyourwork/showyourwork-action@v1
20+
with:
21+
showyourwork-spec: git+https://github.com/showyourwork/showyourwork.git@cfdf11e504409474451d7382b24d2148ad060788#egg=showyourwork
22+
env:
23+
SANDBOX_TOKEN: ${{ secrets.SANDBOX_TOKEN }}
24+
OVERLEAF_TOKEN: ${{ secrets.OVERLEAF_TOKEN }}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: process pull request
2+
3+
on:
4+
workflow_run:
5+
workflows: [build pull request]
6+
types: [completed]
7+
8+
jobs:
9+
process-pr:
10+
runs-on: ubuntu-latest
11+
name: Process pull request
12+
steps:
13+
- name: Process pull request
14+
uses: showyourwork/showyourwork-action/process-pull-request@v1

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Snakemake and showyourwork temporaries
2+
**/.snakemake
3+
**/.showyourwork*
4+
5+
# Showyourwork output files
6+
/*.pdf
7+
report.html
8+
arxiv.tar.gz
9+
10+
# Figure output
11+
src/tex/figures/*
12+
13+
# Miscellaneous
14+
__pycache__
15+
*.synctex.gz

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 @showyourwork
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<p align="center">
2+
<a href="https://github.com/showyourwork/showyourwork">
3+
<img width = "450" src="https://raw.githubusercontent.com/showyourwork/.github/main/images/showyourwork.png" alt="showyourwork"/>
4+
</a>
5+
<br>
6+
<br>
7+
<a href="https://github.com/showyourwork/test-matplotlib-latex/actions/workflows/build.yml">
8+
<img src="https://github.com/showyourwork/test-matplotlib-latex/actions/workflows/build.yml/badge.svg?branch=main" alt="Article status"/>
9+
</a>
10+
<a href="https://github.com/showyourwork/test-matplotlib-latex/raw/main-pdf/arxiv.tar.gz">
11+
<img src="https://img.shields.io/badge/article-tarball-blue.svg?style=flat" alt="Article tarball"/>
12+
</a>
13+
<a href="https://github.com/showyourwork/test-matplotlib-latex/raw/main-pdf/ms.pdf">
14+
<img src="https://img.shields.io/badge/article-pdf-blue.svg?style=flat" alt="Read the article"/>
15+
</a>
16+
</p>
17+
18+
An open source scientific article created using the [showyourwork](https://github.com/showyourwork/showyourwork) workflow.

Snakefile

Whitespace-only changes.

environment.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- conda-forge::numpy=1.19.2
3+
- conda-forge::pip=21.0.1
4+
- conda-forge::python=3.9
5+
- pip:
6+
- matplotlib==3.4.3

showyourwork.yml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Enable rule caching on Zenodo?
2+
cache_on_zenodo: true
3+
4+
# Workflow graph (DAG) generation
5+
dag:
6+
# Generate `dag.pdf` on each build?
7+
render: false
8+
# Graphviz layout engine
9+
engine: sfdp
10+
# Group files by type into plates?
11+
group_by_type: false
12+
# Custom graph attributes
13+
graph_attr:
14+
ranksep: "1"
15+
nodesep: "0.65"
16+
# Custom node attributes
17+
node_attr:
18+
shape: "box"
19+
penwidth: "2"
20+
width: "1"
21+
# Files and glob patterns to ignore
22+
# ignore_files:
23+
# - src/tex/orcid-ID.png
24+
25+
26+
# Externally-hosted datasets, e.g. on Zenodo
27+
datasets:
28+
# 10.5281/zenodo.6468327:
29+
# contents:
30+
# TOI640b.json: src/data/TOI640b.json
31+
32+
# Custom file dependencies
33+
dependencies:
34+
# src/scripts/my_script.py:
35+
# - src/data/dataset_for_my_script.dat
36+
# src/tex/ms.tex:
37+
# - src/tex/stylesheet.tex
38+
39+
# Name of the `.tex` manuscript and corresponding `.pdf` article
40+
ms_name: ms
41+
42+
# Optimize DAG by removing unnecessary jobs upstream of cache hits?
43+
optimize_caching: false
44+
45+
# Overleaf sync settings
46+
overleaf:
47+
# Overleaf project ID (blank = disabled)
48+
id:
49+
# Perform sync on GitHub Actions?
50+
gh_actions_sync: true
51+
# List of files to push to Overleaf
52+
push:
53+
- src/tex/figures
54+
- src/tex/output
55+
# List of files to pull from Overleaf
56+
pull:
57+
- src/tex/ms.tex
58+
- src/tex/bib.bib
59+
60+
# Always require all input files to be present on disk for workflow to pass?
61+
require_inputs: true
62+
63+
# Allow cacheable rules to run on GitHub Actions?
64+
run_cache_rules_on_ci: false
65+
66+
# Mapping of script file extensions to instructions for executing them
67+
scripts:
68+
py: python {script}
69+
70+
# Display of the `showyourwork` stamp on first page
71+
stamp:
72+
# Show the stamp?
73+
enabled: true
74+
# Stamp angle in degrees
75+
angle: -20.0
76+
# Stamp size in inches
77+
size: 0.75
78+
# Horizontal position in inches from right edge of paper
79+
xpos: 0.50
80+
# Vertical position in inches from top edge of paper
81+
ypos: 0.50
82+
# Display of the repo URL in the stamp
83+
url:
84+
# Show the URL?
85+
enabled: true
86+
# Maximum URL length to display
87+
maxlen: 40
88+
89+
# Enable SyncTeX?
90+
synctex: True
91+
92+
# Command-line options to be passed to tectonic when building the manuscript
93+
tectonic_args: []
94+
95+
# Preprocessing script for arXiv tarball
96+
# (such as to switch `minted` from `finalizecache` to `frozencache`)
97+
# The script will be passed a directory containing the manuscript source
98+
# as input, and should modify the contents of that directory in-place.
99+
# preprocess_arxiv_script: my_preprocess_script.sh
100+
101+
# Enable verbose output?
102+
verbose: false
103+
104+
# Version of `showyourwork` used to create this workflow
105+
version: 0.4.4.dev93+gcfdf11e

src/data/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Nothing in this folder should be tracked by git
2+
*
3+
!.gitignore

src/scripts/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Don't track figure output
2+
*.pdf
3+
*.eps
4+
*.png
5+
*.jpeg
6+
*.jpg
7+
*.tiff
8+
*.gif
9+
*.svg

src/scripts/matplotlibrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Enforce a non-interactive backend
2+
backend: agg

src/scripts/paths.py

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
Exposes common paths useful for manipulating datasets and generating figures.
3+
4+
"""
5+
6+
from pathlib import Path
7+
8+
# Absolute path to the top level of the repository
9+
root = Path(__file__).resolve().parents[2].absolute()
10+
11+
# Absolute path to the `src` folder
12+
src = root / "src"
13+
14+
# Absolute path to the `src/data` folder (contains datasets)
15+
data = src / "data"
16+
17+
# Absolute path to the `src/static` folder (contains static images)
18+
static = src / "static"
19+
20+
# Absolute path to the `src/scripts` folder (contains figure/pipeline scripts)
21+
scripts = src / "scripts"
22+
23+
# Absolute path to the `src/tex` folder (contains the manuscript)
24+
tex = src / "tex"
25+
26+
# Absolute path to the `src/tex/figures` folder (contains figure output)
27+
figures = tex / "figures"
28+
29+
# Absolute path to the `src/tex/output` folder (contains other user-defined output)
30+
output = tex / "output"

src/static/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Anything is game in this folder
2+
!*

src/tex/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Don't track TeX temporaries
2+
*latexindent*

0 commit comments

Comments
 (0)