-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from trigaten/docs_site
Docs site
- Loading branch information
Showing
11 changed files
with
256 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: [main, docs_site] | ||
|
||
jobs: | ||
docs: | ||
name: Generate Website | ||
runs-on: ubuntu-latest | ||
env: | ||
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements.txt && git clone https://github.com/trigaten/Prompt_Systematic_Review.git | ||
|
||
- name: Build | ||
run: sphinx-build -b dirhtml -v docs/ build | ||
|
||
- name: Upload to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build/ | ||
|
||
permissions: | ||
contents: write |
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,2 +1,5 @@ | ||
__pycache__ | ||
*.egg-info/ | ||
_build | ||
.DS_Store | ||
build/ | ||
*.egg-info/ |
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,24 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
github: | ||
@make html | ||
@cp -a build/html/. ./docs | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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,33 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
import renku_sphinx_theme | ||
|
||
project = "Prompt Systematic Review" | ||
copyright = "2023, Schulhoff et al." | ||
author = "Schulhoff et al." | ||
release = "0.0.1" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"renku_sphinx_theme", | ||
] | ||
|
||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
|
||
html_theme = "renku" | ||
html_static_path = ["_static"] |
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,41 @@ | ||
========================= | ||
How to Research | ||
========================= | ||
|
||
It can be difficult to know where to start researching a topic, especially as an undergrad with little or no experience. | ||
I had to figure this out a few years, so let me save you some time :) | ||
|
||
|
||
The Beginning | ||
========================= | ||
|
||
At the beginning of the research process, you want to go broad in your subject. For example, if you are researching Gen AI Security, | ||
you might look up "Generative AI Security review" (or overview), "Generative AI Security survey", and similar terms. If you can find | ||
a review paper, great, read it. If not, start with the most relevant paper, read the abstract/conclusion, then jump to *related work*. | ||
Most papers have a related work section; it discusses papers related to that one in the field. | ||
|
||
Use **Google Scholar**/ArXiv/Semantic Scholar | ||
|
||
|
||
How to Read a Paper | ||
========================= | ||
If you need to understand a technique proposed by a paper (rather than just learn broadly about the field), do this: | ||
|
||
I am using the Chain of thought paper as an example: https://arxiv.org/pdf/2201.11903.pdf | ||
|
||
- Read the abstract+conclusion | ||
- Read the description of the proposed method/analysis | ||
- Look at any images (usually exclude graphs) | ||
- Skip related work | ||
- Skip experimental setup | ||
- Skip ablations | ||
- Read the conclusion, and perhaps some discussion | ||
|
||
You will usually only want to read the sections I said to skip if you *really* need to understand the technique (for example, if you are comparing it to other techniques). | ||
|
||
How to keep track of information | ||
================================================== | ||
|
||
Do whatever your project lead suggests. The way I keep track of info is by adding the citation to the Overleaf | ||
bibliography file (read the on Overleaf), then writing comments above it as my notes. I try to just started writing in the regular tex | ||
file as soon as I get a decent understanding of the field. |
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,37 @@ | ||
.. Prompt Systematic Review documentation master file, created by | ||
sphinx-quickstart on Thu Nov 2 15:25:04 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Documentation for the Systematic Prompt Review Project | ||
==================================================== | ||
|
||
This website contains all the information you need to understand the research process for this project. The first three sections | ||
are about how to do research and use LaTeX/Github. The fourth section is an autogenerated API reference for our codebase. | ||
Make sure to write Sphinx-style docstrings (look this up). | ||
|
||
Quick Info: | ||
|
||
- Github: https://github.com/trigaten/Prompt_Systematic_Review | ||
- Overleaf: DM Sander or sub-team leader | ||
- The plan document: check announcements in slack | ||
- Main contact: [email protected] | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
how_to_research | ||
using_latex | ||
using_github | ||
prompt_systematic_review | ||
|
||
|
||
|
||
.. Indices and tables | ||
.. ================== | ||
.. * :ref:`genindex` | ||
.. * :ref:`modindex` | ||
.. * :ref:`search` |
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,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=. | ||
set BUILDDIR=_build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
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,12 @@ | ||
prompt_systematic_review | ||
======== | ||
|
||
.. automodule:: prompt_systematic_review.arxiv_source | ||
:members: | ||
|
||
|
||
.. automodule:: prompt_systematic_review.paperSource | ||
:members: | ||
|
||
.. automodule:: prompt_systematic_review.utils | ||
:members: |
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,22 @@ | ||
========================= | ||
Using Git/Github | ||
========================= | ||
|
||
Git and Github are important tools for collaborative coding projects. Here's a basic guide: | ||
|
||
1. **Git Basics**: Git is a version control system that helps you track changes in your code. You need to have Git installed on your computer. Learn a few commands like `git clone` (to get a copy of the project), `git pull` (to get the latest changes), `git push` (to share your changes), and `git commit` (to save your work). | ||
|
||
2. **Github**: Github is a platform where we store our code, which is based on Git. | ||
|
||
3. **Cloning a Repository**: To start working on a project, use `git clone https://github.com/trigaten/Prompt_Systematic_Review.git` to bring the project to your computer. | ||
|
||
4. **Branches and Pull Requests**: When you want to change something in the project, create a "branch." It's like creating a separate workspace for your ideas. After you're done, you can ask others to review your work by making a "pull request." It's like getting feedback from others before your changes become part of the main project. | ||
|
||
5. **Commit Messages**: When you make changes, write clear and simple messages about what you did. Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
|
||
If you have any questions, feel free to ask me or your sub-team leader. | ||
|
||
For more help, you can check out the Github Help website: [Github Quickstart](https://docs.github.com/en/get-started/quickstart/hello-world). | ||
|
||
Note that our Github repo has a CI pipeline, which automatically runs tests, style checks, and more when you request you merge new code. | ||
This helps ensure that broken code does not get merged in. |
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,16 @@ | ||
========================= | ||
Using LaTeX | ||
========================= | ||
|
||
LaTeX is a typesetting language commonly used for creating documents with complex formatting, such as research papers | ||
and scientific articles. For our collaborative document editing, we will be using Overleaf, an online LaTeX editor that | ||
allows multiple people to work on a document simultaneously. If you need access to the LaTeX repository for our project, | ||
please don't hesitate to reach out to me or your sub team lead. | ||
|
||
Here are some basic formatting tips with LaTeX: | ||
|
||
1. **Section Headings**: You can create section headings using LaTeX by starting a line with a series of `#` symbols. The number of `#` symbols determines the section level. For example, `#` is a top-level section, `##` is a subsection, and so on. | ||
|
||
2. **Italics and Bold**: To make text italic, you can use `\textit{}` and to make text bold, you can use `\textbf{}`. For example, `\textit{italic text}` and `\textbf{bold text}`. | ||
|
||
Learn more here: [Link to LaTeX Documentation](https://www.overleaf.com/learn) |
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 |
---|---|---|
|
@@ -7,4 +7,7 @@ huggingface_hub | |
pytest | ||
jellyfish | ||
black | ||
sphinx | ||
renku-sphinx-theme | ||
sphinx-autobuild | ||
-e . |