-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gh-actions
committed
Oct 5, 2023
1 parent
ed1fdf0
commit dafd86b
Showing
6 changed files
with
62 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
|
||
rule generate_data: | ||
output: | ||
'src/data/test_data.npz' | ||
cache: | ||
True | ||
script: | ||
'src/scripts/test_data.py' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,44 @@ | ||
# 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 | ||
nodesep: '0.65' | ||
ranksep: '1' | ||
group_by_type: false | ||
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 | ||
penwidth: '2' | ||
shape: box | ||
width: '1' | ||
render: false | ||
datasets: null | ||
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 | ||
src/scripts/test_figure.py: src/data/test_data.npz | ||
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 | ||
id: null | ||
pull: | ||
- src/tex/ms.tex | ||
- src/tex/bib.bib | ||
|
||
# Always require all input files to be present on disk for workflow to pass? | ||
- src/tex/ms.tex | ||
- src/tex/bib.bib | ||
push: | ||
- src/tex/figures | ||
- src/tex/output | ||
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 | ||
enabled: true | ||
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 | ||
xpos: 0.5 | ||
ypos: 0.5 | ||
synctex: true | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import numpy as np | ||
import paths | ||
import os | ||
if os.getenv('CI', 'false') == 'true' or os.getenv('SYW_NO_RUN', 'false') == 'true': | ||
raise Exception('Output should have been downloaded from Zenodo.') | ||
np.random.seed(0) | ||
data = np.random.randn(100, 10) | ||
np.savez(paths.data / 'test_data.npz', data=data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
import paths | ||
np.random.seed(0) | ||
data = np.load(paths.data / 'test_data.npz') | ||
fig = plt.figure(figsize=(7, 6)) | ||
plt.plot(data) | ||
fig.savefig(paths.figures / 'test_figure.pdf', bbox_inches='tight', dpi=300) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters