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

Create doc files for h5pyd #248

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b15cc0a
doc updates
jreadey Dec 27, 2024
961d874
fix file cloning
jreadey Dec 31, 2024
3913b73
fix flake8 errors
jreadey Dec 31, 2024
daa41b4
updated index
jreadey Dec 31, 2024
f4da456
support file attributes when cloning
jreadey Dec 31, 2024
ff57151
added docs for File
jreadey Jan 2, 2025
fb70d1e
Merge branch 'master' into rtd
jreadey Jan 3, 2025
9ae650e
update to File docs
jreadey Jan 6, 2025
272ab38
update for group docs
jreadey Jan 6, 2025
f7b0f8a
speed up test_file test
jreadey Jan 7, 2025
d70f634
fix flake8 error
jreadey Jan 7, 2025
b06a242
fix flake8 error
jreadey Jan 7, 2025
fda4def
updated group doc
jreadey Jan 7, 2025
64d5a4d
sort links client side
jreadey Jan 9, 2025
c1bc51b
fix test for h5py compat
jreadey Jan 9, 2025
4bb9f4c
first pass at objdb class
jreadey Jan 20, 2025
bd2a54b
added closed_group test
jreadey Jan 21, 2025
dd3fe0a
cleaned up debug print statements
jreadey Jan 21, 2025
62ecf1d
more cleanup
jreadey Jan 21, 2025
6f45089
add weakref for closed objs
jreadey Jan 21, 2025
712bcdb
updates for folders and dimscales
jreadey Jan 22, 2025
1763015
reorganize lowlevel and highlevel files
jreadey Jan 23, 2025
1c48eaf
update for dimsacale support
jreadey Jan 24, 2025
ea5a3cb
fix for objectid import
jreadey Jan 24, 2025
2a06a0d
added config get method
jreadey Jan 24, 2025
0e0a7b6
Merge branch 'master' into rtd
jreadey Jan 25, 2025
6c9fe24
no PUT on close by default
jreadey Jan 25, 2025
1981d94
added ACLs class
jreadey Jan 26, 2025
4549ab1
update comments for ACL class
jreadey Jan 26, 2025
b42b559
added limits to objdb
jreadey Jan 27, 2025
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variables are needed to be defined:
To use "local" mode with S3, define these variables:

* ``AWS_S3_GATEWAY`` - AWS S3 endpoint, e.g.: ``https://s3.us-west-2.amazonaws.com``
* ``AWS_REGION`` - Region where the Lambda function is installed, e.g.: ``us-west-2``
* ``AWS_REGION`` - Region where the S3 bucket is located, e.g.: ``us-west-2``
* ``AWS_SECRET_ACCESS_KEY`` - Your AWS secret access AWS_SECRET_ACCESS_KEY
* ``AWS_ACCESS_KEY_ID`` - Your AWS access key ID

Expand Down
12 changes: 8 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS = -W
Expand Down Expand Up @@ -84,17 +85,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/h5py.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/h5pyd.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/h5py.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/h5pyd.qhc"

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/h5py"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/h5py"
@echo "# mkdir -p $$HOME/.local/share/devhelp/h5pyd"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/h5pyd"
@echo "# devhelp"

epub:
Expand Down Expand Up @@ -174,3 +175,6 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

show:
@python -m webbrowser -t "file://$(shell pwd)/_build/html/index.html"
106 changes: 99 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# -*- coding: utf-8 -*-
#
# h5pyd documentation build configuration file,
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
from importlib import metadata

# 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
Expand All @@ -21,12 +33,13 @@
'sphinx.ext.mathjax',
]

# intersphinx_mapping = {'low': ('https://api.h5py.org', None)}
intersphinx_mapping = {'low': ('https://api.h5py.org', None)}

extlinks = {
'issue': ('https://github.com/HDFGroup/h5pyd/issues/%s', 'GH'),
'pr': ('https://github.com/HDFGroup/h5pyd/pulls/%s', 'PR '),
'issue': ('https://github.com/h5py/h5pyd/issues/%s', 'GH%s'),
'pr': ('https://github.com/h5py/h5pyd/pull/%s', 'PR %s'),
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -41,14 +54,14 @@

# General information about the project.
project = 'h5pyd'
copyright = '2014 The HDF Group'
copyright = '2017, The HDF Group'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = metadata.version('h5pyd')
release = '0.20.0'
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

Expand Down Expand Up @@ -95,7 +108,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'furo'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -174,3 +187,82 @@

# Output file base name for HTML help builder.
htmlhelp_basename = 'h5pyddoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'h5pyd.tex', 'h5pyd Documentation',
'The HDF Group', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False

# If true, show page references after internal links.
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
# latex_appendices = []

# If false, no module index is generated.
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'h5pyd', 'h5pyd Documentation',
['The HDF Group'], 1)
]

# If true, show URL addresses after external links.
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'h5pyd', 'h5pyd Documentation',
'The HDF Group', 'h5pyd', 'One line description of project.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
# texinfo_appendices = []

# If false, no module index is generated.
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
47 changes: 0 additions & 47 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,3 @@ attributes:
particular container by specifying ``track_order`` argument to
:class:`h5py.File`, :meth:`h5py.Group.create_group`,
:meth:`h5py.Group.create_dataset`. The default is ``False``.


IPython
-------

H5py ships with a custom ipython completer, which provides object introspection
and tab completion for h5py objects in an ipython session. For example, if a
file contains 3 groups, "foo", "bar", and "baz"::

In [4]: f['b<TAB>
bar baz

In [4]: f['f<TAB>
# Completes to:
In [4]: f['foo'

In [4]: f['foo'].<TAB>
f['foo'].attrs f['foo'].items f['foo'].ref
f['foo'].copy f['foo'].iteritems f['foo'].require_dataset
f['foo'].create_dataset f['foo'].iterkeys f['foo'].require_group
f['foo'].create_group f['foo'].itervalues f['foo'].values
f['foo'].file f['foo'].keys f['foo'].visit
f['foo'].get f['foo'].name f['foo'].visititems
f['foo'].id f['foo'].parent

The easiest way to enable the custom completer is to do the following in an
IPython session::

In [1]: import h5py

In [2]: h5py.enable_ipython_completer()

It is also possible to configure IPython to enable the completer every time you
start a new session. For >=ipython-0.11, "h5py.ipy_completer" just needs to be
added to the list of extensions in your ipython config file, for example
:file:`~/.config/ipython/profile_default/ipython_config.py` (if this file does
not exist, you can create it by invoking `ipython profile create`)::

c = get_config()
c.InteractiveShellApp.extensions = ['h5py.ipy_completer']

For <ipython-0.11, the completer can be enabled by adding the following lines
to the :func:`main` in :file:`.ipython/ipy_user_conf.py`::

def main():
ip.ex('from h5py import ipy_completer')
ip.ex('ipy_completer.load_ipython_extension()')
18 changes: 12 additions & 6 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ family Multi-file driver
mpio Parallel HDF5 file access
=================================== =========================================== ============================

.. _h5py_pytable_cmp:

What's the difference between h5py and PyTables?
------------------------------------------------
Expand Down Expand Up @@ -202,15 +203,20 @@ To build from a Git checkout:

Clone the project::

$ git clone https://github.com/HDFGroup/h5pyd.git
$ cd h5pyd
$ git clone https://github.com/h5py/h5py.git
$ cd h5py

Build and install the project::
(Optional) Choose which branch to build from (e.g. a stable branch)::

$ pip install .
$ git checkout 2.1

Build the project. If given, /path/to/hdf5 should point to a directory
containing a compiled, shared-library build of HDF5 (containing things like "include" and "lib")::

$ python setup.py build [--hdf5=/path/to/hdf5]

(Optional) Run the unit tests::

$ python testall.py
$ python setup.py test

Report any failing tests by filing a bug report at GitHub.
Report any failing tests to the mailing list (h5py at googlegroups), or by filing a bug report at GitHub.
11 changes: 11 additions & 0 deletions docs/high/attr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ dictionaries.
The default ``track_order`` for all new groups and datasets can be
specified globally with ``h5.get_config().track_order``.

Large attributes
----------------

HDF5 allows attributes to be larger than 64 KiB, but these need to be stored in
a different way. As of March 2024, the way HDF5 documentation suggests you
configure this does not work. Instead, enable order tracking when creating the
object you want to attach attributes to::

grp = f.create_group('g', track_order=True)
grp.attrs['large'] = np.arange(1_000_000, dtype=np.uint32)


Reference
---------
Expand Down
Loading
Loading