Skip to content

Commit

Permalink
Use org for notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed May 24, 2024
1 parent 7f5d847 commit 3300849
Show file tree
Hide file tree
Showing 14 changed files with 665 additions and 1,248 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Local website
tmp_outputs
docs
docsrc/notebooks/out*
docsrc/notebooks/*/out*
test/out*

# Byte-compiled / optimized / DLL files
Expand Down
9 changes: 9 additions & 0 deletions docsrc/articles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Articles
========

.. toctree::
:maxdepth: 1

notebooks/get_started/get_started.ipynb
notebooks/large_country/large_country

23 changes: 10 additions & 13 deletions docsrc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,27 @@
# 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
import datetime
import re # Regular expression
sys.path.insert(0, os.path.abspath('..'))

# sys.path.insert(0, os.path.abspath('..'))


def find_author_release():
"""Finding package authors and release."""
with open("../geefcc/__init__.py", encoding="utf-8") as file:
file_text = file.read()
_author = re.search('^__author__\\s*=\\s*"(.*)"',
file_text, re.M).group(1)
_release = re.search('^__version__\\s*=\\s*"(.*)"',
file_text, re.M).group(1)
return (_author, _release)

# -- Project information -----------------------------------------------------

project = "geefcc"
(author, release) = find_author_release()
_today = datetime.date.today()
year = _today.year
copyright = f"{year}, Cirad"

# The full version, including alpha/beta/rc tags
with open("../geefcc/__init__.py", encoding="utf-8") as init_file:
init_text = init_file.read()
author = re.search('^__author__\\s*=\\s*"(.*)"', init_text, re.M).group(1)
version = re.search('^__version__\\s*=\\s*"(.*)"', init_text, re.M).group(1)
release = version

# -- Sphynx options ----------------------------------------------------------
add_module_names = False
add_function_parentheses = True
Expand Down
3 changes: 2 additions & 1 deletion docsrc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Table of contents
:maxdepth: 2

Home <self>
notebooks/get_started
notebooks/get_started/get_started
articles
reference
indices
changelog
Expand Down
Loading

0 comments on commit 3300849

Please sign in to comment.