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 docs scaffolding #43

Merged
merged 1 commit into from
Jul 4, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
# 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.napoleon", "sphinx.ext.autodoc", "myst_parser"]

myst_enable_extensions = ["html_image"]

# Add any paths that contain templates here, relative to this directory.
# templates_path = ["_templates"]
Expand All @@ -52,3 +54,14 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ["_static"]


import os.path as osp
import shutil

HERE = osp.abspath(osp.dirname(__file__))


def setup(app):
dest = osp.join(HERE, "source", "reference", "changelog.md")
shutil.copy(osp.join(HERE, "..", "CHANGELOG.md"), dest)
5 changes: 4 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Welcome to hatch-jupyter-builder's documentation!
:maxdepth: 2
:caption: Contents:


source/background/index
source/get_started/index
source/how_to_guides/index
source/reference/index

Indices and tables
==================
Expand Down
9 changes: 9 additions & 0 deletions docs/source/background/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Background
==========
Explanation. Clarification and discussion of key topics.

.. toctree::
:maxdepth: 1
:caption: Contents:

Coming soon!
9 changes: 9 additions & 0 deletions docs/source/get_started/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Getting Started
===============
Tutorials. A hands-on introduction to Hatch Jupyter Builder for maintainers.

.. toctree::
:maxdepth: 1
:caption: Contents:

Coming soon!
9 changes: 9 additions & 0 deletions docs/source/how_to_guides/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
How-to Guides
=============
Step-by-step guides. Covers key tasks and operations and common problems

.. toctree::
:maxdepth: 1
:caption: Contents:

Coming soon!
15 changes: 15 additions & 0 deletions docs/source/reference/api_docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
API Docs
========


NPM Builder Function
--------------------
.. automodule:: hatch_jupyter_builder.utils
:noindex:
:members: npm_builder

Utility Functions
-----------------
.. automodule:: hatch_jupyter_builder.utils
:members:
:exclude-members: npm_builder
169 changes: 169 additions & 0 deletions docs/source/reference/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Changelog

<!-- <START NEW CHANGELOG ENTRY> -->

## 0.5.2

([Full Changelog](https://github.com/jupyterlab/hatch-jupyter-builder/compare/v0.5.1...979babceb148f3c6a6ff823bacfd88e94b8a0c22))

### Bugs fixed

- Preserve other build reqs [#33](https://github.com/jupyterlab/hatch-jupyter-builder/pull/33) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab/hatch-jupyter-builder/graphs/contributors?from=2022-06-20&to=2022-06-20&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Ablink1073+updated%3A2022-06-20..2022-06-20&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 0.5.1

([Full Changelog](https://github.com/jupyterlab/hatch-jupyter-builder/compare/v0.5.0...766fcddec85c1ca1d49f806539f9177feadb1f48))

### Maintenance and upkeep improvements

- [pre-commit.ci] pre-commit autoupdate [#31](https://github.com/jupyterlab/hatch-jupyter-builder/pull/31) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- Migration cleanup [#29](https://github.com/jupyterlab/hatch-jupyter-builder/pull/29) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab/hatch-jupyter-builder/graphs/contributors?from=2022-06-20&to=2022-06-20&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Ablink1073+updated%3A2022-06-20..2022-06-20&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Apre-commit-ci+updated%3A2022-06-20..2022-06-20&type=Issues)

## 0.5.0

([Full Changelog](https://github.com/jupyterlab/hatch-jupyter-builder/compare/v0.4.0...38f709fd38fce179dcdbe6da78e64fbb38a89658))

### Enhancements made

- Make npm skip explicit [#28](https://github.com/jupyterlab/hatch-jupyter-builder/pull/28) ([@blink1073](https://github.com/blink1073))
- Add a setup.py shim in migration script [#27](https://github.com/jupyterlab/hatch-jupyter-builder/pull/27) ([@blink1073](https://github.com/blink1073))
- Add migration and compare script [#21](https://github.com/jupyterlab/hatch-jupyter-builder/pull/21) ([@blink1073](https://github.com/blink1073))

### Bugs fixed

- Fix handling of skip-if-exists [#20](https://github.com/jupyterlab/hatch-jupyter-builder/pull/20) ([@blink1073](https://github.com/blink1073))

### Maintenance and upkeep improvements

- [pre-commit.ci] pre-commit autoupdate [#26](https://github.com/jupyterlab/hatch-jupyter-builder/pull/26) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- Chore: fix metadata for Source in pyproject.toml [#23](https://github.com/jupyterlab/hatch-jupyter-builder/pull/23) ([@agoose77](https://github.com/agoose77))
- [pre-commit.ci] pre-commit autoupdate [#22](https://github.com/jupyterlab/hatch-jupyter-builder/pull/22) ([@pre-commit-ci](https://github.com/pre-commit-ci))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab/hatch-jupyter-builder/graphs/contributors?from=2022-05-31&to=2022-06-20&type=c))

[@agoose77](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Aagoose77+updated%3A2022-05-31..2022-06-20&type=Issues) | [@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Ablink1073+updated%3A2022-05-31..2022-06-20&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Apre-commit-ci+updated%3A2022-05-31..2022-06-20&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Awelcome+updated%3A2022-05-31..2022-06-20&type=Issues)

## 0.4.0

([Full Changelog](https://github.com/jupyterlab/hatch_jupyter_builder/compare/v0.3.3...ab1b495716c502cb72e43cbd4e712ec40cb2e360))

### Enhancements made

- Add skip-if-exists capability [#18](https://github.com/jupyterlab/hatch_jupyter_builder/pull/18) ([@blink1073](https://github.com/blink1073))

### Maintenance and upkeep improvements

- [pre-commit.ci] pre-commit autoupdate [#17](https://github.com/jupyterlab/hatch_jupyter_builder/pull/17) ([@pre-commit-ci](https://github.com/pre-commit-ci))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab/hatch_jupyter_builder/graphs/contributors?from=2022-05-25&to=2022-05-31&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-25..2022-05-31&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch_jupyter_builder+involves%3Apre-commit-ci+updated%3A2022-05-25..2022-05-31&type=Issues)

## 0.3.3

([Full Changelog](https://github.com/jupyterlab/hatch_jupyter_builder/compare/v0.3.1...8a4f0ff37caa506dc695c20bd4ade0402bc5744f))

### Bugs fixed

- Fix handling of pre_commit hook install [#15](https://github.com/jupyterlab/hatch_jupyter_builder/pull/15) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab/hatch_jupyter_builder/graphs/contributors?from=2022-05-25&to=2022-05-25&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-25..2022-05-25&type=Issues)

## 0.3.1

([Full Changelog](https://github.com/jupyterlab/hatch_jupyter_builder/compare/v0.3.0...2427c2e4df754453f348e66da27d3079e882d497))

### Bugs fixed

- Fix logging and git checkout check [#13](https://github.com/jupyterlab/hatch_jupyter_builder/pull/13) ([@blink1073](https://github.com/blink1073))

### Maintenance and upkeep improvements

- [pre-commit.ci] pre-commit autoupdate [#12](https://github.com/jupyterlab/hatch_jupyter_builder/pull/12) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- Update project metadata [#11](https://github.com/jupyterlab/hatch_jupyter_builder/pull/11) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterlab/hatch_jupyter_builder/graphs/contributors?from=2022-05-21&to=2022-05-25&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-21..2022-05-25&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch_jupyter_builder+involves%3Apre-commit-ci+updated%3A2022-05-21..2022-05-25&type=Issues)

## 0.3.0

([Full Changelog](https://github.com/blink1073/hatch_jupyter_builder/compare/v0.2.2...3990b4e71d439753a6b237c0570a3df8f41407ed))

### Enhancements made

- Add editable build kwargs [#9](https://github.com/blink1073/hatch_jupyter_builder/pull/9) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/blink1073/hatch_jupyter_builder/graphs/contributors?from=2022-05-18&to=2022-05-21&type=c))

[@blink1073](https://github.com/search?q=repo%3Ablink1073%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-18..2022-05-21&type=Issues)

## 0.2.2

([Full Changelog](https://github.com/blink1073/hatch_jupyter_builder/compare/v0.2.0...880241f6537ecd3e1ad7fc202cb410dc8545f9fc))

### Bugs fixed

- Make the hook a bash script [#7](https://github.com/blink1073/hatch_jupyter_builder/pull/7) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/blink1073/hatch_jupyter_builder/graphs/contributors?from=2022-05-18&to=2022-05-18&type=c))

[@blink1073](https://github.com/search?q=repo%3Ablink1073%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-18..2022-05-18&type=Issues)

## 0.2.0

([Full Changelog](https://github.com/blink1073/hatch_jupyter_builder/compare/v0.1.0...a2d21ea9e635db39fd8917a3f89e1b52a7b8b15c))

### Enhancements made

- Clean up and add pre-commit option [#5](https://github.com/blink1073/hatch_jupyter_builder/pull/5) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/blink1073/hatch_jupyter_builder/graphs/contributors?from=2022-05-14&to=2022-05-18&type=c))

[@blink1073](https://github.com/search?q=repo%3Ablink1073%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-14..2022-05-18&type=Issues)

## 0.1.0

([Full Changelog](https://github.com/blink1073/hatch_jupyter_builder/compare/e5628cbc0407fa230ceea54cc12ef946cc1281e2...acf4d62bd0158d5344055eba9418c1c8e18b14a6))

### Maintenance and upkeep improvements

- Finish Initial Implementation [#3](https://github.com/blink1073/hatch_jupyter_builder/pull/3) ([@blink1073](https://github.com/blink1073))
- Add utils tests and clean up option names [#2](https://github.com/blink1073/hatch_jupyter_builder/pull/2) ([@blink1073](https://github.com/blink1073))
- More cleanup and front matter [#1](https://github.com/blink1073/hatch_jupyter_builder/pull/1) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/blink1073/hatch_jupyter_builder/graphs/contributors?from=2022-05-13&to=2022-05-14&type=c))

[@blink1073](https://github.com/search?q=repo%3Ablink1073%2Fhatch_jupyter_builder+involves%3Ablink1073+updated%3A2022-05-13..2022-05-14&type=Issues)
10 changes: 10 additions & 0 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Reference
=========
Technical reference. Covers tools, components, commands and resources.

.. toctree::
:maxdepth: 1
:caption: Contents:

api_docs
changelog
7 changes: 5 additions & 2 deletions hatch_jupyter_builder/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def npm_builder(
editable_build_cmd: Optional[str] = None,
) -> None:
"""Build function for managing an npm installation.
Note: The function is a no-op if the `--skip-npm` cli flag is used
or HATCH_JUPYTER_BUILDER_SKIP_NPM env is set.

Parameters
----------
Expand All @@ -63,6 +61,11 @@ def npm_builder(
The npm command to build assets to the build_dir when building in editable mode.
npm: str or list, optional.
The npm executable name, or a tuple of ['node', executable].

Notes
-----
The function is a no-op if the `--skip-npm` cli flag is used
or HATCH_JUPYTER_BUILDER_SKIP_NPM env is set.
"""

# Check if we are building a wheel from an sdist.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Source = "https://github.com/jupyterlab/hatch-jupyter-builder"

[project.optional-dependencies]
test = ["pytest", "pytest-mock", "pre-commit", "hatchling", "pytest-cov", "tomli", "twine"]
docs = ["pydata-sphinx-theme", "sphinx>=5.0"]
docs = ["pydata-sphinx-theme", "myst-parser"]

[project.entry-points.hatch]
jupyter = "hatch_jupyter_builder.hooks"
Expand Down