Skip to content
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
20 changes: 20 additions & 0 deletions docs/Makefile
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 = source
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)
35 changes: 35 additions & 0 deletions docs/make.bat
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=source
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
28 changes: 28 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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

project = 'airnet'
copyright = '2023-present, Oak Ridge National Laboratory, managed by UT-Battelle'
author = 'Jason W. DeGraw'
release = '1.2.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.napoleon']

templates_path = ['_templates']
exclude_patterns = []



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'pydata_sphinx_theme'
html_static_path = ['_static']
6 changes: 6 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:html_theme.sidebar_secondary.remove:

Contributing
============

To be completed.
11 changes: 11 additions & 0 deletions docs/source/developers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:html_theme.sidebar_secondary.remove:

Developers Guide
================

.. toctree::
devenv
testing
contributing
:maxdepth: 2
:caption: Contents:
49 changes: 49 additions & 0 deletions docs/source/devenv.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:html_theme.sidebar_secondary.remove:

Development Environment
=======================

.. _setup_hatch:

Hatch Environment Setup
-----------------------

To set up a development environment using hatch, first install `hatch` with pip:

.. code-block:: console

$ pip install hatch

Clone the `repository <https://github.com/building-physics/airnet-python/>`_ to the location of your choice and start up a terminal in the
root folder of the repo. Execute the following to generate an environment that has everything that is needed:

.. code-block:: console

$ hatch env create

To make sure that everything has worked, run

.. code-block:: console

$ hatch shell

to enter the environment that was created, and then execute

.. code-block:: console

$ airnetsim --help

You should see the help output from the program.

.. _vscode:

Using Visual Studio Code
------------------------

To point Visual Studio Code at the created environment, find the environment with

.. code-block:: console

$ hatch run python -c "import sys;print(sys.executable)"

and copy the result. In Visual Studio Code, hit `ctrl-shift-P` to bring up the command palette, select "Python: Select Interpreter", and paste in the result from above. Any warnings (yellow squiqqly underlines) in the source files should go away.
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. airnet documentation master file, created by
sphinx-quickstart on Thu Aug 1 21:21:42 2024.

:html_theme.sidebar_secondary.remove:

airnet documentation
====================

**airnet** is a Python library implementing a pressure network solution in the spirit of the NIST AIRNET program,
particularly with respect to the airflow elements. It is intended to operate similarly, but may not operate
exactly the same due to implementation differences.

.. toctree::
overview
user_guide
reference
developers
:maxdepth: 2
:caption: Contents:

18 changes: 18 additions & 0 deletions docs/source/input.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:html_theme.sidebar_secondary.remove:

Defining the Network
====================

.. _programmatic:

Programmatic Definition
-----------------------

To be completed.

.. _input_file:

Network Definition File
-----------------------

To be completed.
15 changes: 15 additions & 0 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:html_theme.sidebar_secondary.remove:

.. _installation:

Installation
------------

The airnet package is available for PyPi, and is installable via pip:

.. code-block:: console

$ pip install airnet

This installs the airnet package and two programs: :ref:`airnetsim <airnetsim>` and
:ref:`summarize_airnet_input <summarize_airnet_input>`.
6 changes: 6 additions & 0 deletions docs/source/overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:html_theme.sidebar_secondary.remove:

Overview
========

To be completed.
10 changes: 10 additions & 0 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:html_theme.sidebar_secondary.remove:

API Reference
=============

To be completed.

.. toctree::
:maxdepth: 2
:caption: Contents:
44 changes: 44 additions & 0 deletions docs/source/running.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
:html_theme.sidebar_secondary.remove:

Running
=======

The package provides two programs for use on :ref:`network input files <input_file>`.

.. _airnetsim:

airnetsim
---------

.. code-block:: console

$ airnetsim --help
usage: airnetsim [-h] [-v] NETWORK_FILE

Simulate airflow in an AIRNET network.

positional arguments:
NETWORK_FILE

options:
-h, --help show this help message and exit
-v, --verbose operate verbosely

.. _summarize_airnet_input:

summarize_airnet_input
----------------------

.. code-block:: console

$ summarize_airnet_input --help
usage: summarize_airnet_input [-h] [-v] NETWORK_FILE

Summarize an AIRNET network input file.

positional arguments:
NETWORK_FILE

options:
-h, --help show this help message and exit
-v, --verbose operate verbosely
18 changes: 18 additions & 0 deletions docs/source/testing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:html_theme.sidebar_secondary.remove:

Testing
=======

.. _unit_tests:

Unit Tests
----------

To be completed.

.. _regression_tests:

Regression Tests
----------------

To be completed.
13 changes: 13 additions & 0 deletions docs/source/user_guide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:html_theme.sidebar_secondary.remove:

User Guide
==========

The airnet package provides a Python library and two programs for working with pressure network models.

.. toctree::
install
running
input
:maxdepth: 2
:caption: Contents:
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ path = "src/airnet/__about__.py"
dependencies = [
"pytest",
"pytest-cov",
"sphinx",
"pydata-sphinx-theme"
]
[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/airnet --cov=tests {args}"
Expand Down
2 changes: 1 addition & 1 deletion src/airnet/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-present Oak Ridge National Laboratory, managed by UT-Battelle
#
# SPDX-License-Identifier: BSD-3-Clause
__version__ = '1.1.0'
__version__ = '1.2.0'