Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sphinx-argparse documentation #457

Merged
merged 14 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Sphinx
on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
sphinx:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
architecture: "x64"
cache: "pip"
- name: Build Documentation
run: |
pip install -e .[docs]
pip install -r docs/requirements.txt # redundant?
cd docs
make html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: 'docs/build/html'

pages:

runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [sphinx]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
docs/build/

# PyBuilder
target/
Expand Down
6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# docs
furo
sphinx
sphinx-argparse
myst-parser
mdit-py-plugins>=0.3.0
9 changes: 9 additions & 0 deletions docs/source/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Command Line
============

```{eval-rst}
.. argparse::
:module: grayskull.main
:func: init_parser
:prog: grayskull
```
6 changes: 5 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = [
"sphinx.ext.autodoc",
"sphinxarg.ext",
"myst_parser",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
7 changes: 7 additions & 0 deletions docs/source/developer_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Developer Guide

The Grayskull project is under active development.

We courage community members to contribute to this development.

The Grayskull source code can be found [on GitHub](https://github.com/conda/grayskull/tree/main/grayskull).
6 changes: 0 additions & 6 deletions docs/source/developer_guide.rst

This file was deleted.

39 changes: 39 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
% Grayskull documentation master file, created by
% sphinx-quickstart on Tue Feb 15 20:08:45 2022.
% You can adapt this file completely to your liking, but it should at least
% contain the root `toctree` directive.

# Grayskull Documentation

**Grayskull**

is an automatic conda recipe generator.

The main goal of this project is to generate concise recipes for [conda-forge](https://github.com/conda-forge).

Presently Grayskull can generate recipes for Python packages available on PyPI and also those not published on PyPI but available as GitHub repositories.
Grayskull can also generate recipes for R packages published on CRAN.

Future versions of Grayskull will support recipe generation for packages of other repositories such as Conan, CPAN etc..

Check out the {doc}`user_guide` section for further information, including how
to {ref}`install <installation>` Grayskull.

```{toctree}
:caption: 'Contents:'
:maxdepth: 1

user_guide
cli
developer_guide
```

```{note}
This project is under active development.
```

# Indices and tables

- {ref}`genindex`
- {ref}`modindex`
- {ref}`search`
36 changes: 0 additions & 36 deletions docs/source/index.rst

This file was deleted.

25 changes: 25 additions & 0 deletions docs/source/user_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# User Guide

(installation)=

## Installation

Grayskull can be installed with `pip`:

```
pip install grayskull
```

or with `conda`, using the `conda-forge` channel:

```
conda install -c conda-forge grayskull
```

It is also possible to clone the Grayskull repository and install it using `pip`:

```
git clone https://github.com/conda/grayskull.git
cd grayskull
pip install -e .
```
30 changes: 0 additions & 30 deletions docs/source/user_guide.rst

This file was deleted.

Loading