diff --git a/.autorc b/.autorc index ebb6a3b..84fece4 100644 --- a/.autorc +++ b/.autorc @@ -7,7 +7,7 @@ ["pr-body-labels", { "disabledLabels": ["release", "Release", "Released", "Prereleased", "Skip release"] }] ], "owner": "physiopy", - "repo": "", + "repo": "physiopy-community-guidelines", "name": "Stefano Moia", "email": "s.moia.research@gmail.com", "labels": [ diff --git a/.circleci/config.yml b/.circleci/config.yml index cd9245f..9bbb8fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,83 +10,15 @@ orbs: # so you dont have to copy and paste it everywhere. # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python python: circleci/python@2.0.3 - codecov: codecov/codecov@3.2.2 # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - test37: # This is the name of the job, feel free to change it to better match what you're trying to do! - # These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/ - # You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub - # A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python - # The executor is the environment in which the steps below will be executed - below will use a python 3.6.14 container - # Change the version below to your required version of python - docker: - - image: cimg/python:3.7 - working_directory: /tmp/src/ - resource_class: medium - # Checkout the code as the first step. This is a dedicated CircleCI step. - # The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default. - # Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt. - # Then run your tests! - # CircleCI will report the results back to your VCS provider. - steps: - - checkout - # Install Pillow first to avoid jpsg and zlib issues - - python/install-packages: - path-args: .[test] - pypi-cache: false - venv-cache: false - pkg-manager: pip-dist - # app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory. - # pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements. - - run: - name: Run tests - # This assumes pytest is installed via the install-package step above - command: | - pytest --cov=./ - mkdir /tmp/src/coverage - mv ./.coverage /tmp/src/coverage/.coverage.py37 - - store_artifacts: - path: /tmp/src/coverage - # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - - persist_to_workspace: - # Must be an absolute path, or relative path from working_directory. This is a directory on the container which is - # taken to be the root directory of the workspace. - root: /tmp - # Must be relative path from root - paths: - - src/coverage/.coverage.py37 - - test310: - docker: - - image: cimg/python:3.10 - working_directory: /tmp/src/ - resource_class: medium - steps: - - checkout - - python/install-packages: - path-args: .[test] - pypi-cache: false - venv-cache: false - pkg-manager: pip-dist - - run: - name: Run tests - command: | - pytest --cov=./ - mkdir /tmp/src/coverage - mv ./.coverage /tmp/src/coverage/.coverage.py310 - - store_artifacts: - path: /tmp/src/coverage - - persist_to_workspace: - root: /tmp - paths: - - src/coverage/.coverage.py310 style_check: docker: - image: cimg/python:3.7 - working_directory: /tmp/src/ + working_directory: /tmp/src/physiopy-community-guidelines resource_class: small steps: - checkout @@ -99,32 +31,8 @@ jobs: name: Check style command: | isort --check . - black --check - flake8 ./ - - merge_coverage: - working_directory: /tmp/src/ - docker: - - image: cimg/python:3.10 - resource_class: small - steps: - - attach_workspace: - at: /tmp - - checkout - - python/install-packages: - args: coverage - pkg-manager: pip - - run: - name: Merge coverage files - command: | - sudo apt update && sudo apt install curl - cd /tmp/src/coverage/ - coverage combine - coverage xml - - store_artifacts: - path: /tmp/src/coverage - - codecov/upload: - file: /tmp/src/coverage/coverage.xml + black --check physiopy-community-guidelines + flake8 ./physiopy-community-guidelines # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows @@ -133,13 +41,3 @@ workflows: # Inside the workflow, you define the jobs you want to run. jobs: - style_check - - test37: - requires: - - style_check - - test310: - requires: - - style_check - - merge_coverage: - requires: - - test37 - - test310 diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 774c4f6..0000000 --- a/.coveragerc +++ /dev/null @@ -1,19 +0,0 @@ -[run] -omit = - docs/* - tests/* - _version.py - __init__.py - **/__init__.py - due.py - .*rc - versioneer.py - setup.py - */tests/* - */_version.py - */__init__.py - */**/__init__.py - */due.py - */.*rc - */versioneer.py - */setup.py diff --git a/.gitattributes b/.gitattributes index 98ad13a..538d623 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -/_version.py export-subst +physiopy-community-guidelines/_version.py export-subst *.py eol=lf *.rst eol=lf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 646f4cd..6d11d96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,18 +10,6 @@ repos: - id: check-added-large-files - id: check-case-conflict - id: check-merge-conflict -- repo: https://github.com/psf/black - rev: 22.10.0 - hooks: - - id: black -- repo: https://github.com/pycqa/isort - rev: 5.10.1 - hooks: - - id: isort -- repo: https://github.com/pycqa/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - repo: https://github.com/pycqa/pydocstyle rev: 6.1.1 hooks: diff --git a/.readthedocs.yml b/.readthedocs.yml index bc99c2a..8836694 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,16 +8,19 @@ version: 2 build: os: "ubuntu-20.04" tools: - python: "3.7" + python: "3.10" # Build documentation in the docs/ directory with Sphinx sphinx: - configuration: docs/conf.py + configuration: docs/source/conf.py + +formats: + - pdf + - epub python: install: - method: pip path: . extra_requirements: - - doc - system_packages: true + - style diff --git a/.zenodo.json b/.zenodo.json index 064eb2e..41b8997 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { - "license":"", - "title":"", + "license":"CC-BY-SA-4.0", + "title":"Physiopy Community Guidelines", "upload_type":"software", "creators":[ { diff --git a/MANIFEST.in b/MANIFEST.in index 76a5ff4..95eee92 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include README.* LICENSE setup* MANIFEST.in requirements.txt include versioneer.py -include <reponame>/_version.py +include docs/_version.py diff --git a/README.md b/README.md index d2faac0..6cf3ea3 100644 --- a/README.md +++ b/README.md @@ -2,90 +2,33 @@ <a name="readme"></a> <img alt="repository" src="https://raw.githubusercontent.com/physiopy/phys2bids/master/docs/_static/physiopy_logo_small.png" height="150"> -This is a template for physiopy's repositories (and other repositories based on the same settings). - -Remember to change the licence as soon as you adopt the template. - -Available Configurations ------------------------- -This repository is meant to be a template for python3 projects. -- CircleCI medium docker running Linux (python 3.7, 3.10, style checks, and coverage) -- Auto release based on Github versioning with Physiopy's labels. -- `.gitattributes` for python -- `.gitignore` for python and containers -- Pre-commit (black, isort, flake8, pydocstyle, and RST documentation) -- Read the Docs (based on sphinx) -- Zenodo -- Codecov (for master branch, 90%+) -- Python setup with `extra_require` options -- Versioneer -- Issue templates (bugs, feature requests, generic) -- PR template -- Workflows (Auto release and PyPI upload) - -Usage ------ -1. Find and replace the items between `<>`, for instance `<reponame>` -2. Change licence -3. Set up your default pushes to `origin` (`git config remote.pushDefault origin`) -4. Finish setting up everything. - -More explanation coming soon. - -<reponame> -========== - -[![Latest version](https://img.shields.io/github/v/release/physiopy/<reponame>?style=flat&logo=github&sort=semver)](https://github.com/physiopy/<reponame>/releases) -[![Release date](https://img.shields.io/github/release-date/physiopy/<reponame>?style=flat&logo=github)](https://github.com/physiopy/<reponame>/releases) -[![Auto Release](https://img.shields.io/badge/release-auto.svg?style=flat&colorA=888888&colorB=9B065A&label=auto&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACzElEQVR4AYXBW2iVBQAA4O+/nLlLO9NM7JSXasko2ASZMaKyhRKEDH2ohxHVWy6EiIiiLOgiZG9CtdgG0VNQoJEXRogVgZYylI1skiKVITPTTtnv3M7+v8UvnG3M+r7APLIRxStn69qzqeBBrMYyBDiL4SD0VeFmRwtrkrI5IjP0F7rjzrSjvbTqwubiLZffySrhRrSghBJa8EBYY0NyLJt8bDBOtzbEY72TldQ1kRm6otana8JK3/kzN/3V/NBPU6HsNnNlZAz/ukOalb0RBJKeQnykd7LiX5Fp/YXuQlfUuhXbg8Di5GL9jbXFq/tLa86PpxPhAPrwCYaiorS8L/uuPJh1hZFbcR8mewrx0d7JShr3F7pNW4vX0GRakKWVk7taDq7uPvFWw8YkMcPVb+vfvfRZ1i7zqFwjtmFouL72y6C/0L0Ie3GvaQXRyYVB3YZNE32/+A/D9bVLcRB3yw3hkRCdaDUtFl6Ykr20aaLvKoqIXUdbMj6GFzAmdxfWx9iIRrkDr1f27cFONGMUo/gRI/jNbIMYxJOoR1cY0OGaVPb5z9mlKbyJP/EsdmIXvsFmM7Ql42nEblX3xI1BbYbTkXCqRnxUbgzPo4T7sQBNeBG7zbAiDI8nWfZDhQWYCG4PFr+HMBQ6l5VPJybeRyJXwsdYJ/cRnlJV0yB4ZlUYtFQIkMZnst8fRrPcKezHCblz2IInMIkPzbbyb9mW42nWInc2xmE0y61AJ06oGsXL5rcOK1UdCbEXiVwNXsEy/6+EbaiVG8eeEAfxvaoSBnCH61uOD7BS1Ul8ESHBKWxCrdyd6EYNKihgEVrwOAbQruoytuBYIFfAc3gVN6iawhjKyNCEpYhVJXgbOzARyaU4hCtYizq5EI1YgiUoIlT1B7ZjByqmRWYbwtdYjoWoN7+LOIQefIqKawLzK6ID69GGpQgwhhEcwGGUzfEPAiPqsCXadFsAAAAASUVORK5CYII=)](https://github.com/intuit/auto) +This repository contains the source files for our community guidelines. -[![See the documentation at: https://<reponame>.readthedocs.io](https://img.shields.io/badge/docs-read%20latest-informational?style=flat&logo=readthedocs)](https://<reponame>.readthedocs.io/en/latest/?badge=latest) -<!-- [![Latest DOI](https://zenodo.org/badge/<doi>.svg)](https://zenodo.org/badge/latestdoi/<doi>) --> -<!-- [![Licensed Apache 2.0](https://img.shields.io/github/license/physiopy/<reponame>?style=flat&logo=apache)](https://github.com/physiopy/<reponame>/blob/master/LICENSE) --> +Find them at https://physiopy-community-guidelines.readthedocs.io/en/latest/ + + +physiopy-community-guidelines +============================= -[![Codecov](https://img.shields.io/codecov/c/gh/physiopy/<reponame>?style=flat&label=codecov&logo=codecov)](https://codecov.io/gh/physiopy/<reponame>) -[![Build Status](https://img.shields.io/circleci/build/github/physiopy/<reponame>?style=flat&label=circleci&logo=circleci)](https://circleci.com/gh/physiopy/<reponame>) -[![Documentation Status](https://img.shields.io/readthedocs/<reponame>?style=flat&label=readthedocs&logo=readthedocs)](https://<reponame>.readthedocs.io/en/latest/?badge=latest) +[![Latest version](https://img.shields.io/github/v/release/physiopy/physiopy-community-guidelines?style=flat&logo=github&sort=semver)](https://github.com/physiopy/physiopy-community-guidelines/releases) +[![Release date](https://img.shields.io/github/release-date/physiopy/physiopy-community-guidelines?style=flat&logo=github)](https://github.com/physiopy/physiopy-community-guidelines/releases) +[![Auto Release](https://img.shields.io/badge/release-auto.svg?style=flat&colorA=888888&colorB=9B065A&label=auto&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACzElEQVR4AYXBW2iVBQAA4O+/nLlLO9NM7JSXasko2ASZMaKyhRKEDH2ohxHVWy6EiIiiLOgiZG9CtdgG0VNQoJEXRogVgZYylI1skiKVITPTTtnv3M7+v8UvnG3M+r7APLIRxStn69qzqeBBrMYyBDiL4SD0VeFmRwtrkrI5IjP0F7rjzrSjvbTqwubiLZffySrhRrSghBJa8EBYY0NyLJt8bDBOtzbEY72TldQ1kRm6otana8JK3/kzN/3V/NBPU6HsNnNlZAz/ukOalb0RBJKeQnykd7LiX5Fp/YXuQlfUuhXbg8Di5GL9jbXFq/tLa86PpxPhAPrwCYaiorS8L/uuPJh1hZFbcR8mewrx0d7JShr3F7pNW4vX0GRakKWVk7taDq7uPvFWw8YkMcPVb+vfvfRZ1i7zqFwjtmFouL72y6C/0L0Ie3GvaQXRyYVB3YZNE32/+A/D9bVLcRB3yw3hkRCdaDUtFl6Ykr20aaLvKoqIXUdbMj6GFzAmdxfWx9iIRrkDr1f27cFONGMUo/gRI/jNbIMYxJOoR1cY0OGaVPb5z9mlKbyJP/EsdmIXvsFmM7Ql42nEblX3xI1BbYbTkXCqRnxUbgzPo4T7sQBNeBG7zbAiDI8nWfZDhQWYCG4PFr+HMBQ6l5VPJybeRyJXwsdYJ/cRnlJV0yB4ZlUYtFQIkMZnst8fRrPcKezHCblz2IInMIkPzbbyb9mW42nWInc2xmE0y61AJ06oGsXL5rcOK1UdCbEXiVwNXsEy/6+EbaiVG8eeEAfxvaoSBnCH61uOD7BS1Ul8ESHBKWxCrdyd6EYNKihgEVrwOAbQruoytuBYIFfAc3gVN6iawhjKyNCEpYhVJXgbOzARyaU4hCtYizq5EI1YgiUoIlT1B7ZjByqmRWYbwtdYjoWoN7+LOIQefIqKawLzK6ID69GGpQgwhhEcwGGUzfEPAiPqsCXadFsAAAAASUVORK5CYII=)](https://github.com/intuit/auto) -[![Latest version](https://img.shields.io/pypi/v/<reponame>?style=flat&logo=pypi&logoColor=white)](https://pypi.org/project/<reponame>/) -[![Supports python version](https://img.shields.io/pypi/pyversions/<reponame>?style=flat&logo=python&logoColor=white)](https://pypi.org/project/<reponame>/) +[![See the documentation at: https://physiopy-community-guidelines.readthedocs.io](https://img.shields.io/badge/docs-read%20latest-informational?style=flat&logo=readthedocs)](https://physiopy-community-guidelines.readthedocs.io/en/latest/?badge=latest) +<!-- [![Latest DOI](https://zenodo.org/badge/<doi>.svg)](https://zenodo.org/badge/latestdoi/<doi>) --> +<!-- [![Licensed Apache 2.0](https://img.shields.io/github/license/physiopy/physiopy-community-guidelines?style=flat&logo=apache)](https://github.com/physiopy/physiopy-community-guidelines/blob/master/LICENSE) --> +[![Documentation Status](https://img.shields.io/readthedocs/physiopy-community-guidelines?style=flat&label=readthedocs&logo=readthedocs)](https://physiopy-community-guidelines.readthedocs.io/en/latest/?badge=latest) +[![Latest version](https://img.shields.io/pypi/v/physiopy-community-guidelines?style=flat&logo=pypi&logoColor=white)](https://pypi.org/project/physiopy-community-guidelines/) [![Auto Release](https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto)](https://github.com/intuit/auto) -[![Supports python version](https://img.shields.io/pypi/pyversions/<reponame>)](https://pypi.org/project/<reponame>/) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat)](#contributors) <!-- ALL-CONTRIBUTORS-BADGE:END --> -``<reponame>`` is a python3 library meant to do something. - -> If you use ``<reponame>`` in your work, please support it by citing the zenodo DOI of the version you used. You can find the latest version [here](https://doi.org/10.5281/zenodo.3470091) - -> We also support gathering all relevant citations via [DueCredit](http://duecredit.org). +> If you use ``physiopy-community-guidelines`` in your work, please support it by citing the zenodo DOI of the version you used. You can find the latest version [here](https://doi.org/10.5281/zenodo.3470091) -[Read the latest documentation](https://<reponame>.readthedocs.io/en/latest/) for more information on <reponame>! -## Tested OSs -We woudl love to do that, but for teh moment we cannot support **Windows or MacOS testing**. The reason is related to the cost of running such tests: for each non-Linux test, we can run up to 8 tests on Linux instead. Partial Windows and MacOS testing might be introduced in future releases. - -Hence, while **we cannot ensure that <reponame> will run on Windows or MacOS**, however we don't see any reason it shouldn't. -Besides, it will run on Windows Linux Subsistems. - -We apologise for the discomfort. - - -<!-- ## Hacktoberfest -Hacktoberfest participants, welcome! -We have some issues for you [here](https://github.com/physiopy/<reponame>/issues?q=is%3Aissue+is%3Aopen+label%3Ahacktoberfest)! -However, feel free to tackle any issue you'd like. Depending on the issue and extent of contribution, Hacktoberfest related PRs might not count toward being listed as contributors and authors (unless there is the specific interest). You can ask about it in the issue itself! -Feel free to ask help to the contributors over gitter, happy coding and (hopefully) enjoy hour tee (or tree)! - -## The BrainWeb -BrainWeb participants, welcome! -We have a milestone [here](https://github.com/physiopy/<reponame>/milestone/5) as a collection of issues you could work on with our help. -Check the issues with a `BrainWeb` label. Of course, they are only suggestions, so feel free to tackle any issue you want, even open new ones! -You can also contact us on Gitter, in the BrainHack Mattermost (<a href="https://mattermost.brainhack.org/brainhack/channels/physiopy">#physiopy</a>), and don't hesitate to contact [Stefano](https://github.com/smoia) in other ways to jump in the development! ---> **We're looking for code contributors,** but any suggestion/bug report is welcome! Feel free to open issues! @@ -106,18 +49,5 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d License ------- -This template is released under The Unlicense. Commented here below a copy of the Apache 2.0 Licence, adopted by Physiopy. -Remember to change the licence of your repository as soon as you adopt the template. -<!-- Copyright 2019-2020, The Physiopy community. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --> +Copyright 2019-2024, The Physiopy Community +This repository and all its content are licensed under the CC-BY-SA-4.0 license. \ No newline at end of file diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 4f18d83..0000000 --- a/codecov.yml +++ /dev/null @@ -1,43 +0,0 @@ -codecov: - branch: master - strict_yaml_branch: master - require_ci_to_pass: yes - bot: "codecov-io" - max_report_age: 48 - disable_default_path_fixes: no - -coverage: - precision: 2 - round: down - range: "60...90" - -parsers: - gcov: - branch_detection: - conditional: yes - loop: yes - method: no - macro: no - -ignore: - - "docs" - - "tests" - - "_version.py" - - "__init__.py" - - "**/__init__.py" - - "due.py" - - ".*rc" - - "versioneer.py" - - "setup.py" - - "*/tests" - - "*/_version.py" - - "*/__init__.py" - - "*/**/__init__.py" - - "*/due.py" - - "*/.*rc" - - "*/versioneer.py" - - "*/setup.py" -comment: - layout: "reach,diff,flags,tree" - behavior: default - require_changes: no diff --git a/docs/Makefile b/docs/Makefile index d0c3cbf..798a81b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,8 +5,9 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build +SPHINXPROJ = physiopycommunityguidelines SOURCEDIR = source -BUILDDIR = build +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/__init__.py b/docs/__init__.py new file mode 100644 index 0000000..17f732b --- /dev/null +++ b/docs/__init__.py @@ -0,0 +1,9 @@ +"""Just to get a version.""" + +import os, sys + +sys.path.insert(0, os.path.abspath(os.path.pardir)) +from _version import get_versions + +__version__ = get_versions()["version"] +del get_versions diff --git a/docs/_version.py b/docs/_version.py new file mode 100644 index 0000000..3291e61 --- /dev/null +++ b/docs/_version.py @@ -0,0 +1,556 @@ +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. Generated by +# versioneer-0.18 (https://github.com/warner/python-versioneer) + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys + + +def get_keywords(): + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "$Format:%d$" + git_full = "$Format:%H$" + git_date = "$Format:%ci$" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + +def get_config(): + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "pep440" + cfg.tag_prefix = "" + cfg.parentdir_prefix = "" + cfg.versionfile_source = "nigsp/_version.py" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY = {} +HANDLERS = {} + + +def register_vcs_handler(vcs, method): # decorator + """Decorator to mark a method as the handler for a particular VCS.""" + + def decorate(f): + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + + return decorate + + +def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=None): + """Call the given command(s).""" + assert isinstance(commands, list) + p = None + for c in commands: + try: + dispcmd = str([c] + args) + # remember shell=False, so use git.cmd on windows, not just git + p = subprocess.Popen( + [c] + args, + cwd=cwd, + env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr else None), + ) + break + except EnvironmentError: + e = sys.exc_info()[1] + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = p.communicate()[0].strip() + if sys.version_info[0] >= 3: + stdout = stdout.decode() + if p.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, p.returncode + return stdout, p.returncode + + +def versions_from_parentdir(parentdir_prefix, root, verbose): + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for i in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return { + "version": dirname[len(parentdir_prefix) :], + "full-revisionid": None, + "dirty": False, + "error": None, + "date": None, + } + else: + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print( + "Tried directories %s but none started with prefix %s" + % (str(rootdirs), parentdir_prefix) + ) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs): + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords = {} + try: + f = open(versionfile_abs, "r") + for line in f.readlines(): + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + f.close() + except EnvironmentError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords(keywords, tag_prefix, verbose): + """Get version information from git keywords.""" + if not keywords: + raise NotThisMethod("no keywords at all, weird") + date = keywords.get("date") + if date is not None: + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = set([r.strip() for r in refnames.strip("()").split(",")]) + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = set([r[len(TAG) :] for r in refs if r.startswith(TAG)]) + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = set([r for r in refs if re.search(r"\d", r)]) + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix) :] + if verbose: + print("picking %s" % r) + return { + "version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, + "error": None, + "date": date, + } + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return { + "version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, + "error": "no suitable tags", + "date": None, + } + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = run_command( + GITS, + [ + "describe", + "--tags", + "--dirty", + "--always", + "--long", + "--match", + "%s*" % tag_prefix, + ], + cwd=root, + ) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[: git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( + full_tag, + tag_prefix, + ) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix) :] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"], cwd=root) + pieces["distance"] = int(count_out) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[ + 0 + ].strip() + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces): + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces): + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_pre(pieces): + """TAG[.post.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post.devDISTANCE + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += ".post.dev%d" % pieces["distance"] + else: + # exception #1 + rendered = "0.post.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces): + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_old(pieces): + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Eexceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces): + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces): + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces, style): + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return { + "version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None, + } + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return { + "version": rendered, + "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], + "error": None, + "date": pieces.get("date"), + } + + +def get_versions(): + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for i in cfg.versionfile_source.split("/"): + root = os.path.dirname(root) + except NameError: + return { + "version": "0+unknown", + "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None, + } + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return { + "version": "0+unknown", + "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", + "date": None, + } diff --git a/docs/make.bat b/docs/make.bat index 747ffb7..8084272 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -1,35 +1,35 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -%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.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd +@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.https://www.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 diff --git a/docs/requirements.txt b/docs/requirements.txt index bb253eb..3f900f1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,13 @@ -sphinx==7.1.2 -sphinx-rtd-theme==1.3.0 -myst-parser==2.0.0 \ No newline at end of file +furo +memory-profiler +myst-parser +numpydoc +sphinx>=2.0 +sphinx-argparse +sphinxcontrib-apidoc +sphinxcontrib-bibtex +sphinx-copybutton +sphinx-design +sphinx-gallery +sphinx-issues +sphinx_rtd_theme \ No newline at end of file diff --git a/docs/source/_static/css/style.css b/docs/source/_static/css/style.css new file mode 100644 index 0000000..f376b1e --- /dev/null +++ b/docs/source/_static/css/style.css @@ -0,0 +1,20 @@ +div.sphx-glr-download-link-note { + height: 0px; + visibility: hidden; +} + +:root { + --icon--version: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2Zm-.5-2a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5V4a.5.5 0 0 0-.5-.5H10a.5.5 0 0 0-.5.5ZM6.17 4.165a.75.75 0 0 1-.335 1.006c-.228.114-.295.177-.315.201a.035.035 0 0 0-.008.016.423.423 0 0 0-.012.112v13c0 .07.008.102.012.112a.03.03 0 0 0 .008.016c.02.024.087.087.315.201a.749.749 0 1 1-.67 1.342c-.272-.136-.58-.315-.81-.598C4.1 19.259 4 18.893 4 18.5v-13c0-.393.1-.759.355-1.073.23-.283.538-.462.81-.598a.75.75 0 0 1 1.006.336ZM2.15 5.624a.75.75 0 0 1-.274 1.025c-.15.087-.257.17-.32.245C1.5 6.96 1.5 6.99 1.5 7v10c0 .01 0 .04.056.106.063.074.17.158.32.245a.75.75 0 0 1-.752 1.298C.73 18.421 0 17.907 0 17V7c0-.907.73-1.42 1.124-1.65a.75.75 0 0 1 1.025.274Z"/></svg>'); +} +.admonition.version { + border-color: var(--color-admonition-title--important); +} +.admonition.version > .admonition-title { + background-color: var(--color-admonition-title-background--important); + border-color: var(--color-admonition-title--important); +} +.admonition.version > .admonition-title::before { + background-color: var(--color-admonition-title--important); + -webkit-mask-image: var(--icon--version); + mask-image: var(--icon--version); +} \ No newline at end of file diff --git a/docs/source/_static/logos/favicon.txt b/docs/source/_static/logos/favicon.txt new file mode 100644 index 0000000..781c366 --- /dev/null +++ b/docs/source/_static/logos/favicon.txt @@ -0,0 +1,17 @@ +<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> +<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png"> +<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> +<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png"> +<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png"> +<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png"> +<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png"> +<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png"> +<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"> +<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png"> +<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> +<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"> +<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> +<link rel="manifest" href="/manifest.json"> +<meta name="msapplication-TileColor" content="#ffffff"> +<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> +<meta name="theme-color" content="#ffffff"> diff --git a/docs/source/_static/logos/favicon/android-icon-144x144.png b/docs/source/_static/logos/favicon/android-icon-144x144.png new file mode 100644 index 0000000..755d5df Binary files /dev/null and b/docs/source/_static/logos/favicon/android-icon-144x144.png differ diff --git a/docs/source/_static/logos/favicon/android-icon-192x192.png b/docs/source/_static/logos/favicon/android-icon-192x192.png new file mode 100644 index 0000000..a206c42 Binary files /dev/null and b/docs/source/_static/logos/favicon/android-icon-192x192.png differ diff --git a/docs/source/_static/logos/favicon/android-icon-36x36.png b/docs/source/_static/logos/favicon/android-icon-36x36.png new file mode 100644 index 0000000..7c2f369 Binary files /dev/null and b/docs/source/_static/logos/favicon/android-icon-36x36.png differ diff --git a/docs/source/_static/logos/favicon/android-icon-48x48.png b/docs/source/_static/logos/favicon/android-icon-48x48.png new file mode 100644 index 0000000..fed980d Binary files /dev/null and b/docs/source/_static/logos/favicon/android-icon-48x48.png differ diff --git a/docs/source/_static/logos/favicon/android-icon-72x72.png b/docs/source/_static/logos/favicon/android-icon-72x72.png new file mode 100644 index 0000000..8156b48 Binary files /dev/null and b/docs/source/_static/logos/favicon/android-icon-72x72.png differ diff --git a/docs/source/_static/logos/favicon/android-icon-96x96.png b/docs/source/_static/logos/favicon/android-icon-96x96.png new file mode 100644 index 0000000..46e3875 Binary files /dev/null and b/docs/source/_static/logos/favicon/android-icon-96x96.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-114x114.png b/docs/source/_static/logos/favicon/apple-icon-114x114.png new file mode 100644 index 0000000..5784679 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-114x114.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-120x120.png b/docs/source/_static/logos/favicon/apple-icon-120x120.png new file mode 100644 index 0000000..188b918 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-120x120.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-144x144.png b/docs/source/_static/logos/favicon/apple-icon-144x144.png new file mode 100644 index 0000000..755d5df Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-144x144.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-152x152.png b/docs/source/_static/logos/favicon/apple-icon-152x152.png new file mode 100644 index 0000000..5b4e8fc Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-152x152.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-180x180.png b/docs/source/_static/logos/favicon/apple-icon-180x180.png new file mode 100644 index 0000000..4b6e2e4 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-180x180.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-57x57.png b/docs/source/_static/logos/favicon/apple-icon-57x57.png new file mode 100644 index 0000000..219d264 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-57x57.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-60x60.png b/docs/source/_static/logos/favicon/apple-icon-60x60.png new file mode 100644 index 0000000..bcf790b Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-60x60.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-72x72.png b/docs/source/_static/logos/favicon/apple-icon-72x72.png new file mode 100644 index 0000000..8156b48 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-72x72.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-76x76.png b/docs/source/_static/logos/favicon/apple-icon-76x76.png new file mode 100644 index 0000000..1d31d41 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-76x76.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon-precomposed.png b/docs/source/_static/logos/favicon/apple-icon-precomposed.png new file mode 100644 index 0000000..31a20b7 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon-precomposed.png differ diff --git a/docs/source/_static/logos/favicon/apple-icon.png b/docs/source/_static/logos/favicon/apple-icon.png new file mode 100644 index 0000000..31a20b7 Binary files /dev/null and b/docs/source/_static/logos/favicon/apple-icon.png differ diff --git a/docs/source/_static/logos/favicon/browserconfig.xml b/docs/source/_static/logos/favicon/browserconfig.xml new file mode 100644 index 0000000..7d453d3 --- /dev/null +++ b/docs/source/_static/logos/favicon/browserconfig.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig> diff --git a/docs/source/_static/logos/favicon/favicon-16x16.png b/docs/source/_static/logos/favicon/favicon-16x16.png new file mode 100644 index 0000000..2ed4c2e Binary files /dev/null and b/docs/source/_static/logos/favicon/favicon-16x16.png differ diff --git a/docs/source/_static/logos/favicon/favicon-32x32.png b/docs/source/_static/logos/favicon/favicon-32x32.png new file mode 100644 index 0000000..2bf97cd Binary files /dev/null and b/docs/source/_static/logos/favicon/favicon-32x32.png differ diff --git a/docs/source/_static/logos/favicon/favicon-96x96.png b/docs/source/_static/logos/favicon/favicon-96x96.png new file mode 100644 index 0000000..46e3875 Binary files /dev/null and b/docs/source/_static/logos/favicon/favicon-96x96.png differ diff --git a/docs/source/_static/logos/favicon/favicon.ico b/docs/source/_static/logos/favicon/favicon.ico new file mode 100644 index 0000000..835e9b8 Binary files /dev/null and b/docs/source/_static/logos/favicon/favicon.ico differ diff --git a/docs/source/_static/logos/favicon/manifest.json b/docs/source/_static/logos/favicon/manifest.json new file mode 100644 index 0000000..758f8d2 --- /dev/null +++ b/docs/source/_static/logos/favicon/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "\/android-icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/android-icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/android-icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/android-icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/android-icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/android-icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} diff --git a/docs/source/_static/logos/favicon/ms-icon-144x144.png b/docs/source/_static/logos/favicon/ms-icon-144x144.png new file mode 100644 index 0000000..755d5df Binary files /dev/null and b/docs/source/_static/logos/favicon/ms-icon-144x144.png differ diff --git a/docs/source/_static/logos/favicon/ms-icon-150x150.png b/docs/source/_static/logos/favicon/ms-icon-150x150.png new file mode 100644 index 0000000..debaf67 Binary files /dev/null and b/docs/source/_static/logos/favicon/ms-icon-150x150.png differ diff --git a/docs/source/_static/logos/favicon/ms-icon-310x310.png b/docs/source/_static/logos/favicon/ms-icon-310x310.png new file mode 100644 index 0000000..7f2d563 Binary files /dev/null and b/docs/source/_static/logos/favicon/ms-icon-310x310.png differ diff --git a/docs/source/_static/logos/favicon/ms-icon-70x70.png b/docs/source/_static/logos/favicon/ms-icon-70x70.png new file mode 100644 index 0000000..239e103 Binary files /dev/null and b/docs/source/_static/logos/favicon/ms-icon-70x70.png differ diff --git a/docs/source/_static/logos/favicon/onlyBrain.jpg b/docs/source/_static/logos/favicon/onlyBrain.jpg new file mode 100644 index 0000000..2fc9487 Binary files /dev/null and b/docs/source/_static/logos/favicon/onlyBrain.jpg differ diff --git a/docs/source/_static/logos/favicon/onlyBrain.png b/docs/source/_static/logos/favicon/onlyBrain.png new file mode 100644 index 0000000..31607d8 Binary files /dev/null and b/docs/source/_static/logos/favicon/onlyBrain.png differ diff --git a/docs/source/_static/logos/phys2bids_card.jpg b/docs/source/_static/logos/phys2bids_card.jpg new file mode 100644 index 0000000..dcfc3c1 Binary files /dev/null and b/docs/source/_static/logos/phys2bids_card.jpg differ diff --git a/docs/source/_static/logos/phys2bids_logo_1280x649.png b/docs/source/_static/logos/phys2bids_logo_1280x649.png new file mode 100644 index 0000000..63880c7 Binary files /dev/null and b/docs/source/_static/logos/phys2bids_logo_1280x649.png differ diff --git a/docs/source/_static/logos/phys2bids_logo_2000x400.png b/docs/source/_static/logos/phys2bids_logo_2000x400.png new file mode 100644 index 0000000..f12c405 Binary files /dev/null and b/docs/source/_static/logos/phys2bids_logo_2000x400.png differ diff --git a/docs/source/_static/logos/phys2bids_negativeReadTheDocs_500x150.png b/docs/source/_static/logos/phys2bids_negativeReadTheDocs_500x150.png new file mode 100644 index 0000000..815be7e Binary files /dev/null and b/docs/source/_static/logos/phys2bids_negativeReadTheDocs_500x150.png differ diff --git a/docs/source/_static/logos/physiopy_logo_1280x640.png b/docs/source/_static/logos/physiopy_logo_1280x640.png new file mode 100644 index 0000000..d92cb13 Binary files /dev/null and b/docs/source/_static/logos/physiopy_logo_1280x640.png differ diff --git a/docs/source/_static/logos/physiopy_logo_cut.png b/docs/source/_static/logos/physiopy_logo_cut.png new file mode 100644 index 0000000..3d26b67 Binary files /dev/null and b/docs/source/_static/logos/physiopy_logo_cut.png differ diff --git a/docs/source/_static/logos/physiopy_logo_negative_cut.png b/docs/source/_static/logos/physiopy_logo_negative_cut.png new file mode 100644 index 0000000..0deb28d Binary files /dev/null and b/docs/source/_static/logos/physiopy_logo_negative_cut.png differ diff --git a/docs/source/_static/logos/physiopy_negativeReadTheDocs_500x150.png b/docs/source/_static/logos/physiopy_negativeReadTheDocs_500x150.png new file mode 100644 index 0000000..767b49c Binary files /dev/null and b/docs/source/_static/logos/physiopy_negativeReadTheDocs_500x150.png differ diff --git a/docs/source/conf.py b/docs/source/conf.py index 0e8317c..6802046 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,41 +1,227 @@ # Configuration file for the Sphinx documentation builder. # -# For the full list of built-in configuration values, see the documentation: +# 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 -------------------------------------------------------------- + +# 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('..')) +from sphinx_gallery.sorting import FileNameSortKey + +sys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), os.path.pardir, os.path.pardir))) +from docs import __version__ + # -- Project information ----------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'physiopy-community-guidelines' -copyright = '2024, physiopy community' -author = 'Physiopy community' +project = "Physiopy Community Guidelines" +copyright = "2019-2024, The Physiopy Community" +author = "The Physiopy Community" + + +# The short X.Y version +version = __version__ +# The full version, including alpha/beta/rc tags +release = __version__ +package = "Physiopy Community Guidelines" +gh_url = "https://github.com/physiopy/physiopy-community-guidelines" # -- General configuration --------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +needs_sphinx = "2.0" # based on setup.cfg requirements + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones.import sphinx_rtd_theme # noqa extensions = [ - 'sphinx_rtd_theme', - 'myst_parser', - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.napoleon', + "sphinx.ext.apidoc", + "sphinx.ext.autodoc", + "sphinx.ext.autosectionlabel", + "sphinx.ext.autosummary", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.viewcode", + "myst_parser", + "numpydoc", + "sphinxarg.ext", + "sphinxcontrib.bibtex", + "sphinxcontrib.apidoc", + "sphinx_copybutton", + "sphinx_design", + "sphinx_gallery.gen_gallery", + "sphinx_issues", ] -templates_path = ['_templates'] -exclude_patterns = [] +numpydoc_show_class_members = False +autoclass_content = "class" +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +source_suffix = { + ".rst": "restructuredtext", + ".txt": "markdown", + ".md": "markdown", +} + +language = "en" + +# 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", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"] + +# Sphinx will warn about all references where the target cannot be found. +nitpicky = True +nitpick_ignore = [] # -- Options for HTML output ------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'sphinx_rtd_theme' -html_static_path = ['_static'] +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. + +html_theme = "furo" +html_show_sourcelink = False +html_show_sphinx = False + +# 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_css_files = [ + "css/style.css", + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css", +] + +# 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 = { + "light_logo": "logos/physiopy_logo_cut.png", + "dark_logo": "logos/physiopy_logo_negative_cut.png", + "footer_icons": [ + { + "name": "GitHub", + "url": gh_url, + "html": """ + <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16"> + <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path> + </svg> + """, + "class": "", + }, + ], + "sidebar_hide_name": True, +} + +html_favicon = '_static/logos/favicon/onlyBrain.png' + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = "physiopy-community-guidelines" + +# -- intersphinx ------------------------------------------------------------- +intersphinx_mapping = { + "nibabel": ("https://nipy.org/nibabel/", None), + "numpy": ("https://numpy.org/doc/stable", None), + "python": ("https://docs.python.org/3", None), +} +intersphinx_timeout = 5 + +# -- sphinx-issues ----------------------------------------------------------- +issues_github_path = gh_url.split("https://github.com/")[-1] + +# -- autosectionlabels ------------------------------------------------------- +autosectionlabel_prefix_document = True # -- Options for myst_parser ------------------------------------------------- -myst_enable_extensions = ["colon_fence"] \ No newline at end of file +myst_enable_extensions = ["colon_fence"] + +# -- sphinxcontrib-bibtex ---------------------------------------------------- +bibtex_bibfiles = [] + +# -- numpydoc ---------------------------------------------------------------- +numpydoc_class_members_toctree = False +numpydoc_attributes_as_param_list = False + +# x-ref +numpydoc_xref_param_type = True +numpydoc_xref_aliases = { + # Matplotlib + "Axes": "matplotlib.axes.Axes", + "Figure": "matplotlib.figure.Figure", + # Nibabel + "Nifti1Image": "nibabel.nifti1.Nifti1Image", + # Numpy + "array": "numpy.ndarray", + # Python + "bool": ":class:`python:bool`", + "Path": "pathlib.Path", + "TextIO": "io.TextIOBase", +} +numpydoc_xref_ignore = { + "of", + "optional", + "or", + "shape", +} + +# validation +# https://numpydoc.readthedocs.io/en/latest/validation.html#validation-checks +error_ignores = { + "GL01", # docstring should start in the line immediately after the quotes + "EX01", # section 'Examples' not found + "ES01", # no extended summary found + "SA01", # section 'See Also' not found + "RT02", # The first line of the Returns section should contain only the type, unless multiple values are being returned # noqa +} +numpydoc_validate = True +numpydoc_validation_checks = {"all"} | set(error_ignores) +numpydoc_validation_exclude = { # regex to ignore during docstring check + r"\.__getitem__", + r"\.__contains__", + r"\.__hash__", + r"\.__mul__", + r"\.__sub__", + r"\.__add__", + r"\.__iter__", + r"\.__div__", + r"\.__neg__", +} + +# -- sphinx-gallery ---------------------------------------------------------- +sphinx_gallery_conf = { + "backreferences_dir": "generated/backreferences", + "doc_module": (f"{package}",), + "examples_dirs": [], # ["../tutorials"], + "exclude_implicit_doc": {}, # set + "filename_pattern": r"\d{2}_", + "gallery_dirs": [], # ["generated/tutorials"], + "line_numbers": False, + "plot_gallery": True, + "reference_url": {f"{package}": None}, + "remove_config_comments": True, + "show_memory": True, + "within_subsection_order": FileNameSortKey, +} + +# -- Final Setup ------------------------------------------------------------- + + +# https://github.com/rtfd/sphinx_rtd_theme/issues/117 +# launch setup +def setup(app): # noqa + app.add_css_file("theme_overrides.css") + app.add_js_file("https://cdn.rawgit.com/chrisfilo/zenodo.js/v0.1/zenodo.js") diff --git a/docs/source/index.rst b/docs/source/index.rst index d24d215..e31b185 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,10 +3,68 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Best Practices for Collecting Physiological Data -================================================ +Community Practices for Collecting Physiological Data +===================================================== -.. toctree:: - :maxdepth: 1 +|Latest version| |Release date| |Auto Release| - best_practices.md +|Documentation Status| |Latest DOI| |Licensed CC-BY-SA 4.0| + +|All Contributors| + + +.. admonition:: Current Version + :class: version + + You are currently reading version |version|. + The latest version is |Latest version inline|. + + +.. note:: + + Full documentation is currently being screened for approval! + + + +.. |Latest version| image:: https://img.shields.io/github/v/release/physiopy/physiopy-community-guidelines?style=flat&logo=github&sort=semver + :target: https://github.com/physiopy/physiopy-community-guidelines/releases +.. |Release date| image:: https://img.shields.io/github/release-date/physiopy/physiopy-community-guidelines?style=flat&logo=github + :target: https://github.com/physiopy/physiopy-community-guidelines/releases +.. |Auto Release| image:: https://img.shields.io/badge/release-auto.svg?style=flat&colorA=888888&colorB=9B065A&label=auto&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACzElEQVR4AYXBW2iVBQAA4O+/nLlLO9NM7JSXasko2ASZMaKyhRKEDH2ohxHVWy6EiIiiLOgiZG9CtdgG0VNQoJEXRogVgZYylI1skiKVITPTTtnv3M7+v8UvnG3M+r7APLIRxStn69qzqeBBrMYyBDiL4SD0VeFmRwtrkrI5IjP0F7rjzrSjvbTqwubiLZffySrhRrSghBJa8EBYY0NyLJt8bDBOtzbEY72TldQ1kRm6otana8JK3/kzN/3V/NBPU6HsNnNlZAz/ukOalb0RBJKeQnykd7LiX5Fp/YXuQlfUuhXbg8Di5GL9jbXFq/tLa86PpxPhAPrwCYaiorS8L/uuPJh1hZFbcR8mewrx0d7JShr3F7pNW4vX0GRakKWVk7taDq7uPvFWw8YkMcPVb+vfvfRZ1i7zqFwjtmFouL72y6C/0L0Ie3GvaQXRyYVB3YZNE32/+A/D9bVLcRB3yw3hkRCdaDUtFl6Ykr20aaLvKoqIXUdbMj6GFzAmdxfWx9iIRrkDr1f27cFONGMUo/gRI/jNbIMYxJOoR1cY0OGaVPb5z9mlKbyJP/EsdmIXvsFmM7Ql42nEblX3xI1BbYbTkXCqRnxUbgzPo4T7sQBNeBG7zbAiDI8nWfZDhQWYCG4PFr+HMBQ6l5VPJybeRyJXwsdYJ/cRnlJV0yB4ZlUYtFQIkMZnst8fRrPcKezHCblz2IInMIkPzbbyb9mW42nWInc2xmE0y61AJ06oGsXL5rcOK1UdCbEXiVwNXsEy/6+EbaiVG8eeEAfxvaoSBnCH61uOD7BS1Ul8ESHBKWxCrdyd6EYNKihgEVrwOAbQruoytuBYIFfAc3gVN6iawhjKyNCEpYhVJXgbOzARyaU4hCtYizq5EI1YgiUoIlT1B7ZjByqmRWYbwtdYjoWoN7+LOIQefIqKawLzK6ID69GGpQgwhhEcwGGUzfEPAiPqsCXadFsAAAAASUVORK5CYII= + :target: https://github.com/intuit/auto + +.. |Documentation Status| image:: https://img.shields.io/readthedocs/physiopy-community-guidelines?style=flat&label=readthedocs&logo=readthedocs + :target: https://physiopy-community-guidelines.readthedocs.io/en/latest/?badge=latest +.. |Latest DOI| image:: https://zenodo.org/ + :target: https://zenodo.org/ +.. |Licensed CC-BY-SA 4.0| image:: https://img.shields.io/github/license/physiopy/physiopy-community-guidelines?style=flat&logo=apache + :target: https://github.com/physiopy/physiopy-community-guidelines/blob/master/LICENSE + +.. |All Contributors| image:: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat + :target: #contributors + + +.. |Latest version inline| image:: https://img.shields.io/github/v/release/physiopy/physiopy-community-guidelines?style=flat-square&label=%20&color=%2300bfa5 + :target: https://physiopy-community-guidelines.readthedocs.io/en/latest/ + + + +.. dropdown:: Full Index + + .. toctree:: + :caption: Community Practices + :maxdepth: 2 + + Community Practices <best_practices> + Licence <https://github.com/physiopy/physiopy-community-guidelines?tab=CC-BY-SA-4.0-1-ov-file#readme> + Changelog <https://github.com/physiopy/physiopy-community-guidelines/releases> + + .. toctree:: + :caption: The Physiopy Community + :maxdepth: 1 + + The Physiopy Community <https://physiopy.github.io/> + The Team <https://physiopy.github.io/community/team/> + How to Contribute <https://physiopy.github.io/community/gettingstarted/> + Contributor Guide <https://physiopy.github.io/community/contributor-guide/> + Code of Conduct <https://physiopy.github.io/community/CODE_OF_CONDUCT/> diff --git a/requirements.txt b/requirements.txt index 13d832c..3f900f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,13 @@ -numpy>=1.9.3 +furo +memory-profiler +myst-parser +numpydoc +sphinx>=2.0 +sphinx-argparse +sphinxcontrib-apidoc +sphinxcontrib-bibtex +sphinx-copybutton +sphinx-design +sphinx-gallery +sphinx-issues +sphinx_rtd_theme \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 01a1f92..ca12e15 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,130 +1,52 @@ [metadata] -name = <reponame> -url = https://github.com/physiopy/<reponame> -download_url = https://github.com/physiopy/<reponame> +name = physiopy_community_guidelines +url = https://github.com/physiopy/physiopy-community-guidelines +download_url = https://github.com/physiopy/physiopy-community-guidelines author = Physiopy community maintainer = Stefano Moia -maintainer_email = s.moia.research@gmail.com +maintainer_email = physiopy.community@gmail.com classifiers = Development Status :: 1 - Planning Intended Audience :: Science/Research - License :: OSI Approved :: <license> - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 -license = <license> -description = <Description>. + License :: CC-BY-SA-4.0 +license = CC-BY-SA-4.0 +description = The community guidelines documentation. long_description = file:README.md long_description_content_type = text/markdown; charset=UTF-8 platforms = OS Independent provides = - <reponame> + physiopy_community_guidelines [options] -python_requires = >=3.6 +python_requires = >=3.8 install_requires = - numpy> - duecredit -tests_require = - pytest >=5.3 -test_suite = pytest + furo + memory-profiler + myst-parser + numpydoc + sphinx>=2.0 + sphinx-argparse + sphinxcontrib-apidoc + sphinxcontrib-bibtex + sphinx-copybutton + sphinx-design + sphinx-gallery + sphinx-issues + sphinx_rtd_theme zip_safe = False packages = find: include_package_data = True [options.extras_require] -extra_1 = - numpy -extra_2 = - numpy -all = - %(extra_1)s - %(extra_2)s -doc = - sphinx>=2.0 - sphinx-argparse - sphinx_rtd_theme - myst-parser -style = - flake8>=4.0 - black<23.0.0 - isort<6.0.0 - pydocstyle -test = - %(all)s - %(style)s - pytest >=5.3 - pytest-cov - coverage devtools = pre-commit dev = %(devtools)s - %(doc)s - %(test)s - -[options.entry_points] -console_scripts = - <reponame>=<reponame>.workflow:_main - -[flake8] -doctest = True -exclude = - _version.py - ./<reponame>/cli/__init__.py - ./<reponame>/tests/* - versioneer.py -ignore = E126, E402, W503, F401, F811 -max-line-length = 88 -extend-ignore = E203, E501 -extend-select = B950 -per-file-ignores = - workflow.py:D401 - -[isort] -profile = black -skip_gitignore = true -extend_skip = - .autorc - .coverage* - .readthedocs.yml - .zenodo.json - codecov.yml - setup.py - versioneer.py - <reponame>/_version.py -skip_glob = - docs/* - -[pydocstyle] -convention = numpy -match = - <reponame>/*.py -match_dir = <reponame>/[^tests]* - - -[tool:pytest] -doctest_optionflags = NORMALIZE_WHITESPACE -xfail_strict = true -addopts = -rx - -[coverage:run] -branch = True -omit = - <reponame>/tests/* - docs/* - setup.py - versioneer.py - doi.py - __init__.py - */__init__.py - */*/__init__.py [versioneer] VCS = git style = pep440 -versionfile_source = <reponame>/_version.py -versionfile_build = <reponame>/_version.py +versionfile_source = docs/_version.py +versionfile_build = docs/_version.py tag_prefix = parentdir_prefix = diff --git a/setup.py b/setup.py index 895a68b..921725a 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ if __name__ == "__main__": setup( - name="nigsp", + name="physiopy_community_guidelines", setup_requires=SETUP_REQUIRES, version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(),