From 7c725d8f3dc3ef50d098f47adb602231437db7e9 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 4 Dec 2024 12:21:15 +0000 Subject: [PATCH] Move FInAT and gem into FIAT repository --- .github/workflows/docs.yml | 33 ++ .github/workflows/pythonapp.yml | 10 +- .gitignore | 6 +- doc/sphinx/Makefile | 177 ----------- doc/sphinx/requirements.txt | 3 - doc/sphinx/source/conf.py | 289 ------------------ doc/sphinx/source/index.rst | 37 --- docs/Makefile | 80 ++--- docs/source/conf.py | 206 ++++++------- docs/source/index.rst | 41 ++- {doc/sphinx => docs}/source/installation.rst | 0 {doc/sphinx => docs}/source/manual.rst | 0 {doc/sphinx => docs}/source/releases.rst | 0 {doc/sphinx => docs}/source/releases/next.rst | 0 .../source/releases/v1.6.0.rst | 0 .../source/releases/v2016.1.0.rst | 0 .../source/releases/v2016.2.0.rst | 0 .../source/releases/v2017.1.0.post1.rst | 0 .../source/releases/v2017.1.0.rst | 0 .../source/releases/v2017.2.0.rst | 0 .../source/releases/v2018.1.0.rst | 0 .../source/releases/v2019.1.0.rst | 0 finat/point_set.py | 2 +- finat/tensor_product.py | 6 +- finat/ufl/finiteelement.py | 16 +- gem/gem.py | 2 +- pyproject.toml | 38 +++ setup.cfg | 4 +- setup.py | 34 --- test/{ => finat}/fiat_mapping.py | 0 test/{ => finat}/test_direct_serendipity.py | 0 test/{ => finat}/test_hash.py | 0 test/{ => finat}/test_mass_conditioning.py | 0 .../test_point_evaluation_ciarlet.py | 0 test/{ => finat}/test_restriction.py | 0 test/{ => finat}/test_zany_mapping.py | 0 36 files changed, 243 insertions(+), 741 deletions(-) create mode 100644 .github/workflows/docs.yml delete mode 100644 doc/sphinx/Makefile delete mode 100644 doc/sphinx/requirements.txt delete mode 100644 doc/sphinx/source/conf.py delete mode 100644 doc/sphinx/source/index.rst rename {doc/sphinx => docs}/source/installation.rst (100%) rename {doc/sphinx => docs}/source/manual.rst (100%) rename {doc/sphinx => docs}/source/releases.rst (100%) rename {doc/sphinx => docs}/source/releases/next.rst (100%) rename {doc/sphinx => docs}/source/releases/v1.6.0.rst (100%) rename {doc/sphinx => docs}/source/releases/v2016.1.0.rst (100%) rename {doc/sphinx => docs}/source/releases/v2016.2.0.rst (100%) rename {doc/sphinx => docs}/source/releases/v2017.1.0.post1.rst (100%) rename {doc/sphinx => docs}/source/releases/v2017.1.0.rst (100%) rename {doc/sphinx => docs}/source/releases/v2017.2.0.rst (100%) rename {doc/sphinx => docs}/source/releases/v2018.1.0.rst (100%) rename {doc/sphinx => docs}/source/releases/v2019.1.0.rst (100%) create mode 100644 pyproject.toml delete mode 100755 setup.py rename test/{ => finat}/fiat_mapping.py (100%) rename test/{ => finat}/test_direct_serendipity.py (100%) rename test/{ => finat}/test_hash.py (100%) rename test/{ => finat}/test_mass_conditioning.py (100%) rename test/{ => finat}/test_point_evaluation_ciarlet.py (100%) rename test/{ => finat}/test_restriction.py (100%) rename test/{ => finat}/test_zany_mapping.py (100%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..0a87ac66c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,33 @@ +name: github pages + +on: + # push: + # branches: + # - master + pull_request: + +jobs: + build_docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v3 + with: + python-version: 3.12 + - name: Install + run: | + python -m pip install .[doc] + - name: Build docs + run: | + make -C docs html + # - name: Deploy + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./docs/build/html + # publish_branch: gh-pages + # enable_jekyll: false + # allow_empty_commit: false + # user_name: 'github-actions[bot]' + # user_email: 'github-actions[bot]@users.noreply.github.com' diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index ce154290f..0841037af 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -4,7 +4,11 @@ name: FIAT CI -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: jobs: build: @@ -12,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 @@ -33,7 +37,7 @@ jobs: - name: Test with pytest run: | python -m pip install coveralls pytest pytest-cov pytest-xdist - DATA_REPO_GIT="" python -m pytest --cov=FIAT/ test/ + DATA_REPO_GIT="" python -m pytest --cov=FIAT/ --cov=finat --cov=gem test/ - name: Coveralls if: ${{ github.repository == 'FEniCS/fiat' && github.head_ref == '' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }} env: diff --git a/.gitignore b/.gitignore index 26346c53d..b41093856 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,8 @@ /doc/sphinx/source/api-doc release/ -/doc/sphinx/source/_build/ \ No newline at end of file +/docs/build/ +/docs/source/FIAT.rst +/docs/source/finat.rst +/docs/source/finat.ufl.rst +/docs/source/gem.rst diff --git a/doc/sphinx/Makefile b/doc/sphinx/Makefile deleted file mode 100644 index 995d1834e..000000000 --- a/doc/sphinx/Makefile +++ /dev/null @@ -1,177 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.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 ' where is one of" - @echo " html to make standalone HTML files" - @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 " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @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 " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @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)/* - -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/FIniteelementAutomaticTabulatorFIAT.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FIniteelementAutomaticTabulatorFIAT.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/FIniteelementAutomaticTabulatorFIAT" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FIniteelementAutomaticTabulatorFIAT" - @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." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @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." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt deleted file mode 100644 index 0a3d875fb..000000000 --- a/doc/sphinx/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -numpy -sympy -sphinx==1.7.0 diff --git a/doc/sphinx/source/conf.py b/doc/sphinx/source/conf.py deleted file mode 100644 index f97faaf30..000000000 --- a/doc/sphinx/source/conf.py +++ /dev/null @@ -1,289 +0,0 @@ -# -*- coding: utf-8 -*- -# -# FInite element Automatic Tabulator (FIAT) documentation build configuration file, created by -# sphinx-quickstart on Wed Nov 4 15:38:29 2015. -# -# 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 -import shlex -import pkg_resources -import datetime - -# 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. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.coverage', - 'sphinx.ext.mathjax', - 'sphinx.ext.viewcode', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'FInite element Automatic Tabulator (FIAT)' -this_year = datetime.date.today().year -copyright = u'%s, FEniCS Project' % this_year -version = pkg_resources.get_distribution("fenics-fiat").version -release = version - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# 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 -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# 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'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'FIniteelementAutomaticTabulatorFIATdoc' - - -# -- 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', 'FIniteelementAutomaticTabulatorFIAT.tex', u'FInite element Automatic Tabulator (FIAT) Documentation', - u'FEniCS Project', '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', 'finiteelementautomatictabulatorfiat', u'FInite element Automatic Tabulator (FIAT) Documentation', - [u'FEniCS Project'], 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', 'FIniteelementAutomaticTabulatorFIAT', u'FInite element Automatic Tabulator (FIAT) Documentation', - u'FEniCS Project', 'FIniteelementAutomaticTabulatorFIAT', '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 - - -# Configuration for intersphinx -intersphinx_mapping = { - 'recursivenodes': ('https://tisaac.gitlab.io/recursivenodes/', None), - 'numpy': ('https://numpy.org/doc/stable/', None), - 'python': ('https://docs.python.org/3/', None), -} - - -def run_apidoc(_): - modules = ['FIAT'] - - # Get location of Sphinx files - sphinx_source_dir = os.path.abspath(os.path.dirname(__file__)) - repo_dir = os.path.abspath(os.path.join(sphinx_source_dir, os.path.pardir, - os.path.pardir, os.path.pardir)) - apidoc_dir = os.path.join(sphinx_source_dir, "api-doc") - - from sphinx.ext.apidoc import main - for module in modules: - # Generate .rst files ready for autodoc - module_dir = os.path.join(repo_dir, module) - main(["-f", "-d", "1", "-o", apidoc_dir, module_dir]) - -def setup(app): - app.connect('builder-inited', run_apidoc) diff --git a/doc/sphinx/source/index.rst b/doc/sphinx/source/index.rst deleted file mode 100644 index 9dc306dc2..000000000 --- a/doc/sphinx/source/index.rst +++ /dev/null @@ -1,37 +0,0 @@ -.. title:: FIAT - - -======================================== -FIAT: FInite element Automatic Tabulator -======================================== - -FIAT is a Python package for automatic generation of finite element -basis functions. It is capable of generating finite element basis -functions for a wide range of finite element families on simplices -(lines, triangles and tetrahedra), including the Lagrange elements, -and the elements of Raviart-Thomas, Brezzi-Douglas-Marini and Nedelec. -It is also capable of generating tensor-product elements and a number -more exotic elements, such as the Argyris, Hermite and Morley -elements. - -FIAT is part of the FEniCS Project. - -For more information, visit http://www.fenicsproject.org. - - -Documentation -============= - -.. toctree:: - :titlesonly: - :maxdepth: 1 - - installation - manual - API reference - releases - -[FIXME: These links don't belong here, should go under API reference somehow.] - -* :ref:`genindex` -* :ref:`modindex` diff --git a/docs/Makefile b/docs/Makefile index d866dab1c..60333b3ae 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,8 +7,6 @@ SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build -PYTHONPATH := $(PWD)/..:$(PYTHONPATH) - # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) @@ -21,14 +19,11 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp \ -devhelp epub latex latexpdf text man changes linkcheck doctest gettext \ -serve +.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 ' where is one of" @echo " html to make standalone HTML files" - @echo " serve to launch a local web server to serve up documentation" @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" @@ -51,93 +46,76 @@ help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" -TARGETS = html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - - -livehtml: html - python server.py - -serve: html - cd $(BUILDDIR)/html; python -m SimpleHTTPServer $(PORT) - -source/teamgrid.rst: source/team.py - cd source; python team.py - -.PHONY: source/obtaining_pyop2.rst - -source/obtaining_pyop2.rst: - wget https://raw.github.com/OP2/PyOP2/master/README.rst -O $@ - -apidoc: $(GENERATED_FILES) - sphinx-apidoc ../finat -o source/ -f -T - clean: rm -rf $(BUILDDIR)/* -buildhtml: apidoc - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html +apidoc: + sphinx-apidoc -f -T -o source/ ../FIAT + sphinx-apidoc -f -T -o source/ ../finat + sphinx-apidoc -f -T -o source/ ../gem -html: apidoc buildhtml +html: apidoc + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -dirhtml: apidoc +dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." -singlehtml: apidoc +singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." -pickle: apidoc +pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." -json: apidoc +json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." -htmlhelp: apidoc +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: apidoc +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/FInAT.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FIniteelementAutomaticTabulatorFIAT.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FInAT.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FIniteelementAutomaticTabulatorFIAT.qhc" -devhelp: apidoc +devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/FInAT" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FInAT" + @echo "# mkdir -p $$HOME/.local/share/devhelp/FIniteelementAutomaticTabulatorFIAT" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FIniteelementAutomaticTabulatorFIAT" @echo "# devhelp" -epub: apidoc +epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." -latex: apidoc +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: apidoc +latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @@ -149,46 +127,46 @@ latexpdfja: $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." -text: apidoc +text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." -man: apidoc +man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." -texinfo: apidoc +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: apidoc +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: apidoc +gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." -changes: apidoc +changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." -linkcheck: apidoc +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: apidoc +doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/source/conf.py b/docs/source/conf.py index 90f399c58..9963d35cd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # -# FInAT documentation build configuration file, created by -# sphinx-quickstart on Thu Aug 14 11:38:06 2014. +# FInite element Automatic Tabulator (FIAT) documentation build configuration file, created by +# sphinx-quickstart on Wed Nov 4 15:38:29 2015. # # This file is execfile()d with the current directory set to its # containing dir. @@ -12,66 +12,62 @@ # All configuration values have a default; values that are commented out # serve to show the default. +import sys +import os +import shlex +import pkg_resources +import datetime + # 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. -# sys.path.insert(0, os.path.abspath('.')) +#sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' +#needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.intersphinx", - "sphinx.ext.mathjax", - "sphinx.ext.viewcode", + 'sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.viewcode', ] -# Both the class’ and the __init__ method’s docstring are concatenated and -# inserted into the class definition -autoclass_content = "both" # Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] +templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = ".rst" +source_suffix = '.rst' # The encoding of source files. -# source_encoding = 'utf-8-sig' +#source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = "index" +master_doc = 'index' # General information about the project. -project = u"FInAT" -copyright = u"2014--2020, David A. Ham, Robert C. Kirby and others" - -# 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 short X.Y version. -version = "0.1" -# The full version, including alpha/beta/rc tags. -release = "0.1" +project = u'FInite element Automatic Tabulator (FIAT)' +this_year = datetime.date.today().year +copyright = u'%s, FEniCS Project' % this_year +version = pkg_resources.get_distribution("fenics-fiat").version +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None +#language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -# today = '' +#today = '' # Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' +#today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -79,172 +75,149 @@ # The reST default role (used for this markup: `text`) to use for all # documents. -# default_role = None +#default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True +#add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -# add_module_names = True +#add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -# show_authors = False +#show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" +pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] +#modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False +#keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "finat" +html_theme = 'default' # 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 # documentation. -# html_theme_options = {} +#html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ["_themes"] +#html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -# html_title = None +#html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None +#html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -# html_logo = None +#html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -# html_favicon = None - -# 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'] +#html_favicon = None # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -# html_extra_path = [] +#html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' +#html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -html_use_smartypants = True +#html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -# html_sidebars = {} +#html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -# html_additional_pages = {} +#html_additional_pages = {} # If false, no module index is generated. -# html_domain_indices = True +#html_domain_indices = True # If false, no index is generated. -# html_use_index = True +#html_use_index = True # If true, the index is split into individual pages for each letter. -# html_split_index = False +#html_split_index = False # If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True +#html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True +#html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True +#html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -# html_use_opensearch = '' +#html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# html_search_scorer = 'scorer.js' +#html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = "FInATdoc" +htmlhelp_basename = 'FIniteelementAutomaticTabulatorFIATdoc' + # -- Options for LaTeX output --------------------------------------------- latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - "papersize": "a4paper", - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - # Latex figure (float) alignment - # 'figure_align': 'htbp', +# 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", - "FInAT.tex", - u"FInAT Documentation", - u"David A. Ham and Robert C. Kirby", - "manual", - ), + ('index', 'FIniteelementAutomaticTabulatorFIAT.tex', u'FInite element Automatic Tabulator (FIAT) Documentation', + u'FEniCS Project', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -# latex_logo = None +#latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -# latex_use_parts = False +#latex_use_parts = False # If true, show page references after internal links. -# latex_show_pagerefs = False +#latex_show_pagerefs = False # If true, show URL addresses after external links. -# latex_show_urls = False +#latex_show_urls = False # Documents to append as an appendix to all manuals. -# latex_appendices = [] +#latex_appendices = [] # If false, no module index is generated. -# latex_domain_indices = True +#latex_domain_indices = True # -- Options for manual page output --------------------------------------- @@ -252,11 +225,12 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ("index", "finat", u"FInAT Documentation", [u"David A. Ham and Robert C. Kirby"], 1) + ('index', 'finiteelementautomatictabulatorfiat', u'FInite element Automatic Tabulator (FIAT) Documentation', + [u'FEniCS Project'], 1) ] # If true, show URL addresses after external links. -# man_show_urls = False +#man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -265,29 +239,27 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ( - "index", - "FInAT", - u"FInAT Documentation", - u"David A. Ham and Robert C. Kirby", - "FInAT", - "One line description of project.", - "Miscellaneous", - ), + ('index', 'FIniteelementAutomaticTabulatorFIAT', u'FInite element Automatic Tabulator (FIAT) Documentation', + u'FEniCS Project', 'FIniteelementAutomaticTabulatorFIAT', 'One line description of project.', + 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. -# texinfo_appendices = [] +#texinfo_appendices = [] # If false, no module index is generated. -# texinfo_domain_indices = True +#texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' +#texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False +#texinfo_no_detailmenu = False -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {"https://docs.python.org/3/": None} +# Configuration for intersphinx +intersphinx_mapping = { + 'recursivenodes': ('https://tisaac.gitlab.io/recursivenodes/', None), + 'numpy': ('https://numpy.org/doc/stable/', None), + 'python': ('https://docs.python.org/3/', None), +} diff --git a/docs/source/index.rst b/docs/source/index.rst index cef474f5d..1deda454c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,23 +1,34 @@ -.. FInAT documentation master file, created by - sphinx-quickstart on Thu Aug 14 11:38:06 2014. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. +.. title:: FIAT -Welcome to FInAT's documentation! -================================= -Contents: +======================================== +FIAT: FInite element Automatic Tabulator +======================================== -.. toctree:: - :maxdepth: 2 +FIAT is a Python package for automatic generation of finite element +basis functions. It is capable of generating finite element basis +functions for a wide range of finite element families on simplices +(lines, triangles and tetrahedra), including the Lagrange elements, +and the elements of Raviart-Thomas, Brezzi-Douglas-Marini and Nedelec. +It is also capable of generating tensor-product elements and a number +more exotic elements, such as the Argyris, Hermite and Morley +elements. - finat +FIAT is part of the FEniCS Project. +For more information, visit http://www.fenicsproject.org. -Indices and tables -================== -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +Documentation +============= +.. toctree:: + :titlesonly: + :maxdepth: 1 + + installation + manual + releases + FIAT + finat + gem diff --git a/doc/sphinx/source/installation.rst b/docs/source/installation.rst similarity index 100% rename from doc/sphinx/source/installation.rst rename to docs/source/installation.rst diff --git a/doc/sphinx/source/manual.rst b/docs/source/manual.rst similarity index 100% rename from doc/sphinx/source/manual.rst rename to docs/source/manual.rst diff --git a/doc/sphinx/source/releases.rst b/docs/source/releases.rst similarity index 100% rename from doc/sphinx/source/releases.rst rename to docs/source/releases.rst diff --git a/doc/sphinx/source/releases/next.rst b/docs/source/releases/next.rst similarity index 100% rename from doc/sphinx/source/releases/next.rst rename to docs/source/releases/next.rst diff --git a/doc/sphinx/source/releases/v1.6.0.rst b/docs/source/releases/v1.6.0.rst similarity index 100% rename from doc/sphinx/source/releases/v1.6.0.rst rename to docs/source/releases/v1.6.0.rst diff --git a/doc/sphinx/source/releases/v2016.1.0.rst b/docs/source/releases/v2016.1.0.rst similarity index 100% rename from doc/sphinx/source/releases/v2016.1.0.rst rename to docs/source/releases/v2016.1.0.rst diff --git a/doc/sphinx/source/releases/v2016.2.0.rst b/docs/source/releases/v2016.2.0.rst similarity index 100% rename from doc/sphinx/source/releases/v2016.2.0.rst rename to docs/source/releases/v2016.2.0.rst diff --git a/doc/sphinx/source/releases/v2017.1.0.post1.rst b/docs/source/releases/v2017.1.0.post1.rst similarity index 100% rename from doc/sphinx/source/releases/v2017.1.0.post1.rst rename to docs/source/releases/v2017.1.0.post1.rst diff --git a/doc/sphinx/source/releases/v2017.1.0.rst b/docs/source/releases/v2017.1.0.rst similarity index 100% rename from doc/sphinx/source/releases/v2017.1.0.rst rename to docs/source/releases/v2017.1.0.rst diff --git a/doc/sphinx/source/releases/v2017.2.0.rst b/docs/source/releases/v2017.2.0.rst similarity index 100% rename from doc/sphinx/source/releases/v2017.2.0.rst rename to docs/source/releases/v2017.2.0.rst diff --git a/doc/sphinx/source/releases/v2018.1.0.rst b/docs/source/releases/v2018.1.0.rst similarity index 100% rename from doc/sphinx/source/releases/v2018.1.0.rst rename to docs/source/releases/v2018.1.0.rst diff --git a/doc/sphinx/source/releases/v2019.1.0.rst b/docs/source/releases/v2019.1.0.rst similarity index 100% rename from doc/sphinx/source/releases/v2019.1.0.rst rename to docs/source/releases/v2019.1.0.rst diff --git a/finat/point_set.py b/finat/point_set.py index 63ab8dc84..1497308c7 100644 --- a/finat/point_set.py +++ b/finat/point_set.py @@ -95,7 +95,7 @@ class UnknownPointSet(AbstractPointSet): shape (D,) and free indices for the points N.""" def __init__(self, points_expr): - """Build a PointSingleton from a gem expression for a single point. + r"""Build a PointSingleton from a gem expression for a single point. :arg points_expr: A ``gem.Variable`` expression representing a vector of N points in D dimensions. Should have shape (N, D) diff --git a/finat/tensor_product.py b/finat/tensor_product.py index de3708fbd..f0fd58477 100644 --- a/finat/tensor_product.py +++ b/finat/tensor_product.py @@ -225,7 +225,7 @@ def productise(factors, method): def compose_permutations(factors): - """For the :class:`TensorProductElement` object composed of factors, + r"""For the :class:`TensorProductElement` object composed of factors, construct, for each dimension tuple, for each entity, and for each possible entity orientation combination, the DoF permutation list. @@ -236,7 +236,8 @@ def compose_permutations(factors): For tensor-product elements, one needs to consider two kinds of orientations: extrinsic orientations and intrinsic ("material") orientations. - Example: + Example + ------- UFCQuadrilateral := UFCInterval x UFCInterval @@ -286,6 +287,7 @@ def compose_permutations(factors): (1, 0, 1): [2, 0, 3, 1], (1, 1, 0): [1, 3, 0, 2], (1, 1, 1): [3, 1, 2, 0]}}} + """ permutations = {} cells = [fe.cell for fe in factors] diff --git a/finat/ufl/finiteelement.py b/finat/ufl/finiteelement.py index 36c3d9221..4cf34c90d 100644 --- a/finat/ufl/finiteelement.py +++ b/finat/ufl/finiteelement.py @@ -126,14 +126,14 @@ def __init__(self, variant=None): """Create finite element. - Args: - family: The finite element family - cell: The geometric cell - degree: The polynomial degree (optional) - form_degree: The form degree (FEEC notation, used when field is - viewed as k-form) - quad_scheme: The quadrature scheme (optional) - variant: Hint for the local basis function variant (optional) + :arg family: The finite element family + :arg cell: The geometric cell + :arg degree: The polynomial degree (optional) + :arg form_degree: The form degree (FEEC notation, used when field is + viewed as k-form) + :arg quad_scheme: The quadrature scheme (optional) + :arg variant: Hint for the local basis function variant (optional) + """ # Note: Unfortunately, dolfin sometimes passes None for # cell. Until this is fixed, allow it: diff --git a/gem/gem.py b/gem/gem.py index ab70385f7..9f00d5535 100644 --- a/gem/gem.py +++ b/gem/gem.py @@ -177,7 +177,7 @@ class Terminal(Node): @property def dtype(self): - """dtype of the node. + """Data type of the node. We only need to set dtype (or _dtype) on terminal nodes, and other nodes inherit dtype from their children. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..994de7613 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "fenics-fiat" +version = "2024.0.0" +dependencies = [ + "numpy>=1.16", + "recursivenodes", + "scipy", + "symengine", + "sympy", + "fenics-ufl @ git+https://github.com/firedrakeproject/ufl.git", +] +requires-python = ">=3.10" +authors = [ + {name = "Robert C. Kirby et al.", email = "fenics-dev@googlegroups.com"}, + {name = "Imperial College London and others", email = "david.ham@imperial.ac.uk"}, +] +description = "FInite element Automatic Tabulator" +readme = "README.rst" +classifiers = [ + "Programming Language :: Python", + "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", +] + +[project.urls] +Repository = "https://github.com/firedrakeproject/fiat.git" + +[project.optional-dependencies] +doc = [ + "setuptools", # for pkg_resources + "sphinx", +] + +[tool.setuptools] +packages = ["FIAT", "finat", "finat.ufl", "gem"] diff --git a/setup.cfg b/setup.cfg index fdc13e4fb..d5f41d15c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,8 @@ [flake8] -ignore = E501,E226,E731,W504, +ignore = E501,E226,E731,W503,W504, # ambiguous variable name E741 -exclude = .git,__pycache__,doc/sphinx/source/conf.py,build,dist +exclude = .git,__pycache__,docs/source/conf.py,build,dist min-version = 3.0 [pydocstyle] diff --git a/setup.py b/setup.py deleted file mode 100755 index d55401a90..000000000 --- a/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -import sys - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -if sys.version_info < (3, 0): - print("Python 3.0 or higher required, please upgrade.") - sys.exit(1) - -version = "2019.2.0.dev0" - -url = "https://bitbucket.org/fenics-project/fiat/" -tarball = None -if 'dev' not in version: - tarball = url + "downloads/fenics-fiat-%s.tar.gz" % version - -setup( - name="fenics-fiat", - description="FInite element Automatic Tabulator", - version=version, - author="Robert C. Kirby et al.", - author_email="fenics-dev@googlegroups.com", - url=url, - download_url=tarball, - license="LGPL v3 or later", - packages=["FIAT"], - install_requires=[ - "setuptools", "numpy", "recursivenodes", "scipy", "sympy" - ] -) diff --git a/test/fiat_mapping.py b/test/finat/fiat_mapping.py similarity index 100% rename from test/fiat_mapping.py rename to test/finat/fiat_mapping.py diff --git a/test/test_direct_serendipity.py b/test/finat/test_direct_serendipity.py similarity index 100% rename from test/test_direct_serendipity.py rename to test/finat/test_direct_serendipity.py diff --git a/test/test_hash.py b/test/finat/test_hash.py similarity index 100% rename from test/test_hash.py rename to test/finat/test_hash.py diff --git a/test/test_mass_conditioning.py b/test/finat/test_mass_conditioning.py similarity index 100% rename from test/test_mass_conditioning.py rename to test/finat/test_mass_conditioning.py diff --git a/test/test_point_evaluation_ciarlet.py b/test/finat/test_point_evaluation_ciarlet.py similarity index 100% rename from test/test_point_evaluation_ciarlet.py rename to test/finat/test_point_evaluation_ciarlet.py diff --git a/test/test_restriction.py b/test/finat/test_restriction.py similarity index 100% rename from test/test_restriction.py rename to test/finat/test_restriction.py diff --git a/test/test_zany_mapping.py b/test/finat/test_zany_mapping.py similarity index 100% rename from test/test_zany_mapping.py rename to test/finat/test_zany_mapping.py