From 8da6317254cd56d028fdddc51e4fa3482f179c42 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Thu, 31 Oct 2024 23:59:22 -0400 Subject: [PATCH 01/12] Add pre-commit, remove rever, run_test, setup.py, gitattributes --- .gitattributes | 1 - .github/ISSUE_TEMPLATE/bug_feature.md | 16 +++++ .github/ISSUE_TEMPLATE/release_checklist.md | 22 +++++++ .../workflows/build-wheel-release-upload.yml | 16 +++++ .github/workflows/check-news-item.yml | 12 ++++ .github/workflows/docs.yml | 43 ------------- .github/workflows/main.yml | 60 ------------------- .../matrix-and-codecov-on-merge-to-main.yml | 21 +++++++ .github/workflows/pre-commit.yml | 19 ------ .github/workflows/tests-on-pr.yml | 16 +++++ .pre-commit-config.yaml | 11 +++- .travis.yml | 35 ----------- rever.xsh | 13 ---- run_tests.py | 16 ----- setup.py | 39 ------------ {diffpy => src}/__init__.py | 0 .../nmf_mapping => src/diffpy}/__init__.py | 0 .../diffpy}/nmf_mapping/main.py | 0 .../diffpy}/nmf_mapping/nmf_mapping_code.py | 0 {diffpy/nmf_mapping => src/diffpy}/version.py | 0 ...8-061431_e3086a_0001_dark_corrected_img.gr | 0 ...,63_degK_33b844_0063_dark_corrected_img.gr | 0 .../data/example_phases/LiO2.cif | 0 .../data/example_phases/RuO2_tetragonal.cif | 0 .../Ru_mp-8639_conventional_standard.cif | 0 .../data/synthetic_r_vs_gr/synthetic0.gr | 0 .../data/synthetic_r_vs_gr/synthetic1.gr | 0 .../data/synthetic_r_vs_gr/synthetic10.gr | 0 .../data/synthetic_r_vs_gr/synthetic11.gr | 0 .../data/synthetic_r_vs_gr/synthetic12.gr | 0 .../data/synthetic_r_vs_gr/synthetic13.gr | 0 .../data/synthetic_r_vs_gr/synthetic14.gr | 0 .../data/synthetic_r_vs_gr/synthetic15.gr | 0 .../data/synthetic_r_vs_gr/synthetic16.gr | 0 .../data/synthetic_r_vs_gr/synthetic17.gr | 0 .../data/synthetic_r_vs_gr/synthetic18.gr | 0 .../data/synthetic_r_vs_gr/synthetic19.gr | 0 .../data/synthetic_r_vs_gr/synthetic2.gr | 0 .../data/synthetic_r_vs_gr/synthetic20.gr | 0 .../data/synthetic_r_vs_gr/synthetic21.gr | 0 .../data/synthetic_r_vs_gr/synthetic22.gr | 0 .../data/synthetic_r_vs_gr/synthetic23.gr | 0 .../data/synthetic_r_vs_gr/synthetic24.gr | 0 .../data/synthetic_r_vs_gr/synthetic25.gr | 0 .../data/synthetic_r_vs_gr/synthetic26.gr | 0 .../data/synthetic_r_vs_gr/synthetic27.gr | 0 .../data/synthetic_r_vs_gr/synthetic28.gr | 0 .../data/synthetic_r_vs_gr/synthetic29.gr | 0 .../data/synthetic_r_vs_gr/synthetic3.gr | 0 .../data/synthetic_r_vs_gr/synthetic30.gr | 0 .../data/synthetic_r_vs_gr/synthetic31.gr | 0 .../data/synthetic_r_vs_gr/synthetic32.gr | 0 .../data/synthetic_r_vs_gr/synthetic33.gr | 0 .../data/synthetic_r_vs_gr/synthetic34.gr | 0 .../data/synthetic_r_vs_gr/synthetic35.gr | 0 .../data/synthetic_r_vs_gr/synthetic36.gr | 0 .../data/synthetic_r_vs_gr/synthetic37.gr | 0 .../data/synthetic_r_vs_gr/synthetic38.gr | 0 .../data/synthetic_r_vs_gr/synthetic39.gr | 0 .../data/synthetic_r_vs_gr/synthetic4.gr | 0 .../data/synthetic_r_vs_gr/synthetic40.gr | 0 .../data/synthetic_r_vs_gr/synthetic41.gr | 0 .../data/synthetic_r_vs_gr/synthetic42.gr | 0 .../data/synthetic_r_vs_gr/synthetic43.gr | 0 .../data/synthetic_r_vs_gr/synthetic44.gr | 0 .../data/synthetic_r_vs_gr/synthetic45.gr | 0 .../data/synthetic_r_vs_gr/synthetic46.gr | 0 .../data/synthetic_r_vs_gr/synthetic47.gr | 0 .../data/synthetic_r_vs_gr/synthetic48.gr | 0 .../data/synthetic_r_vs_gr/synthetic49.gr | 0 .../data/synthetic_r_vs_gr/synthetic5.gr | 0 .../data/synthetic_r_vs_gr/synthetic6.gr | 0 .../data/synthetic_r_vs_gr/synthetic7.gr | 0 .../data/synthetic_r_vs_gr/synthetic8.gr | 0 .../data/synthetic_r_vs_gr/synthetic9.gr | 0 .../output_1/component_index_vs_RE_value.json | 0 .../component_index_vs_pratio_col.json | 0 .../output_1/x_index_vs_y_col_components.json | 0 .../output_2/component_index_vs_RE_value.json | 0 .../component_index_vs_pratio_col.json | 0 .../output_2/x_index_vs_y_col_components.json | 0 .../output_3/component_index_vs_RE_value.json | 0 .../component_index_vs_pratio_col.json | 0 .../output_3/x_index_vs_y_col_components.json | 0 .../tests => tests}/test_NMF_analysis_code.py | 0 .../tests => tests}/test_load_data.py | 0 86 files changed, 113 insertions(+), 227 deletions(-) delete mode 100644 .gitattributes create mode 100644 .github/ISSUE_TEMPLATE/bug_feature.md create mode 100644 .github/ISSUE_TEMPLATE/release_checklist.md create mode 100644 .github/workflows/build-wheel-release-upload.yml create mode 100644 .github/workflows/check-news-item.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/matrix-and-codecov-on-merge-to-main.yml delete mode 100644 .github/workflows/pre-commit.yml create mode 100644 .github/workflows/tests-on-pr.yml delete mode 100644 .travis.yml delete mode 100644 rever.xsh delete mode 100644 run_tests.py delete mode 100644 setup.py rename {diffpy => src}/__init__.py (100%) rename {diffpy/nmf_mapping => src/diffpy}/__init__.py (100%) rename {diffpy/nmf_mapping => src/diffpy}/nmf_mapping/main.py (100%) rename {diffpy/nmf_mapping => src/diffpy}/nmf_mapping/nmf_mapping_code.py (100%) rename {diffpy/nmf_mapping => src/diffpy}/version.py (100%) rename {diffpy/nmf_mapping/tests => tests}/data/different_r_grid/DIPA-H2O_3mmglass_20190908-061431_e3086a_0001_dark_corrected_img.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/different_r_grid/MgTi2O4_cryobraket_ly_20190524-200934_temperature_400,63_degK_33b844_0063_dark_corrected_img.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/example_phases/LiO2.cif (100%) rename {diffpy/nmf_mapping/tests => tests}/data/example_phases/RuO2_tetragonal.cif (100%) rename {diffpy/nmf_mapping/tests => tests}/data/example_phases/Ru_mp-8639_conventional_standard.cif (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic0.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic1.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic10.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic11.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic12.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic13.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic14.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic15.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic16.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic17.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic18.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic19.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic2.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic20.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic21.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic22.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic23.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic24.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic25.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic26.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic27.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic28.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic29.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic3.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic30.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic31.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic32.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic33.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic34.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic35.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic36.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic37.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic38.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic39.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic4.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic40.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic41.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic42.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic43.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic44.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic45.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic46.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic47.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic48.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic49.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic5.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic6.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic7.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic8.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/data/synthetic_r_vs_gr/synthetic9.gr (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_1/component_index_vs_RE_value.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_1/component_index_vs_pratio_col.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_1/x_index_vs_y_col_components.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_2/component_index_vs_RE_value.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_2/component_index_vs_pratio_col.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_2/x_index_vs_y_col_components.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_3/component_index_vs_RE_value.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_3/component_index_vs_pratio_col.json (100%) rename {diffpy/nmf_mapping/tests => tests}/output/output_3/x_index_vs_y_col_components.json (100%) rename {diffpy/nmf_mapping/tests => tests}/test_NMF_analysis_code.py (100%) rename {diffpy/nmf_mapping/tests => tests}/test_load_data.py (100%) diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 06dac2c..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -diffpy.nmf_mapping/_version.py export-subst diff --git a/.github/ISSUE_TEMPLATE/bug_feature.md b/.github/ISSUE_TEMPLATE/bug_feature.md new file mode 100644 index 0000000..b3454de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_feature.md @@ -0,0 +1,16 @@ +--- +name: Bug Report or Feature Request +about: Report a bug or suggest a new feature! +title: "" +labels: "" +assignees: "" +--- + +### Problem + + + +### Proposed solution diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md new file mode 100644 index 0000000..a87a44a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -0,0 +1,22 @@ +--- +name: Release +about: Checklist and communication channel for PyPI and GitHub release +title: "Ready for PyPI/GitHub release" +labels: "release" +assignees: "" +--- + +### Release checklist for GitHub contributors + +- [ ] All PRs/issues attached to the release are merged. +- [ ] All the badges on the README are passing. +- [ ] License information is verified as correct. If you are unsure, please comment below. +- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are + missing), tutorials, and other human written text is up-to-date with any changes in the code. +- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated and + tested +- [ ] Successfully run any tutorial examples or do functional testing in some other way. +- [ ] Grammar and writing quality have been checked (no typos). + +Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as +version information and details about the pre-release. diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml new file mode 100644 index 0000000..10de58f --- /dev/null +++ b/.github/workflows/build-wheel-release-upload.yml @@ -0,0 +1,16 @@ +name: Release (GitHub/PyPI) and Deploy Docs + +on: + workflow_dispatch: + push: + tags: + - '*' # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml + +jobs: + release: + uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 + with: + project: diffpy.nmf_mapping + secrets: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml new file mode 100644 index 0000000..8c98d1d --- /dev/null +++ b/.github/workflows/check-news-item.yml @@ -0,0 +1,12 @@ +name: Check for News + +on: + pull_request_target: + branches: + - main + +jobs: + build: + uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0 + with: + project: diffpy.nmf_mapping diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 2909d67..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build Documentation - -on: - push: - branches: - - main - release: - -jobs: - test: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: build - auto-update-conda: true - - - name: install requirements - run: >- - conda install -n build -c conda-forge - --file requirements/build.txt - --file requirements/run.txt - --file requirements/docs.txt - --quiet --yes - - - name: install the package - run: python -m pip install . --no-deps - - - name: build documents - run: make -C doc html - - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./doc/build/html diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 18ca5d5..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: CI - -on: - push: - branches: - - main - - CI - pull_request: - workflow_dispatch: - -jobs: - miniconda: - name: Miniconda ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-latest"] - steps: - - name: check out diffpy.nmf_mapping - uses: actions/checkout@v3 - with: - repository: diffpy/diffpy.nmf_mapping - path: . - fetch-depth: 0 # avoid shallow clone with no tags - - - name: initialize miniconda - # this uses a marketplace action that sets up miniconda in a way that makes - # it easier to use. I tried setting it up without this and it was a pain - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - # environment.yml file is needed by this action. Because I don't want - # maintain this but rather maintain the requirements files it just has - # basic things in it like conda and pip - environment-file: ./environment.yml - python-version: 3 - auto-activate-base: false - - - name: install diffpy.nmf_mapping requirements - shell: bash -l {0} - run: | - conda config --set always_yes yes --set changeps1 no - conda config --add channels conda-forge - conda activate test - conda install --file requirements/run.txt - conda install --file requirements/test.txt - pip install . - - - name: Validate diffpy.nmf_mapping - shell: bash -l {0} - run: | - conda activate test - coverage run -m pytest -vv -s - coverage report -m - codecov - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml new file mode 100644 index 0000000..0d5edd8 --- /dev/null +++ b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + branches: + - main + release: + types: + - prereleased + - published + workflow_dispatch: + +jobs: + coverage: + uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 + with: + project: diffpy.nmf_mapping + c_extension: false + headless: false + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index f2ff7e4..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - workflow_dispatch: - -jobs: - pre-commit: - # pull requests are a duplicate of a branch push if within the same repo. - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - uses: pre-commit/action@v3.0.0 - with: - extra_args: --all-files diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml new file mode 100644 index 0000000..27f11ed --- /dev/null +++ b/.github/workflows/tests-on-pr.yml @@ -0,0 +1,16 @@ +name: Tests on PR + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + validate: + uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0 + with: + project: diffpy.nmf_mapping + c_extension: false + headless: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c458806..9cf0556 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,10 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - exclude: '\.(rst|txt)$' + - id: check-case-conflict + - id: check-merge-conflict + - id: check-toml + - id: check-added-large-files - repo: https://github.com/psf/black rev: 24.4.2 hooks: @@ -41,3 +44,9 @@ repos: name: Prevent Commit to Main Branch args: ["--branch", "main"] stages: [pre-commit] + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index df9531b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -sudo: False - -language: python -python: - - "3.7" -cache: - directories: - - $HOME/.cache/pip - -matrix: - include: - - python: 3.7 - - -install: - # Install conda - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - conda config --set always_yes yes --set changeps1 no - - conda config --add channels conda-forge - - conda config --add channels diffpy - - conda update conda - # Install dependencies - - conda create -n test --file requirements/run.txt python=3.7 - - source activate test - - python setup.py install - -script: - - set -e - - conda install --file requirements/test.txt - - python -m pytest - -notifications: - email: false diff --git a/rever.xsh b/rever.xsh deleted file mode 100644 index 60880c9..0000000 --- a/rever.xsh +++ /dev/null @@ -1,13 +0,0 @@ -$PROJECT = 'diffpy.nmf_mapping' -$ACTIVITIES = ['version_bump', 'changelog', 'tag', 'push_tag', 'ghrelease'] - -$VERSION_BUMP_PATTERNS = [ - ('diffpy/nmf_mapping/__init__.py', '__version__\s*=.*', "__version__ = '$VERSION'"), - ('setup.py', 'version\s*=.*,', "version='$VERSION',") - ] -$CHANGELOG_FILENAME = 'CHANGELOG.rst' -$CHANGELOG_IGNORE = ['TEMPLATE.rst'] -$PUSH_TAG_REMOTE = 'git@github.com:diffpy/diffpy.nmf_mapping.git' - -$GITHUB_ORG = 'diffpy' -$GITHUB_REPO = 'diffpy.nmf_mapping' diff --git a/run_tests.py b/run_tests.py deleted file mode 100644 index 3fec742..0000000 --- a/run_tests.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -import sys - -import pytest - -if __name__ == "__main__": - # show output results from every test function - args = ["-v"] - # show the message output for skipped and expected failure tests - if len(sys.argv) > 1: - args.extend(sys.argv[1:]) - print("pytest arguments: {}".format(args)) - # call pytest and exit with the return code from pytest so that - # travis will fail correctly if tests fail - exit_res = pytest.main(args) - sys.exit(exit_res) diff --git a/setup.py b/setup.py deleted file mode 100644 index 05f92d9..0000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -# Installation script for diffpy.nmf_mapping - -"""nmf_mapping - tools for performing NMF on PDF and XRD data. -Packages: diffpy.nmf_mapping -""" - -from setuptools import find_packages, setup - -with open("README.md", "r") as fh: - long_description = fh.read() - - -setup( - name="diffpy.nmf_mapping", - version="1.0.0", - author="Simon J.L. Billinge", - author_email="sb2896@columbia.edu", - description="Run NMF analysis on PDF and XRD data", - long_description=long_description, - test_suite="tests", - long_description_content_type="text/markdown", - packages=find_packages(exclude=["tests", "applications", "examples"]), - classifiers=[ - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - ], - entry_points={ - "console_scripts": ["nmf_mapping = diffpy.nmf_mapping.nmf_mapping.main:main"], - }, - data_files=[("", ["LICENSE.txt"])], - url="http://www.diffpy.org/", - download_url="http://www.diffpy.org/packages/", - license="BSD", - keywords="diffpy PDF NMF", - python_requires=">=3.6", - zip_safe=False, -) diff --git a/diffpy/__init__.py b/src/__init__.py similarity index 100% rename from diffpy/__init__.py rename to src/__init__.py diff --git a/diffpy/nmf_mapping/__init__.py b/src/diffpy/__init__.py similarity index 100% rename from diffpy/nmf_mapping/__init__.py rename to src/diffpy/__init__.py diff --git a/diffpy/nmf_mapping/nmf_mapping/main.py b/src/diffpy/nmf_mapping/main.py similarity index 100% rename from diffpy/nmf_mapping/nmf_mapping/main.py rename to src/diffpy/nmf_mapping/main.py diff --git a/diffpy/nmf_mapping/nmf_mapping/nmf_mapping_code.py b/src/diffpy/nmf_mapping/nmf_mapping_code.py similarity index 100% rename from diffpy/nmf_mapping/nmf_mapping/nmf_mapping_code.py rename to src/diffpy/nmf_mapping/nmf_mapping_code.py diff --git a/diffpy/nmf_mapping/version.py b/src/diffpy/version.py similarity index 100% rename from diffpy/nmf_mapping/version.py rename to src/diffpy/version.py diff --git a/diffpy/nmf_mapping/tests/data/different_r_grid/DIPA-H2O_3mmglass_20190908-061431_e3086a_0001_dark_corrected_img.gr b/tests/data/different_r_grid/DIPA-H2O_3mmglass_20190908-061431_e3086a_0001_dark_corrected_img.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/different_r_grid/DIPA-H2O_3mmglass_20190908-061431_e3086a_0001_dark_corrected_img.gr rename to tests/data/different_r_grid/DIPA-H2O_3mmglass_20190908-061431_e3086a_0001_dark_corrected_img.gr diff --git a/diffpy/nmf_mapping/tests/data/different_r_grid/MgTi2O4_cryobraket_ly_20190524-200934_temperature_400,63_degK_33b844_0063_dark_corrected_img.gr b/tests/data/different_r_grid/MgTi2O4_cryobraket_ly_20190524-200934_temperature_400,63_degK_33b844_0063_dark_corrected_img.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/different_r_grid/MgTi2O4_cryobraket_ly_20190524-200934_temperature_400,63_degK_33b844_0063_dark_corrected_img.gr rename to tests/data/different_r_grid/MgTi2O4_cryobraket_ly_20190524-200934_temperature_400,63_degK_33b844_0063_dark_corrected_img.gr diff --git a/diffpy/nmf_mapping/tests/data/example_phases/LiO2.cif b/tests/data/example_phases/LiO2.cif similarity index 100% rename from diffpy/nmf_mapping/tests/data/example_phases/LiO2.cif rename to tests/data/example_phases/LiO2.cif diff --git a/diffpy/nmf_mapping/tests/data/example_phases/RuO2_tetragonal.cif b/tests/data/example_phases/RuO2_tetragonal.cif similarity index 100% rename from diffpy/nmf_mapping/tests/data/example_phases/RuO2_tetragonal.cif rename to tests/data/example_phases/RuO2_tetragonal.cif diff --git a/diffpy/nmf_mapping/tests/data/example_phases/Ru_mp-8639_conventional_standard.cif b/tests/data/example_phases/Ru_mp-8639_conventional_standard.cif similarity index 100% rename from diffpy/nmf_mapping/tests/data/example_phases/Ru_mp-8639_conventional_standard.cif rename to tests/data/example_phases/Ru_mp-8639_conventional_standard.cif diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic0.gr b/tests/data/synthetic_r_vs_gr/synthetic0.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic0.gr rename to tests/data/synthetic_r_vs_gr/synthetic0.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic1.gr b/tests/data/synthetic_r_vs_gr/synthetic1.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic1.gr rename to tests/data/synthetic_r_vs_gr/synthetic1.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic10.gr b/tests/data/synthetic_r_vs_gr/synthetic10.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic10.gr rename to tests/data/synthetic_r_vs_gr/synthetic10.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic11.gr b/tests/data/synthetic_r_vs_gr/synthetic11.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic11.gr rename to tests/data/synthetic_r_vs_gr/synthetic11.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic12.gr b/tests/data/synthetic_r_vs_gr/synthetic12.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic12.gr rename to tests/data/synthetic_r_vs_gr/synthetic12.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic13.gr b/tests/data/synthetic_r_vs_gr/synthetic13.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic13.gr rename to tests/data/synthetic_r_vs_gr/synthetic13.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic14.gr b/tests/data/synthetic_r_vs_gr/synthetic14.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic14.gr rename to tests/data/synthetic_r_vs_gr/synthetic14.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic15.gr b/tests/data/synthetic_r_vs_gr/synthetic15.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic15.gr rename to tests/data/synthetic_r_vs_gr/synthetic15.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic16.gr b/tests/data/synthetic_r_vs_gr/synthetic16.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic16.gr rename to tests/data/synthetic_r_vs_gr/synthetic16.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic17.gr b/tests/data/synthetic_r_vs_gr/synthetic17.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic17.gr rename to tests/data/synthetic_r_vs_gr/synthetic17.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic18.gr b/tests/data/synthetic_r_vs_gr/synthetic18.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic18.gr rename to tests/data/synthetic_r_vs_gr/synthetic18.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic19.gr b/tests/data/synthetic_r_vs_gr/synthetic19.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic19.gr rename to tests/data/synthetic_r_vs_gr/synthetic19.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic2.gr b/tests/data/synthetic_r_vs_gr/synthetic2.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic2.gr rename to tests/data/synthetic_r_vs_gr/synthetic2.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic20.gr b/tests/data/synthetic_r_vs_gr/synthetic20.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic20.gr rename to tests/data/synthetic_r_vs_gr/synthetic20.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic21.gr b/tests/data/synthetic_r_vs_gr/synthetic21.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic21.gr rename to tests/data/synthetic_r_vs_gr/synthetic21.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic22.gr b/tests/data/synthetic_r_vs_gr/synthetic22.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic22.gr rename to tests/data/synthetic_r_vs_gr/synthetic22.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic23.gr b/tests/data/synthetic_r_vs_gr/synthetic23.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic23.gr rename to tests/data/synthetic_r_vs_gr/synthetic23.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic24.gr b/tests/data/synthetic_r_vs_gr/synthetic24.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic24.gr rename to tests/data/synthetic_r_vs_gr/synthetic24.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic25.gr b/tests/data/synthetic_r_vs_gr/synthetic25.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic25.gr rename to tests/data/synthetic_r_vs_gr/synthetic25.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic26.gr b/tests/data/synthetic_r_vs_gr/synthetic26.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic26.gr rename to tests/data/synthetic_r_vs_gr/synthetic26.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic27.gr b/tests/data/synthetic_r_vs_gr/synthetic27.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic27.gr rename to tests/data/synthetic_r_vs_gr/synthetic27.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic28.gr b/tests/data/synthetic_r_vs_gr/synthetic28.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic28.gr rename to tests/data/synthetic_r_vs_gr/synthetic28.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic29.gr b/tests/data/synthetic_r_vs_gr/synthetic29.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic29.gr rename to tests/data/synthetic_r_vs_gr/synthetic29.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic3.gr b/tests/data/synthetic_r_vs_gr/synthetic3.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic3.gr rename to tests/data/synthetic_r_vs_gr/synthetic3.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic30.gr b/tests/data/synthetic_r_vs_gr/synthetic30.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic30.gr rename to tests/data/synthetic_r_vs_gr/synthetic30.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic31.gr b/tests/data/synthetic_r_vs_gr/synthetic31.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic31.gr rename to tests/data/synthetic_r_vs_gr/synthetic31.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic32.gr b/tests/data/synthetic_r_vs_gr/synthetic32.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic32.gr rename to tests/data/synthetic_r_vs_gr/synthetic32.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic33.gr b/tests/data/synthetic_r_vs_gr/synthetic33.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic33.gr rename to tests/data/synthetic_r_vs_gr/synthetic33.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic34.gr b/tests/data/synthetic_r_vs_gr/synthetic34.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic34.gr rename to tests/data/synthetic_r_vs_gr/synthetic34.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic35.gr b/tests/data/synthetic_r_vs_gr/synthetic35.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic35.gr rename to tests/data/synthetic_r_vs_gr/synthetic35.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic36.gr b/tests/data/synthetic_r_vs_gr/synthetic36.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic36.gr rename to tests/data/synthetic_r_vs_gr/synthetic36.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic37.gr b/tests/data/synthetic_r_vs_gr/synthetic37.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic37.gr rename to tests/data/synthetic_r_vs_gr/synthetic37.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic38.gr b/tests/data/synthetic_r_vs_gr/synthetic38.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic38.gr rename to tests/data/synthetic_r_vs_gr/synthetic38.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic39.gr b/tests/data/synthetic_r_vs_gr/synthetic39.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic39.gr rename to tests/data/synthetic_r_vs_gr/synthetic39.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic4.gr b/tests/data/synthetic_r_vs_gr/synthetic4.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic4.gr rename to tests/data/synthetic_r_vs_gr/synthetic4.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic40.gr b/tests/data/synthetic_r_vs_gr/synthetic40.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic40.gr rename to tests/data/synthetic_r_vs_gr/synthetic40.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic41.gr b/tests/data/synthetic_r_vs_gr/synthetic41.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic41.gr rename to tests/data/synthetic_r_vs_gr/synthetic41.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic42.gr b/tests/data/synthetic_r_vs_gr/synthetic42.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic42.gr rename to tests/data/synthetic_r_vs_gr/synthetic42.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic43.gr b/tests/data/synthetic_r_vs_gr/synthetic43.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic43.gr rename to tests/data/synthetic_r_vs_gr/synthetic43.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic44.gr b/tests/data/synthetic_r_vs_gr/synthetic44.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic44.gr rename to tests/data/synthetic_r_vs_gr/synthetic44.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic45.gr b/tests/data/synthetic_r_vs_gr/synthetic45.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic45.gr rename to tests/data/synthetic_r_vs_gr/synthetic45.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic46.gr b/tests/data/synthetic_r_vs_gr/synthetic46.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic46.gr rename to tests/data/synthetic_r_vs_gr/synthetic46.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic47.gr b/tests/data/synthetic_r_vs_gr/synthetic47.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic47.gr rename to tests/data/synthetic_r_vs_gr/synthetic47.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic48.gr b/tests/data/synthetic_r_vs_gr/synthetic48.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic48.gr rename to tests/data/synthetic_r_vs_gr/synthetic48.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic49.gr b/tests/data/synthetic_r_vs_gr/synthetic49.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic49.gr rename to tests/data/synthetic_r_vs_gr/synthetic49.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic5.gr b/tests/data/synthetic_r_vs_gr/synthetic5.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic5.gr rename to tests/data/synthetic_r_vs_gr/synthetic5.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic6.gr b/tests/data/synthetic_r_vs_gr/synthetic6.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic6.gr rename to tests/data/synthetic_r_vs_gr/synthetic6.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic7.gr b/tests/data/synthetic_r_vs_gr/synthetic7.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic7.gr rename to tests/data/synthetic_r_vs_gr/synthetic7.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic8.gr b/tests/data/synthetic_r_vs_gr/synthetic8.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic8.gr rename to tests/data/synthetic_r_vs_gr/synthetic8.gr diff --git a/diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic9.gr b/tests/data/synthetic_r_vs_gr/synthetic9.gr similarity index 100% rename from diffpy/nmf_mapping/tests/data/synthetic_r_vs_gr/synthetic9.gr rename to tests/data/synthetic_r_vs_gr/synthetic9.gr diff --git a/diffpy/nmf_mapping/tests/output/output_1/component_index_vs_RE_value.json b/tests/output/output_1/component_index_vs_RE_value.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_1/component_index_vs_RE_value.json rename to tests/output/output_1/component_index_vs_RE_value.json diff --git a/diffpy/nmf_mapping/tests/output/output_1/component_index_vs_pratio_col.json b/tests/output/output_1/component_index_vs_pratio_col.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_1/component_index_vs_pratio_col.json rename to tests/output/output_1/component_index_vs_pratio_col.json diff --git a/diffpy/nmf_mapping/tests/output/output_1/x_index_vs_y_col_components.json b/tests/output/output_1/x_index_vs_y_col_components.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_1/x_index_vs_y_col_components.json rename to tests/output/output_1/x_index_vs_y_col_components.json diff --git a/diffpy/nmf_mapping/tests/output/output_2/component_index_vs_RE_value.json b/tests/output/output_2/component_index_vs_RE_value.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_2/component_index_vs_RE_value.json rename to tests/output/output_2/component_index_vs_RE_value.json diff --git a/diffpy/nmf_mapping/tests/output/output_2/component_index_vs_pratio_col.json b/tests/output/output_2/component_index_vs_pratio_col.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_2/component_index_vs_pratio_col.json rename to tests/output/output_2/component_index_vs_pratio_col.json diff --git a/diffpy/nmf_mapping/tests/output/output_2/x_index_vs_y_col_components.json b/tests/output/output_2/x_index_vs_y_col_components.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_2/x_index_vs_y_col_components.json rename to tests/output/output_2/x_index_vs_y_col_components.json diff --git a/diffpy/nmf_mapping/tests/output/output_3/component_index_vs_RE_value.json b/tests/output/output_3/component_index_vs_RE_value.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_3/component_index_vs_RE_value.json rename to tests/output/output_3/component_index_vs_RE_value.json diff --git a/diffpy/nmf_mapping/tests/output/output_3/component_index_vs_pratio_col.json b/tests/output/output_3/component_index_vs_pratio_col.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_3/component_index_vs_pratio_col.json rename to tests/output/output_3/component_index_vs_pratio_col.json diff --git a/diffpy/nmf_mapping/tests/output/output_3/x_index_vs_y_col_components.json b/tests/output/output_3/x_index_vs_y_col_components.json similarity index 100% rename from diffpy/nmf_mapping/tests/output/output_3/x_index_vs_y_col_components.json rename to tests/output/output_3/x_index_vs_y_col_components.json diff --git a/diffpy/nmf_mapping/tests/test_NMF_analysis_code.py b/tests/test_NMF_analysis_code.py similarity index 100% rename from diffpy/nmf_mapping/tests/test_NMF_analysis_code.py rename to tests/test_NMF_analysis_code.py diff --git a/diffpy/nmf_mapping/tests/test_load_data.py b/tests/test_load_data.py similarity index 100% rename from diffpy/nmf_mapping/tests/test_load_data.py rename to tests/test_load_data.py From e73002e0c581b9e317065942b2541252933a1c59 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Thu, 31 Oct 2024 23:59:59 -0400 Subject: [PATCH 02/12] Add codespell, manifest.in --- .codespell/ignore_lines.txt | 2 ++ .codespell/ignore_words.txt | 11 +++++++++++ MANIFEST.in | 26 ++++++++++++-------------- 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 .codespell/ignore_lines.txt create mode 100644 .codespell/ignore_words.txt diff --git a/.codespell/ignore_lines.txt b/.codespell/ignore_lines.txt new file mode 100644 index 0000000..07fa7c8 --- /dev/null +++ b/.codespell/ignore_lines.txt @@ -0,0 +1,2 @@ +;; Please include filenames and explanations for each ignored line. +;; See https://docs.openverse.org/meta/codespell.html for docs. diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt new file mode 100644 index 0000000..9757d7c --- /dev/null +++ b/.codespell/ignore_words.txt @@ -0,0 +1,11 @@ +;; Please include explanations for each ignored word (lowercase). +;; See https://docs.openverse.org/meta/codespell.html for docs. + +;; abbreviation for "materials" often used in a journal title +mater + +;; alternative use of socioeconomic +socio-economic + +;; Frobenius norm used in np.linalg.norm +fro diff --git a/MANIFEST.in b/MANIFEST.in index c150661..f1a78ee 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,14 +1,12 @@ -include AUTHORS.rst -include LICENSE -include README.rst -include requirements.txt - -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] - -recursive-include docs *.rst conf.py Makefile make.bat - -include diffpy.nmf_mapping/version.py - -# If including data files in the package, add them like: -# include path/to/data_file +graft src +graft tests +graft requirements + +include AUTHORS.rst LICENSE*.rst README.rst + +# Exclude all bytecode files and __pycache__ directories +global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files. +global-exclude .DS_Store # Exclude Mac filesystem artifacts. +global-exclude __pycache__ # Exclude Python cache directories. +global-exclude .git* # Exclude git files and directories. +global-exclude .idea # Exclude PyCharm project settings. From 83f86e08ef1627acc8037398c10d39e7d72d43af Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:03:14 -0400 Subject: [PATCH 03/12] add requirement --- AUTHORS.txt | 2 -- requirements/build.txt | 2 -- requirements/{run.txt => conda.txt} | 4 ++-- requirements/pip.txt | 7 +++++++ requirements/test.txt | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 AUTHORS.txt rename requirements/{run.txt => conda.txt} (56%) diff --git a/AUTHORS.txt b/AUTHORS.txt deleted file mode 100644 index f05c34d..0000000 --- a/AUTHORS.txt +++ /dev/null @@ -1,2 +0,0 @@ -Simon J. L. Billinge -Zachary A. Thatcher diff --git a/requirements/build.txt b/requirements/build.txt index f72d870..e69de29 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,2 +0,0 @@ -python -setuptools diff --git a/requirements/run.txt b/requirements/conda.txt similarity index 56% rename from requirements/run.txt rename to requirements/conda.txt index 862eca2..4cd436f 100644 --- a/requirements/run.txt +++ b/requirements/conda.txt @@ -3,5 +3,5 @@ scikit-learn scipy diffpy.utils pandas -matplotlib -bg-mpl-stylesheets +matplotlib-base +bg-mpl-stylesheets \ No newline at end of file diff --git a/requirements/pip.txt b/requirements/pip.txt index e69de29..fa02a31 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -0,0 +1,7 @@ +numpy +scikit-learn +scipy +diffpy.utils +pandas +matplotlib +bg-mpl-stylesheets \ No newline at end of file diff --git a/requirements/test.txt b/requirements/test.txt index 6f9ccf8..a727786 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -2,4 +2,5 @@ flake8 pytest codecov coverage +pytest-cov pytest-env From df99115556a4fc18f1dcd2ed96504c4ca02afb50 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:04:33 -0400 Subject: [PATCH 04/12] Add authors, pyproject.toml --- AUTHORS.rst | 4 +++- pyproject.toml | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index ce1e361..81e3df9 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,7 +1,9 @@ Authors ======= -Billinge Group and community contibutors. +Simon J. L. Billinge +Zachary A. Thatcher +Billinge Group and community contributors. Contributors ------------ diff --git a/pyproject.toml b/pyproject.toml index 420e394..c906f67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,20 @@ [build-system] -requires = ["setuptools>=62.0", "setuptools-git-versioning<2"] +requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"] build-backend = "setuptools.build_meta" [project] name = "diffpy.nmf_mapping" -dynamic=['version'] +dynamic=['version', 'dependencies'] authors = [ { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" }, ] maintainers = [ { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" }, ] -description = "Run NMF analysis on PDF and XRD data" -keywords = ['diffpy PDF NMF'] +description = "Python package for running NMF analysis on PDF and XRD data." +keywords = ['"diffpy"', '"PDF"', '"NMF"'] readme = "README.rst" -requires-python = ">=3.10" +requires-python = ">=3.11, <3.14" classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', @@ -25,9 +25,9 @@ classifiers = [ 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Operating System :: Unix', - 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Scientific/Engineering :: Physics', 'Topic :: Scientific/Engineering :: Chemistry', ] @@ -42,12 +42,23 @@ template = "{tag}" dev_template = "{tag}" dirty_template = "{tag}" +[project.scripts] +snmf = "diffpy.nmf_mapping.main:main" + [tool.setuptools.packages.find] where = ["src"] # list of folders that contain the packages (["."] by default) include = ["*"] # package names should match these glob patterns (["*"] by default) -exclude = ["diffpy.nmf_mapping.tests*"] # exclude packages matching these glob patterns (empty by default) +exclude = [] # exclude packages matching these glob patterns (empty by default) namespaces = false # to disable scanning PEP 420 namespaces (true by default) +[tool.setuptools.dynamic] +dependencies = {file = ["requirements/pip.txt"]} + +[tool.codespell] +exclude-file = ".codespell/ignore_lines.txt" +ignore-words = ".codespell/ignore_words.txt" +skip = "*.cif,*.dat" + [tool.black] line-length = 115 include = '\.pyi?$' From 7600606e27673b39d3ae29db28fc26048bb3b2e6 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:05:40 -0400 Subject: [PATCH 05/12] Add source --- src/diffpy/__init__.py | 27 +++++++++++---------------- src/diffpy/nmf_mapping/__init__.py | 24 ++++++++++++++++++++++++ src/diffpy/nmf_mapping/version.py | 26 ++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 src/diffpy/nmf_mapping/__init__.py create mode 100644 src/diffpy/nmf_mapping/version.py diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index 6fc19a1..c8359ab 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -1,29 +1,24 @@ #!/usr/bin/env python ############################################################################## # -# nmf_mapping by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. # -# File coded by: Chris Farrow +# File coded by: Billinge Group members and community contributors. # -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors +# +# See LICENSE.rst for license information. # ############################################################################## -"""Tools for manipulating and comparing PDFs. -""" - -__id__ = "$Id$" +"""Blank namespace package for module diffpy.""" -# obtain version information -__version__ = "1.0.0" -# top-level import -from diffpy.nmf_mapping.nmf_mapping import nmf_mapping_code as nmf +from pkgutil import extend_path -__all__ = ["nmf"] +__path__ = extend_path(__path__, __name__) # End of file + diff --git a/src/diffpy/nmf_mapping/__init__.py b/src/diffpy/nmf_mapping/__init__.py new file mode 100644 index 0000000..031f6ef --- /dev/null +++ b/src/diffpy/nmf_mapping/__init__.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +"""Python package for running NMF analysis on PDF and XRD data.""" + +# package version +from diffpy.nmf_mapping.version import __version__ + +# silence the pyflakes syntax checker +assert __version__ or True + +# End of file diff --git a/src/diffpy/nmf_mapping/version.py b/src/diffpy/nmf_mapping/version.py new file mode 100644 index 0000000..0991a0b --- /dev/null +++ b/src/diffpy/nmf_mapping/version.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +"""Definition of __version__.""" + +# We do not use the other three variables, but can be added back if needed. +# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] + +# obtain version information +from importlib.metadata import version + +__version__ = version("diffpy.nmf_mapping") + +# End of file From 56c689db0e4beeb7b4b215e58ac253cb81e5402e Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:05:49 -0400 Subject: [PATCH 06/12] Add tests --- tests/conftest.py | 19 +++++++++++++++++++ tests/test_NMF_analysis_code.py | 2 +- tests/test_version.py | 10 ++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tests/conftest.py create mode 100644 tests/test_version.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..e3b6313 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,19 @@ +import json +from pathlib import Path + +import pytest + + +@pytest.fixture +def user_filesystem(tmp_path): + base_dir = Path(tmp_path) + home_dir = base_dir / "home_dir" + home_dir.mkdir(parents=True, exist_ok=True) + cwd_dir = base_dir / "cwd_dir" + cwd_dir.mkdir(parents=True, exist_ok=True) + + home_config_data = {"username": "home_username", "email": "home@email.com"} + with open(home_dir / "diffpyconfig.json", "w") as f: + json.dump(home_config_data, f) + + yield tmp_path diff --git a/tests/test_NMF_analysis_code.py b/tests/test_NMF_analysis_code.py index fcad1e2..971ca95 100644 --- a/tests/test_NMF_analysis_code.py +++ b/tests/test_NMF_analysis_code.py @@ -5,7 +5,7 @@ import pytest -from diffpy.nmf_mapping.nmf_mapping.main import main +from diffpy.nmf_mapping.main import main dir = Path(__file__).parent.resolve() diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000..1167910 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,10 @@ +"""Unit tests for __version__.py +""" + +import diffpy.nmf_mapping + + +def test_package_version(): + """Ensure the package version is defined and not set to the initial placeholder.""" + assert hasattr(diffpy.nmf_mapping, "__version__") + assert diffpy.nmf_mapping.__version__ != "0.0.0" From 0759ca15bb51c13a3b58b74ed311d33fe146261a Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:05:57 -0400 Subject: [PATCH 07/12] Add docs --- doc/Makefile | 194 ++++++++++++ doc/make.bat | 36 +++ doc/source/_static/.placeholder | 0 .../diffpy.nmf_mapping.example_package.rst | 31 ++ doc/source/api/diffpy.nmf_mapping.rst | 30 ++ doc/source/conf.py | 289 ++++++++++++++++++ doc/source/index.rst | 44 +++ doc/source/license.rst | 39 +++ doc/source/release.rst | 5 + 9 files changed, 668 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/make.bat create mode 100644 doc/source/_static/.placeholder create mode 100644 doc/source/api/diffpy.nmf_mapping.example_package.rst create mode 100644 doc/source/api/diffpy.nmf_mapping.rst create mode 100644 doc/source/conf.py create mode 100644 doc/source/index.rst create mode 100644 doc/source/license.rst create mode 100644 doc/source/release.rst diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..b638db2 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,194 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build +BASENAME = $(subst .,,$(subst $() $(),,diffpy.nmf_mapping)) + +# 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/$(BASENAME).qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(BASENAME).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/$(BASENAME)" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/$(BASENAME)" + @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." + +# Manual publishing to the gh-pages branch + +GITREPOPATH = $(shell cd $(CURDIR) && git rev-parse --git-dir) +GITREMOTE = origin +GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE).url) +GITLASTCOMMIT = $(shell git rev-parse --short HEAD) + +publish: + @test -d build/html || \ + ( echo >&2 "Run 'make html' first!"; false ) + git show-ref --verify --quiet refs/heads/gh-pages || \ + git branch --track gh-pages $(GITREMOTE)/gh-pages + test -d build/gh-pages || \ + git clone -s -b gh-pages $(GITREPOPATH) build/gh-pages + cd build/gh-pages && \ + git pull $(GITREMOTEURL) gh-pages + rsync -acv --delete --exclude=.git --exclude=.rsync-exclude \ + --exclude-from=build/gh-pages/.rsync-exclude \ + --link-dest=$(CURDIR)/build/html build/html/ build/gh-pages/ + cd build/gh-pages && \ + git add --all . && \ + git diff --cached --quiet || \ + git commit -m "Sync with the source at $(GITLASTCOMMIT)." + cd build/gh-pages && \ + git push origin gh-pages diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000..ac53d5b --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=PackagingScientificPython + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/doc/source/api/diffpy.nmf_mapping.example_package.rst b/doc/source/api/diffpy.nmf_mapping.example_package.rst new file mode 100644 index 0000000..da17a67 --- /dev/null +++ b/doc/source/api/diffpy.nmf_mapping.example_package.rst @@ -0,0 +1,31 @@ +.. _example_package documentation: + +|title| +======= + +.. |title| replace:: diffpy.nmf_mapping.example_package package + +.. automodule:: diffpy.nmf_mapping.example_package + :members: + :undoc-members: + :show-inheritance: + +|foo| +----- + +.. |foo| replace:: diffpy.nmf_mapping.example_package.foo module + +.. automodule:: diffpy.nmf_mapping.example_package.foo + :members: + :undoc-members: + :show-inheritance: + +|bar| +----- + +.. |bar| replace:: diffpy.nmf_mapping.example_package.bar module + +.. automodule:: diffpy.nmf_mapping.example_package.foo + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/diffpy.nmf_mapping.rst b/doc/source/api/diffpy.nmf_mapping.rst new file mode 100644 index 0000000..0f03d4b --- /dev/null +++ b/doc/source/api/diffpy.nmf_mapping.rst @@ -0,0 +1,30 @@ +:tocdepth: -1 + +|title| +======= + +.. |title| replace:: diffpy.nmf_mapping package + +.. automodule:: diffpy.nmf_mapping + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + diffpy.nmf_mapping.example_package + +Submodules +---------- + +|module| +-------- + +.. |module| replace:: diffpy.nmf_mapping.example_submodule module + +.. automodule:: diffpy.nmf_mapping.example_submodule + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..287c517 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,289 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# diffpy.nmf_mapping documentation build configuration file, created by +# sphinx-quickstart on Thu Jan 30 15:49:41 2014. +# +# 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 time +from importlib.metadata import version +from pathlib import Path + +# 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 Path().resolve() to make it absolute, like shown here. +# sys.path.insert(0, str(Path(".").resolve())) +sys.path.insert(0, str(Path("../..").resolve())) +sys.path.insert(0, str(Path("../../src").resolve())) + +# abbreviations +ab_authors = "Billinge Group members and community contributors" + +# -- 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.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + "sphinx_rtd_theme", + "m2r", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +source_suffix = [".rst", ".md"] + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = "diffpy.nmf_mapping" +copyright = "%Y, The Trustees of Columbia University in the City of New York" + +# 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. + +fullversion = version(project) +# The short X.Y version. +version = "".join(fullversion.split(".post")[:1]) +# The full version, including alpha/beta/rc tags. +release = fullversion + +# 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 = '' +today = time.strftime("%B %d, %Y", time.localtime()) +year = today.split()[-1] +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' +# substitute YEAR in the copyright string +copyright = copyright.replace("%Y", year) + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ["build"] + +# 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 = ["diffpy.nmf_mapping"] + +# Display all warnings for missing links. +nitpicky = True + +# -- 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 = "sphinx_rtd_theme" + +# 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 = { + "navigation_with_keys": "true", +} + +# 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. +basename = "diffpy.nmf_mapping".replace(" ", "").replace(".", "") +htmlhelp_basename = basename + "doc" + + +# -- 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", "diffpy.nmf_mapping.tex", "diffpy.nmf_mapping Documentation", ab_authors, "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", "diffpy.nmf_mapping", "diffpy.nmf_mapping Documentation", ab_authors, 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", + "diffpy.nmf_mapping", + "diffpy.nmf_mapping Documentation", + ab_authors, + "diffpy.nmf_mapping", + "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 + + +# Example configuration for intersphinx: refer to the Python standard library. +# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..cc559f7 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,44 @@ +####### +|title| +####### + +.. |title| replace:: diffpy.nmf_mapping documentation + +diffpy.nmf_mapping - Python package for running NMF analysis on PDF and XRD data.. + +| Software version |release|. +| Last updated |today|. + +======= +Authors +======= + +diffpy.nmf_mapping is developed by Billinge Group +and its community contributors. + +For a detailed list of contributors see +https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors. + +============ +Installation +============ + +See the `README `_ +file included with the distribution. + +================= +Table of contents +================= +.. toctree:: + :titlesonly: + + license + release + Package API + +======= +Indices +======= + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/source/license.rst b/doc/source/license.rst new file mode 100644 index 0000000..cfab61c --- /dev/null +++ b/doc/source/license.rst @@ -0,0 +1,39 @@ +:tocdepth: -1 + +.. index:: license + +License +####### + +OPEN SOURCE LICENSE AGREEMENT +============================= +BSD 3-Clause License + +Copyright (c) 2024, The Trustees of Columbia University in +the City of New York. +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/doc/source/release.rst b/doc/source/release.rst new file mode 100644 index 0000000..27cd0cc --- /dev/null +++ b/doc/source/release.rst @@ -0,0 +1,5 @@ +:tocdepth: -1 + +.. index:: release notes + +.. include:: ../../CHANGELOG.rst From 78a9c07be665870f0188ed390c6ce6a14db331e4 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:08:27 -0400 Subject: [PATCH 08/12] Add readme.rst --- LICENSE.txt | 33 --------------------------------- README.rst | 29 ++++++++++++++++------------- 2 files changed, 16 insertions(+), 46 deletions(-) delete mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 77e7af7..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,33 +0,0 @@ -This program is part of the DiffPy open-source project at Columbia -University and is available subject to the conditions and terms laid out below. - -Copyright © 2009-2019, Trustees of Columbia University in the City of New York, -all rights reserved. - -For more information please visit the diffpy web-page at http://diffpy.org or -email Prof. Simon Billinge at sb2896@columbia.edu. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the names of COLUMBIA UNIVERSITY, MICHIGAN STATE UNIVERSITY nor the - names of their contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.rst b/README.rst index 8616d33..89a8438 100644 --- a/README.rst +++ b/README.rst @@ -15,8 +15,8 @@ .. |Black| image:: https://img.shields.io/badge/code_style-black-black :target: https://github.com/psf/black -.. |CI| image:: https://github.com/diffpy/diffpy.nmf_mapping/actions/workflows/main.yml/badge.svg - :target: https://github.com/diffpy/diffpy.nmf_mapping/actions/workflows/main.yml +.. |CI| image:: https://github.com/diffpy/diffpy.nmf_mapping/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg + :target: https://github.com/diffpy/diffpy.nmf_mapping/actions/workflows/matrix-and-codecov-on-merge-to-main.yml .. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.nmf_mapping/branch/main/graph/badge.svg :target: https://codecov.io/gh/diffpy/diffpy.nmf_mapping @@ -35,7 +35,7 @@ .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue :target: https://github.com/diffpy/diffpy.nmf_mapping/issues -Run NMF analysis on PDF and XRD data +Python package for running NMF analysis on PDF and XRD data. * LONGER DESCRIPTION HERE @@ -74,20 +74,18 @@ To add "conda-forge" to the conda channels, run the following in a terminal. :: We want to install our packages in a suitable conda environment. The following creates and activates a new environment named ``diffpy.nmf_mapping_env`` :: - conda create -n diffpy.nmf_mapping_env python=3 + conda create -n diffpy.nmf_mapping_env diffpy.nmf_mapping conda activate diffpy.nmf_mapping_env -Then, to fully install ``diffpy.nmf_mapping`` in our active environment, run :: +To confirm that the installation was successful, type :: - conda install diffpy.nmf_mapping + python -c "import diffpy.nmf_mapping; print(diffpy.nmf_mapping.__version__)" -Another option is to use ``pip`` to download and install the latest release from -`Python Package Index `_. -To install using ``pip`` into your ``diffpy.nmf_mapping_env`` environment, we will also have to install dependencies :: - - pip install -r https://raw.githubusercontent.com/diffpy/diffpy.nmf_mapping/main/requirements/run.txt +The output should print the latest version displayed on the badges above. -and then install the package :: +If the above does not work, you can use ``pip`` to download and install the latest release from +`Python Package Index `_. +To install using ``pip`` into your ``diffpy.nmf_mapping_env`` environment, type :: pip install diffpy.nmf_mapping @@ -97,6 +95,11 @@ and run the following :: pip install . +Getting Started +--------------- + +You may consult our `online documentation `_ for tutorials and API references. + Support and Contribute ---------------------- @@ -125,7 +128,7 @@ trying to commit again. Improvements and fixes are always appreciated. -Before contribuing, please read our `Code of Conduct `_. +Before contributing, please read our `Code of Conduct `_. Contact ------- From 257824ae50c9cb36388bf662541a8cf0858dbf00 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:15:52 -0400 Subject: [PATCH 09/12] remove older makefile, make.bat --- README.md | 83 -------- README.rst | 74 ++++++- {docs => doc}/examples/NMFBatching.ipynb | 0 {docs => doc}/examples/data/edited.INP | 0 {docs => doc}/examples/data/example.INP | 0 .../examples/data/example_phases/LiO2.cif | 0 .../data/example_phases/RuO2_tetragonal.cif | 0 .../Ru_mp-8639_conventional_standard.cif | 0 .../synthetic_r_vs_gr/batch_0/synthetic0.gr | 0 .../synthetic_r_vs_gr/batch_0/synthetic1.gr | 0 .../synthetic_r_vs_gr/batch_0/synthetic2.gr | 0 .../synthetic_r_vs_gr/batch_0/synthetic3.gr | 0 .../synthetic_r_vs_gr/batch_0/synthetic4.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic10.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic11.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic12.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic5.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic6.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic7.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic8.gr | 0 .../synthetic_r_vs_gr/batch_1/synthetic9.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic13.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic14.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic15.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic16.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic17.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic18.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic19.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic20.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic21.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic22.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic23.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic24.gr | 0 .../synthetic_r_vs_gr/batch_2/synthetic25.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic26.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic27.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic28.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic29.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic30.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic31.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic32.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic33.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic34.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic35.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic36.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic37.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic38.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic39.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic40.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic41.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic42.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic43.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic44.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic45.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic46.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic47.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic48.gr | 0 .../synthetic_r_vs_gr/batch_3/synthetic49.gr | 0 .../data/synthetic_r_vs_gr/synthetic0.gr | 0 .../data/synthetic_r_vs_gr/synthetic1.gr | 0 .../data/synthetic_r_vs_gr/synthetic10.gr | 0 .../data/synthetic_r_vs_gr/synthetic11.gr | 0 .../data/synthetic_r_vs_gr/synthetic12.gr | 0 .../data/synthetic_r_vs_gr/synthetic13.gr | 0 .../data/synthetic_r_vs_gr/synthetic14.gr | 0 .../data/synthetic_r_vs_gr/synthetic15.gr | 0 .../data/synthetic_r_vs_gr/synthetic16.gr | 0 .../data/synthetic_r_vs_gr/synthetic17.gr | 0 .../data/synthetic_r_vs_gr/synthetic18.gr | 0 .../data/synthetic_r_vs_gr/synthetic19.gr | 0 .../data/synthetic_r_vs_gr/synthetic2.gr | 0 .../data/synthetic_r_vs_gr/synthetic20.gr | 0 .../data/synthetic_r_vs_gr/synthetic21.gr | 0 .../data/synthetic_r_vs_gr/synthetic22.gr | 0 .../data/synthetic_r_vs_gr/synthetic23.gr | 0 .../data/synthetic_r_vs_gr/synthetic24.gr | 0 .../data/synthetic_r_vs_gr/synthetic25.gr | 0 .../data/synthetic_r_vs_gr/synthetic26.gr | 0 .../data/synthetic_r_vs_gr/synthetic27.gr | 0 .../data/synthetic_r_vs_gr/synthetic28.gr | 0 .../data/synthetic_r_vs_gr/synthetic29.gr | 0 .../data/synthetic_r_vs_gr/synthetic3.gr | 0 .../data/synthetic_r_vs_gr/synthetic30.gr | 0 .../data/synthetic_r_vs_gr/synthetic31.gr | 0 .../data/synthetic_r_vs_gr/synthetic32.gr | 0 .../data/synthetic_r_vs_gr/synthetic33.gr | 0 .../data/synthetic_r_vs_gr/synthetic34.gr | 0 .../data/synthetic_r_vs_gr/synthetic35.gr | 0 .../data/synthetic_r_vs_gr/synthetic36.gr | 0 .../data/synthetic_r_vs_gr/synthetic37.gr | 0 .../data/synthetic_r_vs_gr/synthetic38.gr | 0 .../data/synthetic_r_vs_gr/synthetic39.gr | 0 .../data/synthetic_r_vs_gr/synthetic4.gr | 0 .../data/synthetic_r_vs_gr/synthetic40.gr | 0 .../data/synthetic_r_vs_gr/synthetic41.gr | 0 .../data/synthetic_r_vs_gr/synthetic42.gr | 0 .../data/synthetic_r_vs_gr/synthetic43.gr | 0 .../data/synthetic_r_vs_gr/synthetic44.gr | 0 .../data/synthetic_r_vs_gr/synthetic45.gr | 0 .../data/synthetic_r_vs_gr/synthetic46.gr | 0 .../data/synthetic_r_vs_gr/synthetic47.gr | 0 .../data/synthetic_r_vs_gr/synthetic48.gr | 0 .../data/synthetic_r_vs_gr/synthetic49.gr | 0 .../data/synthetic_r_vs_gr/synthetic5.gr | 0 .../data/synthetic_r_vs_gr/synthetic6.gr | 0 .../data/synthetic_r_vs_gr/synthetic7.gr | 0 .../data/synthetic_r_vs_gr/synthetic8.gr | 0 .../data/synthetic_r_vs_gr/synthetic9.gr | 0 docs/Makefile | 194 ------------------ docs/make.bat | 190 ----------------- 110 files changed, 73 insertions(+), 468 deletions(-) delete mode 100644 README.md rename {docs => doc}/examples/NMFBatching.ipynb (100%) rename {docs => doc}/examples/data/edited.INP (100%) rename {docs => doc}/examples/data/example.INP (100%) rename {docs => doc}/examples/data/example_phases/LiO2.cif (100%) rename {docs => doc}/examples/data/example_phases/RuO2_tetragonal.cif (100%) rename {docs => doc}/examples/data/example_phases/Ru_mp-8639_conventional_standard.cif (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_0/synthetic0.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_0/synthetic1.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_0/synthetic2.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_0/synthetic3.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_0/synthetic4.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic10.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic11.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic12.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic5.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic6.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic7.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic8.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_1/synthetic9.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic13.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic14.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic15.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic16.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic17.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic18.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic19.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic20.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic21.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic22.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic23.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic24.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_2/synthetic25.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic26.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic27.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic28.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic29.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic30.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic31.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic32.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic33.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic34.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic35.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic36.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic37.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic38.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic39.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic40.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic41.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic42.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic43.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic44.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic45.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic46.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic47.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic48.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/batch_3/synthetic49.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic0.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic1.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic10.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic11.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic12.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic13.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic14.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic15.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic16.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic17.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic18.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic19.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic2.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic20.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic21.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic22.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic23.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic24.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic25.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic26.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic27.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic28.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic29.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic3.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic30.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic31.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic32.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic33.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic34.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic35.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic36.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic37.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic38.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic39.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic4.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic40.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic41.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic42.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic43.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic44.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic45.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic46.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic47.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic48.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic49.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic5.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic6.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic7.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic8.gr (100%) rename {docs => doc}/examples/data/synthetic_r_vs_gr/synthetic9.gr (100%) delete mode 100644 docs/Makefile delete mode 100644 docs/make.bat diff --git a/README.md b/README.md deleted file mode 100644 index 4c9eacc..0000000 --- a/README.md +++ /dev/null @@ -1,83 +0,0 @@ -NMF Mapping for PDF or XRD Files ---------- -This package takes a directory containing diffraction files in .gr (or .xy/.xye) format and performs an NMF decomposition of -the components with the goal of determining the number of structural phases present, and when these phases are -present if the data provided comes from a time series. Any non .gr ( or .xy/.xye) files or .dat files in -the directory will be ignored and skipped in the calculation. - -Use ---------- -This package is the backend logic for pdfitc.org/NMF. Please consider utilizing pdfitc.org/NMF prior to this tool, if -possible. If your NMF analysis requires some feature from this CLI that isn't present on the website, please let us know -and we will consider adding the feature to the pdfitc.org interface. - -Installation --------- -- Install requirements from run.txt via "conda (or pip) install --file (or -r) 'requirements/run.txt'" -- Install using "pip install -e ." in a python 3 environment - -Argparse --------- -Input: -- directory: path to the directory containing the diffraction files that are to be analyzed - - format: string (filepath) - - eg: '/Users/zthatcher/Desktop/Data/nmf_mapping/time_data/' or . for cwd - -- save-files (optional): boolean as to whether or not you would like to save the dataframes, plots, and -components (note: pdf data saves as .cgr and xrd data saves as .xy) - - format: boolean - - eg: --save-files False - - default: True - -- threshold (optional and mut-exc to other thresholds): a threshold for the number of structural phases graphed (NMF components returned) - - format as: integer - - eg: --threshold 2 - - default: 10 - -- improve-thresh (optional and mut-exc to other thresholds): a threshold (between 0 and 1) for the relative improvement ratio necessary to - add an additional component. Default is 0.001. 0.1 Recommended for real data. - - format: float - - eg: --improve-thresh 0.1 - - default = 0.001 - -- pca-thresh (optional and mut-exc to other thresholds): explained variance threshold for PCA component counting cutoff - - format: float - - eg: --pca-thresh 0.95 - - default = None - -- n-iter (optional): total number of iterations to run NMF algo. Defaults to 1000. 10000 typical to publish. - - format: int - - eg: --n-iter 10000 - - default: 1000 - -- x-range (optional): the active x-range over which to run the NMF analysis (must be between shortest and -longest range in the set of files) - - format: pair of integers representing the lower r bound and the upper r bound with a comma between - the lower and upper bound - - eg: --xrange 5,10 12,15 - - default: entire range - -- xrd (optional): set this option if the directory contains xy or xye files rather than gr. - - format: boolean - - eg: --xrd True - - default: False - -- x_units (required if xrd): set this as either twotheta or q if working with xrd data. - - format: enum[str] - - eg: --x_units twotheta - - default: None (since --xrd defaults to False) - -- show graphs (optional): whether you or not you would like display the images - - format: boolean - - eg: --show False - - default: True - -Returns: -- Figure One: PDF or XRD pattern of structural phase components contributing to the NMF reconstruction -- Figure Two: Weights of the phase components plotted in Figure One -- Figure Three: Reconstruction error as a function of components -- (Optional) Figure Four: Explained Variance plot as a function of components for PCA thresholding - -Example: - -nmf_mapping . --threshold 3 --xrange 5,10 --show True diff --git a/README.rst b/README.rst index 89a8438..bd51e03 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,14 @@ Python package for running NMF analysis on PDF and XRD data. -* LONGER DESCRIPTION HERE +This package takes a directory containing diffraction files in .gr (or .xy/.xye) format and performs an NMF decomposition of +the components with the goal of determining the number of structural phases present, and when these phases are +present if the data provided comes from a time series. Any non .gr ( or .xy/.xye) files or .dat files in +the directory will be ignored and skipped in the calculation. + +This package is the backend logic for pdfitc.org/NMF. Please consider utilizing pdfitc.org/NMF prior to this tool, if +possible. If your NMF analysis requires some feature from this CLI that isn't present on the website, please let us know +and we will consider adding the feature to the pdfitc.org interface. For more information about the diffpy.nmf_mapping library, please consult our `online documentation `_. @@ -98,6 +105,71 @@ and run the following :: Getting Started --------------- +Input: +- directory: path to the directory containing the diffraction files that are to be analyzed + - format: string (filepath) + - eg: '/Users/zthatcher/Desktop/Data/nmf_mapping/time_data/' or . for cwd + +- save-files (optional): boolean as to whether or not you would like to save the dataframes, plots, and +components (note: pdf data saves as .cgr and xrd data saves as .xy) + - format: boolean + - eg: --save-files False + - default: True + +- threshold (optional and mut-exc to other thresholds): a threshold for the number of structural phases graphed (NMF components returned) + - format as: integer + - eg: --threshold 2 + - default: 10 + +- improve-thresh (optional and mut-exc to other thresholds): a threshold (between 0 and 1) for the relative improvement ratio necessary to + add an additional component. Default is 0.001. 0.1 Recommended for real data. + - format: float + - eg: --improve-thresh 0.1 + - default = 0.001 + +- pca-thresh (optional and mut-exc to other thresholds): explained variance threshold for PCA component counting cutoff + - format: float + - eg: --pca-thresh 0.95 + - default = None + +- n-iter (optional): total number of iterations to run NMF algo. Defaults to 1000. 10000 typical to publish. + - format: int + - eg: --n-iter 10000 + - default: 1000 + +- x-range (optional): the active x-range over which to run the NMF analysis (must be between shortest and +longest range in the set of files) + - format: pair of integers representing the lower r bound and the upper r bound with a comma between + the lower and upper bound + - eg: --xrange 5,10 12,15 + - default: entire range + +- xrd (optional): set this option if the directory contains xy or xye files rather than gr. + - format: boolean + - eg: --xrd True + - default: False + +- x_units (required if xrd): set this as either twotheta or q if working with xrd data. + - format: enum[str] + - eg: --x_units twotheta + - default: None (since --xrd defaults to False) + +- show graphs (optional): whether you or not you would like display the images + - format: boolean + - eg: --show False + - default: True + +Returns: +- Figure One: PDF or XRD pattern of structural phase components contributing to the NMF reconstruction +- Figure Two: Weights of the phase components plotted in Figure One +- Figure Three: Reconstruction error as a function of components +- (Optional) Figure Four: Explained Variance plot as a function of components for PCA thresholding + +Example: + +nmf_mapping . --threshold 3 --xrange 5,10 --show True + + You may consult our `online documentation `_ for tutorials and API references. Support and Contribute diff --git a/docs/examples/NMFBatching.ipynb b/doc/examples/NMFBatching.ipynb similarity index 100% rename from docs/examples/NMFBatching.ipynb rename to doc/examples/NMFBatching.ipynb diff --git a/docs/examples/data/edited.INP b/doc/examples/data/edited.INP similarity index 100% rename from docs/examples/data/edited.INP rename to doc/examples/data/edited.INP diff --git a/docs/examples/data/example.INP b/doc/examples/data/example.INP similarity index 100% rename from docs/examples/data/example.INP rename to doc/examples/data/example.INP diff --git a/docs/examples/data/example_phases/LiO2.cif b/doc/examples/data/example_phases/LiO2.cif similarity index 100% rename from docs/examples/data/example_phases/LiO2.cif rename to doc/examples/data/example_phases/LiO2.cif diff --git a/docs/examples/data/example_phases/RuO2_tetragonal.cif b/doc/examples/data/example_phases/RuO2_tetragonal.cif similarity index 100% rename from docs/examples/data/example_phases/RuO2_tetragonal.cif rename to doc/examples/data/example_phases/RuO2_tetragonal.cif diff --git a/docs/examples/data/example_phases/Ru_mp-8639_conventional_standard.cif b/doc/examples/data/example_phases/Ru_mp-8639_conventional_standard.cif similarity index 100% rename from docs/examples/data/example_phases/Ru_mp-8639_conventional_standard.cif rename to doc/examples/data/example_phases/Ru_mp-8639_conventional_standard.cif diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic0.gr b/doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic0.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic0.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic0.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic1.gr b/doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic1.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic1.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic1.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic2.gr b/doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic2.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic2.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic2.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic3.gr b/doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic3.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic3.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic3.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic4.gr b/doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic4.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_0/synthetic4.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_0/synthetic4.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic10.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic10.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic10.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic10.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic11.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic11.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic11.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic11.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic12.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic12.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic12.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic12.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic5.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic5.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic5.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic5.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic6.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic6.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic6.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic6.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic7.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic7.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic7.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic7.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic8.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic8.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic8.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic8.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic9.gr b/doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic9.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_1/synthetic9.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_1/synthetic9.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic13.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic13.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic13.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic13.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic14.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic14.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic14.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic14.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic15.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic15.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic15.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic15.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic16.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic16.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic16.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic16.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic17.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic17.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic17.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic17.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic18.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic18.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic18.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic18.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic19.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic19.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic19.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic19.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic20.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic20.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic20.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic20.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic21.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic21.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic21.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic21.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic22.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic22.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic22.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic22.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic23.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic23.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic23.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic23.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic24.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic24.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic24.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic24.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic25.gr b/doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic25.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_2/synthetic25.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_2/synthetic25.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic26.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic26.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic26.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic26.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic27.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic27.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic27.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic27.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic28.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic28.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic28.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic28.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic29.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic29.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic29.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic29.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic30.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic30.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic30.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic30.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic31.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic31.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic31.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic31.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic32.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic32.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic32.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic32.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic33.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic33.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic33.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic33.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic34.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic34.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic34.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic34.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic35.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic35.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic35.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic35.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic36.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic36.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic36.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic36.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic37.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic37.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic37.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic37.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic38.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic38.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic38.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic38.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic39.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic39.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic39.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic39.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic40.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic40.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic40.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic40.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic41.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic41.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic41.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic41.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic42.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic42.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic42.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic42.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic43.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic43.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic43.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic43.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic44.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic44.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic44.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic44.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic45.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic45.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic45.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic45.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic46.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic46.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic46.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic46.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic47.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic47.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic47.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic47.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic48.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic48.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic48.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic48.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic49.gr b/doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic49.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/batch_3/synthetic49.gr rename to doc/examples/data/synthetic_r_vs_gr/batch_3/synthetic49.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic0.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic0.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic0.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic0.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic1.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic1.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic1.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic1.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic10.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic10.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic10.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic10.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic11.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic11.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic11.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic11.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic12.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic12.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic12.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic12.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic13.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic13.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic13.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic13.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic14.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic14.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic14.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic14.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic15.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic15.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic15.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic15.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic16.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic16.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic16.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic16.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic17.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic17.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic17.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic17.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic18.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic18.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic18.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic18.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic19.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic19.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic19.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic19.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic2.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic2.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic2.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic2.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic20.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic20.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic20.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic20.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic21.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic21.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic21.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic21.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic22.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic22.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic22.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic22.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic23.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic23.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic23.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic23.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic24.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic24.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic24.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic24.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic25.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic25.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic25.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic25.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic26.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic26.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic26.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic26.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic27.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic27.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic27.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic27.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic28.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic28.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic28.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic28.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic29.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic29.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic29.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic29.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic3.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic3.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic3.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic3.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic30.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic30.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic30.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic30.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic31.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic31.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic31.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic31.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic32.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic32.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic32.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic32.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic33.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic33.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic33.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic33.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic34.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic34.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic34.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic34.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic35.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic35.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic35.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic35.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic36.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic36.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic36.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic36.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic37.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic37.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic37.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic37.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic38.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic38.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic38.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic38.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic39.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic39.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic39.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic39.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic4.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic4.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic4.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic4.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic40.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic40.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic40.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic40.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic41.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic41.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic41.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic41.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic42.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic42.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic42.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic42.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic43.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic43.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic43.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic43.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic44.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic44.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic44.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic44.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic45.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic45.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic45.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic45.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic46.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic46.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic46.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic46.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic47.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic47.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic47.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic47.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic48.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic48.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic48.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic48.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic49.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic49.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic49.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic49.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic5.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic5.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic5.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic5.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic6.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic6.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic6.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic6.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic7.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic7.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic7.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic7.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic8.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic8.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic8.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic8.gr diff --git a/docs/examples/data/synthetic_r_vs_gr/synthetic9.gr b/doc/examples/data/synthetic_r_vs_gr/synthetic9.gr similarity index 100% rename from docs/examples/data/synthetic_r_vs_gr/synthetic9.gr rename to doc/examples/data/synthetic_r_vs_gr/synthetic9.gr diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index f2f0753..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,194 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build -RELEASE = v0.1 - - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -DOCREPONAME = .github.io -DOCREPOURL = - - -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 " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -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/fief.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/fief.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/fief" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/fief" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -push-latest: - cd $(BUILDDIR) && \ - test -d $(DOCREPONAME) || git clone $(DOCREPOURL) $(DOCREPONAME) && \ - cd $(DOCREPONAME) && \ - git pull origin gh-pages && \ - test -d latest || mkdir latest && touch latest/_ && \ - rm -r latest/* && \ - cp -r ../html/* latest/ && \ - git add latest/ && \ - git commit -am "Pushed latest docs at $(date)" && \ - git push - -push-release: - cd $(BUILDDIR) && \ - test -d $(DOCREPONAME) || git clone $(DOCREPOURL) $(DOCREPONAME) && \ - cd $(DOCREPONAME) && \ - git pull origin gh-pages && \ - test -d $(RELEASE) || mkdir $(RELEASE) && touch $(RELEASE)/_ && \ - rm -r $(RELEASE)/* && \ - cp -r ../html/* $(RELEASE)/ && \ - git add $(RELEASE)/ && \ - git commit -am "Pushed $(RELEASE) docs at $(date)" && \ - git push - -push-root: - cd $(BUILDDIR) && \ - test -d $(DOCREPONAME) || git clone $(DOCREPOURL) $(DOCREPONAME) && \ - cd $(DOCREPONAME) && \ - git pull origin gh-pages && \ - rm -rf libref previous _sources _static *.html *.js *.inv && \ - cp -r ../html/* . && \ - git add . && \ - git commit -am "Pushed root-level docs at $(date)" && \ - git push diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index ec0e4c3..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,190 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :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. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\fief.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\fief.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end From 150a41664e34e51a1dc5446dd9153307f8d51f38 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:23:02 -0400 Subject: [PATCH 10/12] import nmf_mapping_code as nmf --- README.rst | 64 ---------------------- src/diffpy/nmf_mapping/main.py | 2 +- src/diffpy/nmf_mapping/nmf_mapping_code.py | 2 +- tests/test_load_data.py | 2 +- 4 files changed, 3 insertions(+), 67 deletions(-) diff --git a/README.rst b/README.rst index bd51e03..2233def 100644 --- a/README.rst +++ b/README.rst @@ -105,70 +105,6 @@ and run the following :: Getting Started --------------- -Input: -- directory: path to the directory containing the diffraction files that are to be analyzed - - format: string (filepath) - - eg: '/Users/zthatcher/Desktop/Data/nmf_mapping/time_data/' or . for cwd - -- save-files (optional): boolean as to whether or not you would like to save the dataframes, plots, and -components (note: pdf data saves as .cgr and xrd data saves as .xy) - - format: boolean - - eg: --save-files False - - default: True - -- threshold (optional and mut-exc to other thresholds): a threshold for the number of structural phases graphed (NMF components returned) - - format as: integer - - eg: --threshold 2 - - default: 10 - -- improve-thresh (optional and mut-exc to other thresholds): a threshold (between 0 and 1) for the relative improvement ratio necessary to - add an additional component. Default is 0.001. 0.1 Recommended for real data. - - format: float - - eg: --improve-thresh 0.1 - - default = 0.001 - -- pca-thresh (optional and mut-exc to other thresholds): explained variance threshold for PCA component counting cutoff - - format: float - - eg: --pca-thresh 0.95 - - default = None - -- n-iter (optional): total number of iterations to run NMF algo. Defaults to 1000. 10000 typical to publish. - - format: int - - eg: --n-iter 10000 - - default: 1000 - -- x-range (optional): the active x-range over which to run the NMF analysis (must be between shortest and -longest range in the set of files) - - format: pair of integers representing the lower r bound and the upper r bound with a comma between - the lower and upper bound - - eg: --xrange 5,10 12,15 - - default: entire range - -- xrd (optional): set this option if the directory contains xy or xye files rather than gr. - - format: boolean - - eg: --xrd True - - default: False - -- x_units (required if xrd): set this as either twotheta or q if working with xrd data. - - format: enum[str] - - eg: --x_units twotheta - - default: None (since --xrd defaults to False) - -- show graphs (optional): whether you or not you would like display the images - - format: boolean - - eg: --show False - - default: True - -Returns: -- Figure One: PDF or XRD pattern of structural phase components contributing to the NMF reconstruction -- Figure Two: Weights of the phase components plotted in Figure One -- Figure Three: Reconstruction error as a function of components -- (Optional) Figure Four: Explained Variance plot as a function of components for PCA thresholding - -Example: - -nmf_mapping . --threshold 3 --xrange 5,10 --show True - You may consult our `online documentation `_ for tutorials and API references. diff --git a/src/diffpy/nmf_mapping/main.py b/src/diffpy/nmf_mapping/main.py index f833902..06daff0 100644 --- a/src/diffpy/nmf_mapping/main.py +++ b/src/diffpy/nmf_mapping/main.py @@ -6,7 +6,7 @@ import numpy as np -from diffpy.nmf_mapping import nmf +import diffpy.nmf_mapping.nmf_mapping_code as nmf def boolean_string(s): diff --git a/src/diffpy/nmf_mapping/nmf_mapping_code.py b/src/diffpy/nmf_mapping/nmf_mapping_code.py index 4ad293a..58827f5 100644 --- a/src/diffpy/nmf_mapping/nmf_mapping_code.py +++ b/src/diffpy/nmf_mapping/nmf_mapping_code.py @@ -16,7 +16,7 @@ from sklearn.decomposition import NMF, PCA from sklearn.exceptions import ConvergenceWarning -plt.style.use(all_styles["bg_style"]) +plt.style.use(all_styles["bg-style"]) warnings.filterwarnings("ignore", category=FutureWarning) warnings.filterwarnings("ignore", category=ConvergenceWarning) diff --git a/tests/test_load_data.py b/tests/test_load_data.py index be03c35..8c2f6a3 100644 --- a/tests/test_load_data.py +++ b/tests/test_load_data.py @@ -3,7 +3,7 @@ import numpy as np -from diffpy.nmf_mapping import nmf +import diffpy.nmf_mapping.nmf_mapping_code as nmf dir = pathlib.Path(__file__).parent.resolve() From d99f2fa1dd5a1b263954d3d6cdc40e31538bf2ca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 04:27:01 +0000 Subject: [PATCH 11/12] [pre-commit.ci] auto fixes from pre-commit hooks --- README.rst | 2 +- doc/source/license.rst | 4 ++-- requirements/conda.txt | 2 +- requirements/pip.txt | 2 +- src/diffpy/__init__.py | 1 - src/diffpy/nmf_mapping/nmf_mapping_code.py | 3 ++- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 2233def..863c9eb 100644 --- a/README.rst +++ b/README.rst @@ -113,7 +113,7 @@ Support and Contribute `Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.nmf_mapping. Please join the diffpy.nmf_mapping users community by joining the Google group. The diffpy.nmf_mapping project welcomes your expertise and enthusiasm! -If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. +If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. Feel free to fork the project and contribute. To install diffpy.nmf_mapping in a development mode, with its sources being directly used by Python diff --git a/doc/source/license.rst b/doc/source/license.rst index cfab61c..9ae52a9 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT ============================= BSD 3-Clause License -Copyright (c) 2024, The Trustees of Columbia University in +Copyright (c) 2024, The Trustees of Columbia University in the City of New York. -All Rights Reserved. +All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/requirements/conda.txt b/requirements/conda.txt index 4cd436f..e49f29b 100644 --- a/requirements/conda.txt +++ b/requirements/conda.txt @@ -4,4 +4,4 @@ scipy diffpy.utils pandas matplotlib-base -bg-mpl-stylesheets \ No newline at end of file +bg-mpl-stylesheets diff --git a/requirements/pip.txt b/requirements/pip.txt index fa02a31..862eca2 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,4 +4,4 @@ scipy diffpy.utils pandas matplotlib -bg-mpl-stylesheets \ No newline at end of file +bg-mpl-stylesheets diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index c8359ab..58c58be 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -21,4 +21,3 @@ __path__ = extend_path(__path__, __name__) # End of file - diff --git a/src/diffpy/nmf_mapping/nmf_mapping_code.py b/src/diffpy/nmf_mapping/nmf_mapping_code.py index 58827f5..3c73ebf 100644 --- a/src/diffpy/nmf_mapping/nmf_mapping_code.py +++ b/src/diffpy/nmf_mapping/nmf_mapping_code.py @@ -11,11 +11,12 @@ import numpy as np import pandas as pd from bg_mpl_stylesheets.styles import all_styles -from diffpy.utils.parsers.loaddata import loadData from scipy import interpolate from sklearn.decomposition import NMF, PCA from sklearn.exceptions import ConvergenceWarning +from diffpy.utils.parsers.loaddata import loadData + plt.style.use(all_styles["bg-style"]) warnings.filterwarnings("ignore", category=FutureWarning) warnings.filterwarnings("ignore", category=ConvergenceWarning) From c26dcb8cb50336dedf412fce3edb1adfeda84470 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Fri, 1 Nov 2024 00:29:13 -0400 Subject: [PATCH 12/12] Apply pre-commit --- README.rst | 2 +- doc/examples/NMFBatching.ipynb | 2 +- doc/source/license.rst | 4 ++-- requirements/conda.txt | 2 +- requirements/pip.txt | 2 +- src/diffpy/__init__.py | 1 - src/diffpy/nmf_mapping/nmf_mapping_code.py | 3 ++- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 2233def..863c9eb 100644 --- a/README.rst +++ b/README.rst @@ -113,7 +113,7 @@ Support and Contribute `Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.nmf_mapping. Please join the diffpy.nmf_mapping users community by joining the Google group. The diffpy.nmf_mapping project welcomes your expertise and enthusiasm! -If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. +If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. Feel free to fork the project and contribute. To install diffpy.nmf_mapping in a development mode, with its sources being directly used by Python diff --git a/doc/examples/NMFBatching.ipynb b/doc/examples/NMFBatching.ipynb index 99fa868..ab1201c 100644 --- a/doc/examples/NMFBatching.ipynb +++ b/doc/examples/NMFBatching.ipynb @@ -8,7 +8,7 @@ "## Notebook Introduction\n", "This notebook takes the synthetic example datasets and batches it into four significantly different subsets. A threshold\n", "of 10 weight percent of any given phase is used to batch the data, meaning that if a phase either enters or leaves the\n", - "signal (with a threshold of 10 wight percent) the input data will be separated. The notebook then goes a step further\n", + "signal (with a threshold of 10 weight percent) the input data will be separated. The notebook then goes a step further\n", "by taking an exemplary INP topas file and editing it such that it will refine a number of basic parameters for a given\n", "batch of the data." ] diff --git a/doc/source/license.rst b/doc/source/license.rst index cfab61c..9ae52a9 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT ============================= BSD 3-Clause License -Copyright (c) 2024, The Trustees of Columbia University in +Copyright (c) 2024, The Trustees of Columbia University in the City of New York. -All Rights Reserved. +All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/requirements/conda.txt b/requirements/conda.txt index 4cd436f..e49f29b 100644 --- a/requirements/conda.txt +++ b/requirements/conda.txt @@ -4,4 +4,4 @@ scipy diffpy.utils pandas matplotlib-base -bg-mpl-stylesheets \ No newline at end of file +bg-mpl-stylesheets diff --git a/requirements/pip.txt b/requirements/pip.txt index fa02a31..862eca2 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,4 +4,4 @@ scipy diffpy.utils pandas matplotlib -bg-mpl-stylesheets \ No newline at end of file +bg-mpl-stylesheets diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index c8359ab..58c58be 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -21,4 +21,3 @@ __path__ = extend_path(__path__, __name__) # End of file - diff --git a/src/diffpy/nmf_mapping/nmf_mapping_code.py b/src/diffpy/nmf_mapping/nmf_mapping_code.py index 58827f5..3c73ebf 100644 --- a/src/diffpy/nmf_mapping/nmf_mapping_code.py +++ b/src/diffpy/nmf_mapping/nmf_mapping_code.py @@ -11,11 +11,12 @@ import numpy as np import pandas as pd from bg_mpl_stylesheets.styles import all_styles -from diffpy.utils.parsers.loaddata import loadData from scipy import interpolate from sklearn.decomposition import NMF, PCA from sklearn.exceptions import ConvergenceWarning +from diffpy.utils.parsers.loaddata import loadData + plt.style.use(all_styles["bg-style"]) warnings.filterwarnings("ignore", category=FutureWarning) warnings.filterwarnings("ignore", category=ConvergenceWarning)