Skip to content

Commit

Permalink
Added template license, readme, action to render quarto to GH Pages (#1)
Browse files Browse the repository at this point in the history
Added template license, readme, action to render quarto to GH Pages
https://github.com/pranavmishra90/project-template/tree/develop
  • Loading branch information
pranavmishra90 authored Aug 27, 2024
2 parents 124da46 + 22e5e48 commit 9170275
Show file tree
Hide file tree
Showing 9 changed files with 141 additions and 13 deletions.
10 changes: 7 additions & 3 deletions .datalad/config
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[datalad "dataset"]
id = f9026e7b-8c71-4092-ba3a-72408294523c
id = f9026e7b-8c71-4092-ba3a-72408294523c

[datalad "ui"]
suppress-similar-results = off
suppress-similar-results = off
progressbar=tqdm

[datalad "save"]
no-message=interactive

[push]
autoSetupRemote = true
autoSetupRemote = true
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"updateRemoteUserUID": true,
"forwardPorts": [3334],
"postCreateCommand": ["/bin/bash"],
"containerEnv": {
"ENV_NAME": "base"
},

// If you need GPUs to be passed into the devcontainer, uncomment the following line
// "runArgs": ["--gpus", "0"],
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test-quarto-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

name: Render and Publish

# you need these permissions to publish to GitHub pages
permissions:
contents: write
pages: write

jobs:
build-deploy:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4


- uses: actions/setup-python@v4
name: Install python packages
with:
python-version: '3.11'
- run: pip install jupyter jupyter-cache

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tinytex: true
# version: SPECIFIC-QUARTO-VERSION-HERE


# Remember, you have to first run `quarto publish gh-pages` locally 1 time to initilize this branch
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.6.0
hooks:
# Lint files
- id: check-yaml
- id: check-json
exclude: |
(?x)^(
.devcontainer/devcontainer.json|
exclude.this.file
)$
- id: mixed-line-ending
args: ["--fix=lf"]
# Prevent adding private keys in files
- id: detect-private-key
# Detect problematic referenced files
- id: check-symlinks
9 changes: 5 additions & 4 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project:
- "*.qmd"
- "*.md"
- "docs/"
- "!readme.md"

# Do not render
- "!code/"
Expand All @@ -15,23 +16,23 @@ project:
timeout: 300

website:
title: "Facsimilab - Template for Datalad Datasets"
title: "FacsimiLab - Project Template for Datalad Datasets"
navbar:
search: true
left:
- text: Home
href: readme.md
href: index.qmd
- text: About
href: notebook/about.qmd
open-graph: true
sidebar:
style: "docked"
contents: auto
reader-mode: true
repo-url: https://github.com/FacsimiLab/datalad-dataset-template
repo-url: https://github.com/FacsimiLab/project-template
repo-actions: [issue, edit]
repo-link-target: "_blank"
page-footer: "Copyright 2024: Pranav Mishra"
page-footer: "Copyright 2024: Pranav Kumar Mishra"

bibliography:
- ./notebook/references.bib
Expand Down
24 changes: 24 additions & 0 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
execute:
echo: false
output: asis
---


<!-- Automatically render the readme as the index page -->

```{python}
with open("readme.md", "r") as file:
markdown_content = file.read()
print(markdown_content)
import datetime as date
print("------")
print("<br>")
print(f"This page was generated automatically from the repository `readme.md` on {date.datetime.now()}")
```


23 changes: 23 additions & 0 deletions licenses/FacsimiLab-Project-Template-Repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# FacsimiLab Template

### MIT License

Copyright (c) 2024 Pranav Kumar Mishra

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.
6 changes: 5 additions & 1 deletion licenses/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ listing:

The repository code, unless otherwise specified, is licensed under the [MIT License](./MIT-license.md).


Note: This repository was generated using the [FacsimiLab project template repository](https://github.com/FacsimiLab/project-template) created by [Pranav Mishra](https://drpranavmishra.com), which is licensed under the [MIT License](./FacsimiLab-Project-Template-Repository.md).

## Repository Media

<img alt="media_CCBY4" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpranavmishra90%2Fbadges%2Fmain%2Fone-sided-badge/media_CCBY4.json&color=3e4c75">
Expand All @@ -28,10 +31,11 @@ This repository uses code and/or files from other sources. You can find the lice

All other works in this repository are copyrighted without explicit useage / sharing permissions from the authors.

### Copyright © 2024 Pranav Kumar Mishra (Rush University, Chicago, IL, USA)
### Copyright © 2024 Pranav Kumar Mishra

---


## List of Licenses {#sec-licenses-list}

:::{#licenses-list}
Expand Down
15 changes: 10 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Dataset template for reproducible research
# [`FacsimiLab`] Project Template for Reproducible Research

# Licensing
## Project Details

## Default copyright
This is a datalad repository for the **FacsimiLab** project. Additional dataset information to go here.

All works (research data) in this repository, unless otherwise specified, are copyrighted without explicit useage / sharing permissions from the author(s). Please visit [Licenses](licenses/readme.md) for further details

**Copyright © 2024 Pranav Kumar Mishra (Rush University, Chicago, IL, USA)**
## Licensing

**Default copyright**

All research data in this repository, unless explicitly stated otherwise, is protected by copyright and does not include permissions for use or sharing from the author(s). This includes raw data, analysis / intermediate data, and research output data. Code, select source files, and specific research output may have other licenses. For more information, please consult the [Licenses](licenses/readme.md) section.

**Copyright © 2024 Pranav Kumar Mishra**

0 comments on commit 9170275

Please sign in to comment.