From 5bde724f19c181165e285bd4943981ed88b7abd7 Mon Sep 17 00:00:00 2001
From: Rambaud Pierrick <12rambau@users.noreply.github.com>
Date: Wed, 2 Oct 2024 11:07:01 +0000
Subject: [PATCH 1/3] clean implementation of a nox based compilation of the
documentation
---
.readthedocs.yaml | 5 +-
.../xee.EarthEngineBackendArray.rst | 30 ++++++++++++
.../xee.EarthEngineBackendEntrypoint.rst | 34 ++++++++++++++
docs/_autosummary/xee.EarthEngineStore.rst | 47 +++++++++++++++++++
docs/_autosummary/xee.geometry_to_bounds.rst | 6 +++
docs/conf.py | 2 +-
docs/requirements.txt | 10 ----
noxfile.py | 13 +++++
pyproject.toml | 5 ++
9 files changed, 138 insertions(+), 14 deletions(-)
create mode 100644 docs/_autosummary/xee.EarthEngineBackendArray.rst
create mode 100644 docs/_autosummary/xee.EarthEngineBackendEntrypoint.rst
create mode 100644 docs/_autosummary/xee.EarthEngineStore.rst
create mode 100644 docs/_autosummary/xee.geometry_to_bounds.rst
delete mode 100644 docs/requirements.txt
create mode 100644 noxfile.py
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index 7fb3118..df8f7e3 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -10,13 +10,12 @@ build:
tools:
python: "3.10"
-# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
-# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
- - requirements: docs/requirements.txt
\ No newline at end of file
+ extra_requirements:
+ - docs
\ No newline at end of file
diff --git a/docs/_autosummary/xee.EarthEngineBackendArray.rst b/docs/_autosummary/xee.EarthEngineBackendArray.rst
new file mode 100644
index 0000000..7ce65b9
--- /dev/null
+++ b/docs/_autosummary/xee.EarthEngineBackendArray.rst
@@ -0,0 +1,30 @@
+xee.EarthEngineBackendArray
+===========================
+
+.. currentmodule:: xee
+
+.. autoclass:: EarthEngineBackendArray
+
+
+ .. automethod:: __init__
+
+
+ .. rubric:: Methods
+
+ .. autosummary::
+
+ ~EarthEngineBackendArray.__init__
+ ~EarthEngineBackendArray.get_duck_array
+
+
+
+
+
+ .. rubric:: Attributes
+
+ .. autosummary::
+
+ ~EarthEngineBackendArray.ndim
+ ~EarthEngineBackendArray.size
+
+
\ No newline at end of file
diff --git a/docs/_autosummary/xee.EarthEngineBackendEntrypoint.rst b/docs/_autosummary/xee.EarthEngineBackendEntrypoint.rst
new file mode 100644
index 0000000..5796a08
--- /dev/null
+++ b/docs/_autosummary/xee.EarthEngineBackendEntrypoint.rst
@@ -0,0 +1,34 @@
+xee.EarthEngineBackendEntrypoint
+================================
+
+.. currentmodule:: xee
+
+.. autoclass:: EarthEngineBackendEntrypoint
+
+
+ .. automethod:: __init__
+
+
+ .. rubric:: Methods
+
+ .. autosummary::
+
+ ~EarthEngineBackendEntrypoint.__init__
+ ~EarthEngineBackendEntrypoint.guess_can_open
+ ~EarthEngineBackendEntrypoint.open_dataset
+ ~EarthEngineBackendEntrypoint.open_datatree
+ ~EarthEngineBackendEntrypoint.open_groups_as_dict
+
+
+
+
+
+ .. rubric:: Attributes
+
+ .. autosummary::
+
+ ~EarthEngineBackendEntrypoint.description
+ ~EarthEngineBackendEntrypoint.open_dataset_parameters
+ ~EarthEngineBackendEntrypoint.url
+
+
\ No newline at end of file
diff --git a/docs/_autosummary/xee.EarthEngineStore.rst b/docs/_autosummary/xee.EarthEngineStore.rst
new file mode 100644
index 0000000..b4a3840
--- /dev/null
+++ b/docs/_autosummary/xee.EarthEngineStore.rst
@@ -0,0 +1,47 @@
+xee.EarthEngineStore
+====================
+
+.. currentmodule:: xee
+
+.. autoclass:: EarthEngineStore
+
+
+ .. automethod:: __init__
+
+
+ .. rubric:: Methods
+
+ .. autosummary::
+
+ ~EarthEngineStore.__init__
+ ~EarthEngineStore.close
+ ~EarthEngineStore.get_attrs
+ ~EarthEngineStore.get_dimensions
+ ~EarthEngineStore.get_encoding
+ ~EarthEngineStore.get_variables
+ ~EarthEngineStore.image_to_array
+ ~EarthEngineStore.load
+ ~EarthEngineStore.open
+ ~EarthEngineStore.open_store_variable
+ ~EarthEngineStore.project
+ ~EarthEngineStore.transform
+
+
+
+
+
+ .. rubric:: Attributes
+
+ .. autosummary::
+
+ ~EarthEngineStore.ATTRS_VALID_TYPES
+ ~EarthEngineStore.DEFAULT_MASK_VALUE
+ ~EarthEngineStore.DIMENSION_NAMES
+ ~EarthEngineStore.GETITEM_KWARGS
+ ~EarthEngineStore.PREFERRED_CHUNKS
+ ~EarthEngineStore.SCALE_UNITS
+ ~EarthEngineStore.get_info
+ ~EarthEngineStore.image_collection_properties
+ ~EarthEngineStore.image_ids
+
+
\ No newline at end of file
diff --git a/docs/_autosummary/xee.geometry_to_bounds.rst b/docs/_autosummary/xee.geometry_to_bounds.rst
new file mode 100644
index 0000000..03e0c89
--- /dev/null
+++ b/docs/_autosummary/xee.geometry_to_bounds.rst
@@ -0,0 +1,6 @@
+xee.geometry\_to\_bounds
+========================
+
+.. currentmodule:: xee
+
+.. autofunction:: geometry_to_bounds
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index 880c5f5..6934c7d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -43,7 +43,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
- 'myst_nb',
+ "myst_parser",
]
# Add any paths that contain templates here, relative to this directory.
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644
index 562a9df..0000000
--- a/docs/requirements.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-# doc requirements
-Jinja2==3.1.3
-myst-nb==0.17.2
-myst-parser==0.18.1
-sphinx_rtd_theme==1.2.1
-sphinx==5.3.0
-scipy==1.10.1
-
-# xee requirements
-xee[examples] @ git+https://github.com/google/xee.git
\ No newline at end of file
diff --git a/noxfile.py b/noxfile.py
new file mode 100644
index 0000000..912dd27
--- /dev/null
+++ b/noxfile.py
@@ -0,0 +1,13 @@
+"""All the process that can be run using nox.
+
+The nox run are build in isolated environment that will be stored in .nox. to force the venv update, remove the .nox/xxx folder.
+"""
+
+import nox
+
+@nox.session(reuse_venv=True)
+def docs(session: nox.session):
+ """Build the documentation."""
+ build = session.posargs.pop() if session.posargs else "html"
+ session.install(".[docs]")
+ session.run("sphinx-build", "-v", "-b", build, "docs", f"docs/_build/{build}")
diff --git a/pyproject.toml b/pyproject.toml
index a47a897..3bec00b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -50,6 +50,11 @@ dataflow = [
examples = [
"xee[dataflow]",
]
+docs = [
+ "myst-parser",
+ "sphinx_rtd_theme",
+ "sphinx",
+]
[project.urls]
Homepage = "https://github.com/google/xee"
From 6c5a416a4067036363d7dbf966da4411609d12d9 Mon Sep 17 00:00:00 2001
From: Rambaud Pierrick <12rambau@users.noreply.github.com>
Date: Wed, 2 Oct 2024 11:27:22 +0000
Subject: [PATCH 2/3] refactor: modern sphinx implementation
---
README.md | 2 +-
docs/Makefile | 20 -------
docs/{ => _static}/xee-logo.png | Bin
docs/conf.py | 95 ++++++++++----------------------
docs/make.bat | 35 ------------
5 files changed, 29 insertions(+), 123 deletions(-)
delete mode 100644 docs/Makefile
rename docs/{ => _static}/xee-logo.png (100%)
delete mode 100644 docs/make.bat
diff --git a/README.md b/README.md
index 848a1c1..53c195b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Xee: Xarray + Google Earth Engine
-
+
_An Xarray extension for Google Earth Engine._
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644
index d4bb2cb..0000000
--- a/docs/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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)
diff --git a/docs/xee-logo.png b/docs/_static/xee-logo.png
similarity index 100%
rename from docs/xee-logo.png
rename to docs/_static/xee-logo.png
diff --git a/docs/conf.py b/docs/conf.py
index 6934c7d..6fcef29 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,83 +1,44 @@
-# 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
+"""Configuration file for the Sphinx documentation builder.
-# -- 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 os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
-
-# Print Python environment info for easier debugging on ReadTheDocs
+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 ----------------------------------------------------------------
import subprocess
import sys
-import xee # verify this works
-
-print('python exec:', sys.executable)
-print('sys.path:', sys.path)
-print('pip environment:')
-subprocess.run([sys.executable, '-m', 'pip', 'list']) # pylint: disable=subprocess-run-check
-
-print(f'xee: {xee.__file__}')
-
-# -- Project information -----------------------------------------------------
-
-project = 'Xee'
-copyright = '2023, Google LCC' # pylint: disable=redefined-builtin
-author = 'The Xee authors'
-
+import xee
-# -- General configuration ---------------------------------------------------
+# -- Project information -------------------------------------------------------
+project = "Xee"
+copyright = "2023, Google LCC"
+author = "The Xee authors"
+# wait for https://github.com/google/Xee/pull/162
+# release = xee.__version__
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
+# -- General configuration -----------------------------------------------------
extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.autosummary',
- 'sphinx.ext.napoleon',
+ "sphinx.ext.autodoc",
+ "sphinx.ext.autosummary",
+ "sphinx.ext.napoleon",
+ "sphinx.ext.intersphinx",
"myst_parser",
]
+templates_path = ["_templates"]
+exclude_patterns = ["_build", "_templates", "Thumbs.db", ".DS_Store"]
-# 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', '_templates', 'Thumbs.db', '.DS_Store']
-
+# -- Options for intersphinx output --------------------------------------------
intersphinx_mapping = {
- 'xarray': ('https://xarray.pydata.org/en/latest/', None),
+ "xarray": ("https://xarray.pydata.org/en/latest/", None),
}
# -- Options for HTML output -------------------------------------------------
+html_theme = "sphinx_rtd_theme"
+html_static_path = ["_static"]
+html_logo = "_static/xee-logo.png"
+html_favicon = "_static/xee-logo.png"
-# 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']
-
-# -- Extension config
-
+# -- Options for autosummary/autodoc output ------------------------------------
autosummary_generate = True
-
-# https://myst-nb.readthedocs.io/en/latest/use/execute.html
-jupyter_execute_notebooks = 'cache'
-# https://myst-nb.readthedocs.io/en/latest/use/formatting_outputs.html#removing-stdout-and-stderr
-nb_output_stderr = 'remove-warn'
-
-# https://stackoverflow.com/a/66295922/809705
-autodoc_typehints = 'description'
+autodoc_typehints = "description"
diff --git a/docs/make.bat b/docs/make.bat
deleted file mode 100644
index 2119f51..0000000
--- a/docs/make.bat
+++ /dev/null
@@ -1,35 +0,0 @@
-@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
From a48e2be9c471ec9aab4a5480c42f976149eddcd3 Mon Sep 17 00:00:00 2001
From: Rambaud Pierrick <12rambau@users.noreply.github.com>
Date: Wed, 2 Oct 2024 11:39:51 +0000
Subject: [PATCH 3/3] move the repository community file to root
---
CODE_OF_CONDUCT.md | 93 ++++++++++++++++++++++++++++++++++++++++
CONTRIBUTING.md | 32 ++++++++++++++
docs/code-of-conduct.md | 95 +----------------------------------------
docs/contributing.md | 34 +--------------
4 files changed, 129 insertions(+), 125 deletions(-)
create mode 100644 CODE_OF_CONDUCT.md
create mode 100644 CONTRIBUTING.md
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..c8d68a2
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,93 @@
+# Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of
+experience, education, socio-economic status, nationality, personal appearance,
+race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, or to ban temporarily or permanently any
+contributor for other behaviors that they deem inappropriate, threatening,
+offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+This Code of Conduct also applies outside the project spaces when the Project
+Steward has a reasonable belief that an individual's behavior may have a
+negative impact on the project or its community.
+
+## Conflict Resolution
+
+We do not believe that all conflict is bad; healthy debate and disagreement
+often yield positive results. However, it is never okay to be disrespectful or
+to engage in behavior that violates the project’s code of conduct.
+
+If you see someone violating the code of conduct, you are encouraged to address
+the behavior directly with those involved. Many issues can be resolved quickly
+and easily, and this gives people more control over the outcome of their
+dispute. If you are unable to resolve the matter for any reason, or if the
+behavior is threatening or harassing, report it. We are dedicated to providing
+an environment where participants feel welcome and safe.
+
+Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
+Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
+receive and address reported violations of the code of conduct. They will then
+work with a committee consisting of representatives from the Open Source
+Programs Office and the Google Open Source Strategy team. If for any reason you
+are uncomfortable reaching out to the Project Steward, please email
+opensource@google.com.
+
+We will investigate every complaint, but you may not receive a direct response.
+We will use our discretion in determining when and how to follow up on reported
+incidents, which may range from not taking action to permanent expulsion from
+the project and project-sponsored spaces. We will notify the accused of the
+report and provide them an opportunity to discuss it before any action is taken.
+The identity of the reporter will be omitted from the details of the report
+supplied to the accused. In potentially harmful situations, such as ongoing
+harassment or threats to anyone's safety, we may take action without notice.
+
+## Attribution
+
+This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
+available at
+https://www.contributor-covenant.org/version/1/4/code-of-conduct/
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ea73169
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,32 @@
+# How to Contribute
+
+We would love to accept your patches and contributions to this project.
+
+## Before you begin
+
+### Sign our Contributor License Agreement
+
+Contributions to this project must be accompanied by a
+[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
+You (or your employer) retain the copyright to your contribution; this simply
+gives us permission to use and redistribute your contributions as part of the
+project.
+
+If you or your current employer have already signed the Google CLA (even if it
+was for a different project), you probably don't need to do it again.
+
+Visit to see your current agreements or to
+sign a new one.
+
+### Review our Community Guidelines
+
+This project follows [Google's Open Source Community
+Guidelines](https://opensource.google/conduct/).
+
+## Contribution process
+
+### Code Reviews
+
+All submissions, including submissions by project members, require review. We
+use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
+for this purpose.
\ No newline at end of file
diff --git a/docs/code-of-conduct.md b/docs/code-of-conduct.md
index c8d68a2..b1ad5bd 100644
--- a/docs/code-of-conduct.md
+++ b/docs/code-of-conduct.md
@@ -1,93 +1,2 @@
-# Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of
-experience, education, socio-economic status, nationality, personal appearance,
-race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
- advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are
-not aligned to this Code of Conduct, or to ban temporarily or permanently any
-contributor for other behaviors that they deem inappropriate, threatening,
-offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-This Code of Conduct also applies outside the project spaces when the Project
-Steward has a reasonable belief that an individual's behavior may have a
-negative impact on the project or its community.
-
-## Conflict Resolution
-
-We do not believe that all conflict is bad; healthy debate and disagreement
-often yield positive results. However, it is never okay to be disrespectful or
-to engage in behavior that violates the project’s code of conduct.
-
-If you see someone violating the code of conduct, you are encouraged to address
-the behavior directly with those involved. Many issues can be resolved quickly
-and easily, and this gives people more control over the outcome of their
-dispute. If you are unable to resolve the matter for any reason, or if the
-behavior is threatening or harassing, report it. We are dedicated to providing
-an environment where participants feel welcome and safe.
-
-Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
-Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
-receive and address reported violations of the code of conduct. They will then
-work with a committee consisting of representatives from the Open Source
-Programs Office and the Google Open Source Strategy team. If for any reason you
-are uncomfortable reaching out to the Project Steward, please email
-opensource@google.com.
-
-We will investigate every complaint, but you may not receive a direct response.
-We will use our discretion in determining when and how to follow up on reported
-incidents, which may range from not taking action to permanent expulsion from
-the project and project-sponsored spaces. We will notify the accused of the
-report and provide them an opportunity to discuss it before any action is taken.
-The identity of the reporter will be omitted from the details of the report
-supplied to the accused. In potentially harmful situations, such as ongoing
-harassment or threats to anyone's safety, we may take action without notice.
-
-## Attribution
-
-This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
-available at
-https://www.contributor-covenant.org/version/1/4/code-of-conduct/
\ No newline at end of file
+```{include} ../CODE_OF_CONDUCT.md
+```
\ No newline at end of file
diff --git a/docs/contributing.md b/docs/contributing.md
index ea73169..435d357 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -1,32 +1,2 @@
-# How to Contribute
-
-We would love to accept your patches and contributions to this project.
-
-## Before you begin
-
-### Sign our Contributor License Agreement
-
-Contributions to this project must be accompanied by a
-[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
-You (or your employer) retain the copyright to your contribution; this simply
-gives us permission to use and redistribute your contributions as part of the
-project.
-
-If you or your current employer have already signed the Google CLA (even if it
-was for a different project), you probably don't need to do it again.
-
-Visit to see your current agreements or to
-sign a new one.
-
-### Review our Community Guidelines
-
-This project follows [Google's Open Source Community
-Guidelines](https://opensource.google/conduct/).
-
-## Contribution process
-
-### Code Reviews
-
-All submissions, including submissions by project members, require review. We
-use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
-for this purpose.
\ No newline at end of file
+```{include} ../CONTRIBUTING.md
+```
\ No newline at end of file