-
Notifications
You must be signed in to change notification settings - Fork 5
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 #14 from IvanChernyshov/dev
First stable version 1.0.0
- Loading branch information
Showing
34 changed files
with
5,249 additions
and
1,639 deletions.
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: documentation | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install pandoc | ||
pip install -r ./docs/requirements.txt | ||
- name: Sphinx build | ||
run: | | ||
cd ./docs/ | ||
make html | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html | ||
force_orphan: true\ |
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
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
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,20 @@ | ||
# 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 | ||
|
||
# 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,75 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
import sys, os | ||
sys.path.insert(0, os.path.abspath('../')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'NistChemPy' | ||
copyright = '2023, Ivan Yu. Chernyshov' | ||
author = 'Ivan Yu. Chernyshov' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '0.3.0' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.napoleon', | ||
'nbsphinx', | ||
#'sphinx_gallery.load_style', | ||
#'myst_parser' | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
#templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ['_build', '**.ipynb_checkpoints'] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'sphinx_rtd_theme' | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# 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'] | ||
|
||
# -- Logo ---------------------------------------------------------- | ||
|
||
#html_theme_options = { | ||
# 'logo_only': False, | ||
#} | ||
#html_logo = 'source/images/mace_favicon.png' | ||
#html_favicon = 'source/images/mace_favicon.png' | ||
|
||
|
||
# -- Options for exts ---------------------------------------------- | ||
|
||
# myst-nb | ||
nb_execution_mode = "off" | ||
#nb_execution_cache_path = "source/cache" | ||
|
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,74 @@ | ||
========================================== | ||
Welcome to the NistChemPy's documentation! | ||
========================================== | ||
|
||
.. toctree:: | ||
:hidden: | ||
:maxdepth: 2 | ||
:caption: Cookbook: | ||
|
||
Basic Search <source/basic_search.ipynb> | ||
Compound Properties <source/compound_properties.ipynb> | ||
Advanced Search <source/advanced_search.ipynb> | ||
|
||
|
||
.. toctree:: | ||
:hidden: | ||
:maxdepth: 1 | ||
:caption: Package details: | ||
|
||
Package API <source/api> | ||
Changelog <source/changelog> | ||
|
||
|
||
**NistChemPy** is an unofficial API for the `NIST Chemistry WebBook`_. | ||
This package not only automates the search and data extraction processes but also bypasses the WebBook's limitation of 400 compounds per search. | ||
Currently, NistChemPy enables the extraction of basic compound properties as well as IR, THz, MS, and UV-Vis spectra. | ||
Additional properties are available via URLs that link to their respective web pages, with potential support for direct extraction in future updates. | ||
|
||
|
||
Installation | ||
============ | ||
|
||
**NistChemPy** can be installed as a `PyPI package`_: | ||
|
||
.. code-block:: | ||
> pip install nistchempy | ||
Requirements | ||
============ | ||
|
||
1. Python 3.7+; | ||
|
||
2. requests; | ||
|
||
3. bs4; | ||
|
||
4. pandas; | ||
|
||
5. importlib_resources (for Python 3.7 and 3.8). | ||
|
||
|
||
Useful links | ||
============ | ||
|
||
1. `NIST Chemistry WebBook`_: webapp accessing the NIST Chemistry WebBook database. | ||
2. `GitHub`_: GitHub page of the package. | ||
3. `PyPI package`_: PyPI page of the package. | ||
4. `Update tools`_: script for semi-automatic update of structural information of new NIST Chemistry WebBook compounds. | ||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`search` | ||
|
||
|
||
|
||
.. _NIST Chemistry WebBook: https://webbook.nist.gov/chemistry/ | ||
.. _GitHub: https://github.com/IvanChernyshov/NistChemPy | ||
.. _PyPI package: https://pypi.org/project/nistchempy/ | ||
.. _Update tools: https://github.com/IvanChernyshov/NistChemPy/tree/main/update |
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 | ||
|
||
if "%1" == "" goto help | ||
|
||
%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.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%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,13 @@ | ||
# nistchempy | ||
requests | ||
pandas | ||
bs4 | ||
importlib_resources ; python_version < '3.9' | ||
|
||
# docs | ||
sphinx | ||
sphinx_gallery | ||
sphinx-rtd-theme | ||
notebook | ||
pandoc | ||
nbsphinx |
Oops, something went wrong.