diff --git a/.github/workflows/deploy-book.yml b/.github/workflows/deploy-book.yml deleted file mode 100644 index 41fdcd5..0000000 --- a/.github/workflows/deploy-book.yml +++ /dev/null @@ -1,59 +0,0 @@ - -# https://jupyterbook.org/en/stable/publish/gh-pages.html - -name: deploy-book - -on: - push: - branches: - - main - # If your git repository has the Jupyter Book within some-subfolder next to - # unrelated files, you can make this run only if a file within that specific - # folder has been modified. - # - paths: - - lessons/** - -jobs: - deploy-book: - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - steps: - - uses: actions/checkout@v3 - - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Install dependencies - run: | - pip install -r requirements.txt - - # (optional) Cache your executed notebooks between runs - # if you have config: - # execute: - # execute_notebooks: cache - - name: cache executed notebooks - uses: actions/cache@v3 - with: - path: _build/.jupyter_cache - key: jupyter-book-cache-${{ hashFiles('requirements.txt') }} - - # Save the book's HTML contents to the _build directory - - name: Build the book - run: | - jupyter-book build lessons/ - - # Upload the book's HTML as an artifact - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: "lessons/_build/html" - - # Deploy the book's HTML to GitHub Pages - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..de0c122 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,46 @@ +# This file was created automatically with `myst init --gh-pages` 🪄 💚 + +name: MyST GitHub Pages Deploy +on: + push: + # Runs on pushes targeting the default branch + branches: [main] +env: + # `BASE_URL` determines the website is served from, including CSS & JS assets + # You may need to change this to `BASE_URL: ''` + BASE_URL: /${{ github.event.repository.name }} + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: 'pages' + cancel-in-progress: false +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v3 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install MyST Markdown + run: npm install -g mystmd + - name: Build HTML Assets + run: myst build --html + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: './_build/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore index b6bd174..7e69cf1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ # ignore all artifacts from the build process (regardless of book name): -*/_build/* +_build diff --git a/lessons/_toc.yml b/lessons/_toc.yml deleted file mode 100644 index 416b6c6..0000000 --- a/lessons/_toc.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Table of contents -# Learn more at https://jupyterbook.org/customize/toc.html - -format: jb-book -root: intro -chapters: -- file: use_licensed_works -- file: license_your_own_work -- file: license_collaborative_work diff --git a/lessons/intro.md b/lessons/intro.md index 0eb76bf..5d33793 100644 --- a/lessons/intro.md +++ b/lessons/intro.md @@ -11,7 +11,8 @@ The three lessons in this course cover essential topics related to using, licens The vignettes in this course are all fictional user stories. ``` ```` -`````{admonition} Vignette: A Research Dilemma + +```{admonition} Vignette: A Research Dilemma :class: tip Dr. Samantha Rodriguez, a graduate student in computational biology, has been working on developing new algorithms for analyzing genomic data. During her literature review, she comes across a research paper that describes a software tool that could significantly improve the performance of her analysis pipeline. @@ -27,7 +28,7 @@ However, as she digs deeper, she realizes that the code repository contains seve Samantha feels overwhelmed by the licensing complexities and is unsure about the best way to proceed. She knows that using open-source software can be incredibly beneficial for her research, but she also wants to ensure that she's complying with all legal and ethical requirements. As researchers increasingly rely on open-source tools and collaborate across institutions, understanding software licensing has become crucial. Making the wrong choices could lead to legal troubles, restrict future opportunities, or inadvertently limit the impact of one's work. -````` +``` The dilemma presented in the vignette above is an example of how you might first encounter open-source software: someone on the internet posted their code on a website... _Can you use it? Can you incorporate it into your own code? Can you modify it? Can you redistribute it? Should you credit the author?_ @@ -37,8 +38,7 @@ As you engage more with open-source software, you realize that most projects are **The lessons in this course cover: how to use licensed works; how to license your own material (code, data, other content); and how to work with others and license together. Read on!** - -`````{admonition} Why open source? +````{admonition} Why open source? ```{image} ../assets/2015_blog.png :alt: old blog :width: 400px @@ -48,18 +48,7 @@ In an October 2015 [interview](https://web.archive.org/web/20180514095134/http:/ > Free and open-source software (FOSS) is a human invention of tremendous impact. It poses an alternative to intellectual-property instruments that are limiting and want to control how a creative work is used. Open-source licenses allow people to coordinate their work freely, within the confines of copyright law, while making access and wide distribution a priority. I’ve always thought that this is fundamentally aligned with the method of science, where we value academic freedom and wide dissemination of scientific findings. ---**Lorena A. Barba** -````` - -## Table of Contents - -```{tableofcontents} -``` - -## References - -```{bibliography} -:style: alpha -``` +```` ## About @@ -67,11 +56,10 @@ The [GW Open Source Program Office](http://ospo.gwu.edu) (OSPO) supports the GW Prof. [Lorena A. Barba](https://lorenabarba.com/) is the Faculty Director of GW's OSPO. She has many years of engaging with open-source software, including as member of the Board of Directors of NumFOCUS, a nonprofit supporting open-source scientific computing tools (2014–2021); as founding editor of The Journal of Open Source Software and Associate Editor-in-Chief until 2021; and as one of the inaugural Jupyter Distinguised Contributor (2020). She is an internationally recognized expert on increasing transparency and reproducibility in research through open-source tools and practices. - ```{image} ../assets/sloan-logo-withmargin.png :alt: sloan logo :width: 200px :align: center ``` -_GW's Open Source Programs Office is generously supported by the [Alfred P. Sloan Foundation](https://sloan.org/)._ \ No newline at end of file +_GW's Open Source Programs Office is generously supported by the [Alfred P. Sloan Foundation](https://sloan.org/)._ diff --git a/myst.yml b/myst.yml new file mode 100644 index 0000000..8d92a52 --- /dev/null +++ b/myst.yml @@ -0,0 +1,27 @@ +# See docs at: https://mystmd.org/guide/frontmatter +version: 1 +project: + id: 39fd049f-095d-4abb-a63e-11a43841d7cf + title: OSS Licensing for Research and Education + author: Lorena A. Barba + license: CC-BY-4.0 + github: https://github.com/gw-ospo/oss-licensing + exports: + # There are a couple errors in this at the moment + - format: typst + template: https://github.com/rowanc1/typst-book.git + articles: + - lessons/intro.md + - lessons/use_licensed_works.md + - lessons/license_your_own_work.md + - lessons/license_collaborative_work.md + toc: + - file: lessons/intro.md + - file: lessons/use_licensed_works.md + - file: lessons/license_your_own_work.md + - file: lessons/license_collaborative_work.md +site: + template: book-theme + options: + logo: assets/gw_iddol_ospo_2c.png + hide_outline: true diff --git a/requirements.txt b/requirements.txt index 269dde1..fb187da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1 @@ - - -# https://jupyterbook.org/en/stable/start/overview.html -jupyter-book +mystmd