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

Major changes to main_dev #271

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d4a08f9
sphinx refactor 1
pravsripad Dec 11, 2022
5c9e4da
sphinx refactor 2
pravsripad Dec 11, 2022
d974893
Merge pull request #12 from pravsripad/sphinx_reborn
pravsripad Jan 17, 2023
5cff9c9
Include docstrings to examples for sphinx.
pravsripad Jan 20, 2023
555a2da
Fix some bugs related to API changes. Change path import style. Updat…
pravsripad Jan 20, 2023
db8d84e
Moved testing related example files to tests directory.
pravsripad Jan 20, 2023
e1991f7
Add docs and config for building docs.
pravsripad Jan 20, 2023
75a3840
Include a makefile and update gitignore.
pravsripad Jan 20, 2023
7aec0c5
Create an updated minimal environment file.
pravsripad Jan 20, 2023
0a17831
Create build_docs.yml
pravsripad May 4, 2023
8cf5f46
Update connectivity package imports.
pravsripad May 2, 2023
3b7d204
Remove unwanted targets in the makefile.
pravsripad May 2, 2023
a91d91b
Testing build docs workflow.
pravsripad May 4, 2023
bba9d7d
Update workflow to fix typo.
pravsripad May 4, 2023
36a36de
Add missing numpydoc package.
pravsripad May 4, 2023
aa02636
Include jumeg install within workflow
pravsripad May 4, 2023
1aeac39
Update workflow 2.
pravsripad May 4, 2023
3ab2780
Update fix 3.
pravsripad May 4, 2023
3820620
Update workflow 4.
pravsripad May 5, 2023
bec0d6c
Update workflows 5.
pravsripad May 5, 2023
62fca91
Update workflows 6.
pravsripad May 5, 2023
c0693a3
Update workflows 7.
pravsripad May 5, 2023
bf345cb
Update workflows 8.
pravsripad May 5, 2023
c3c1fdf
Update workflows 9.
pravsripad May 5, 2023
d0dc375
Update workflows 10.
pravsripad May 5, 2023
b2ca678
Update workflows 11.
pravsripad May 5, 2023
c95cfa3
Fix issues blocking sphinx build.
pravsripad May 5, 2023
b2326c0
Update workflows 11.
pravsripad May 5, 2023
b8bd3bf
Update workflows 12.
pravsripad May 5, 2023
a5f34fc
Update workflow 12
pravsripad May 5, 2023
2ccdf92
Update workflowd 13
pravsripad May 5, 2023
e2321dd
Update workflows 14.
pravsripad May 5, 2023
6023673
Update workflows 15.
pravsripad May 5, 2023
240925d
Update workflows 15.
pravsripad May 5, 2023
673319b
Update workflows 16.
pravsripad May 5, 2023
b7e96af
Update workflows 17.
pravsripad May 9, 2023
1a22c3d
Create main.yml temporarily.
pravsripad May 11, 2023
e53c8af
Delete main.yml
pravsripad May 11, 2023
59cea87
Test conda workflows.
pravsripad May 11, 2023
c54ce3a
Test build_conda.yml
pravsripad May 12, 2023
d54b5b6
Remove build dir from gitignore.
pravsripad May 24, 2023
42f1eca
Add all locally built docs.
pravsripad May 24, 2023
3db0670
Update gitignore
pravsripad May 26, 2023
9afd3ce
Update gitignore.
pravsripad May 26, 2023
d742e99
Newly made docs.
pravsripad May 26, 2023
99c5440
Add nojekyll here as well.
pravsripad May 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
*.tar.*
*.egg*
*.tmproj
*.png
*.idea
*.old
*.dat
*.bak
test_*.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand All @@ -35,7 +33,6 @@ old/
devel
env/
bin/
build/
develop-eggs/
dist/
eggs/
Expand Down Expand Up @@ -76,6 +73,10 @@ coverage.xml
*.pot

# Sphinx documentation
docs/_build/
.buildinfo
.doctrees/

.DS_Store
.ipynb_checkpoints/

*.label
61 changes: 61 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# simple makefile to simplify repetitive build env management tasks under posix
# taken from Makefile for mne-python and adapted for jumeg

PYTHON ?= python
PYTESTS ?= py.test
CTAGS ?= ctags
CODESPELL_SKIPS ?= "doc/_build,doc/auto_*,*.fif,*.eve,*.gz,*.tgz,*.zip,*.mat,*.stc,*.label,*.w,*.bz2,*.annot,*.sulc,*.log,*.local-copy,*.orig_avg,*.inflated_avg,*.gii,*.pyc,*.doctree,*.pickle,*.inv,*.png,*.edf,*.touch,*.thickness,*.nofix,*.volume,*.defect_borders,*.mgh,lh.*,rh.*,COR-*,FreeSurferColorLUT.txt,*.examples,.xdebug_mris_calc,bad.segments,BadChannels,*.hist,empty_file,*.orig,*.js,*.map,*.ipynb,searchindex.dat,plot_*.rst,*.rst.txt,c_EULA.rst*,*.html,gdf_encodes.txt,*.svg,references.bib,*.css,*.edf,*.bdf,*.vhdr"
CODESPELL_DIRS ?= jumeg/ doc/ examples/
all: clean inplace test test-doc

clean-pyc:
find . -name "*.pyc" | xargs rm -f

clean-so:
find . -name "*.so" | xargs rm -f
find . -name "*.pyd" | xargs rm -f

clean-build:
rm -rf build dist

clean-ctags:
rm -f tags

clean-cache:
find . -name "__pycache__" | xargs rm -rf

clean: clean-build clean-pyc clean-so clean-ctags clean-cache

in: inplace # just a shortcut
inplace:
$(PYTHON) setup.py build_ext -i

wheel:
$(PYTHON) setup.py sdist bdist_wheel

wheel_quiet:
$(PYTHON) setup.py -q sdist bdist_wheel

pytest: test

test: in
rm -f .coverage
$(PYTESTS) -m 'not ultraslowtest' jumeg

test-verbose: in
rm -f .coverage
$(PYTESTS) -m 'not ultraslowtest' jumeg --verbose

test-fast: in
rm -f .coverage
$(PYTESTS) -m 'not slowtest' jumeg

test-full: in
rm -f .coverage
$(PYTESTS) jumeg

build-doc:
cd docs; make clean
# cd docs; DISPLAY=:1.0 xvfb-run -n 1 -s "-screen 0 1280x1024x24 -noreset -ac +extension GLX +render" make html
cd docs; make html

188 changes: 188 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# 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

GITHUB_PAGES_BRANCH = jumeg_sphinx
OUTPUTDIR = build/html

# 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)

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " clean to remove genrated output"
@echo " html to make standalone HTML files"
@echo " notebooks to make the Jupyter notebook-based tutorials"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
-rm -rf $(BUILDDIR)/*
-rm -rf auto_examples/*
-rm -rf generated/*

# tutorials:
# make -C tutorial
#
# introduction: introduction.ipynb
# tools/nb_to_doc.py introduction

# notebooks: tutorials introduction

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/lyman.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/lyman.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/lyman"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/lyman"
@echo "# devhelp"

epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

install:
touch $(BUILDDIR)/.nojekyll
git add $(BUILDDIR)/.nojekyll
rm -rf ./auto_examples ./generated
mv $(OUTPUTDIR)/* ./
rm -rf ./$(BUILDDIR)/
git commit -a -m 'Generate jumeg site' ./$(SOURCEDIR)
git push origin $(GITHUB_PAGES_BRANCH)
49 changes: 49 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.. _api_documentation:

=================
API Documentation
=================

.. currentmodule:: jumeg

Connectivity
============

Functions

.. currentmodule:: jumeg.connectivity

.. autosummary::
:toctree: generated/
:nosignatures:

find_distances_matrix
weighted_con_matrix
get_label_distances
make_annot_from_csv

sensor_connectivity_3d
plot_grouped_connectivity_circle
plot_generic_grouped_circle
plot_grouped_causality_circle
plot_degree_circle
plot_lines_and_blobs
plot_labelled_group_connectivity_circle
plot_fica_grouped_circle

.. currentmodule:: jumeg.connectivity.causality

.. autosummary::
:toctree: generated/
:nosignatures:

dw_whiteness
consistency
do_mvar_evaluation
check_whiteness_and_consistency
check_model_order
prepare_causality_matrix
make_frequency_bands
compute_order_extended
compute_order
compute_causal_outflow_inflow
Binary file added docs/build/doctrees/api.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/auto_examples/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/index.doctree
Binary file not shown.
Empty file added docs/build/html/.nojekyll
Empty file.
Loading