From 2defd5986caa913ce4adfc65caa6860fea8ade46 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Thu, 24 Aug 2023 11:28:00 -0400 Subject: [PATCH 01/28] setup and meta.yaml files are added for setting up shiver wheel and conda package creation, action added too --- .github/workflows/actions.yml | 27 +++++++++++++ .pre-commit-config.yaml | 2 +- conda.recipe/meta.yaml | 45 +++++++++++++++++++++ environment.yml | 5 +++ setup.cfg | 75 +++++++++++++++++++++++++++++++++++ setup.py | 6 +++ 6 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 conda.recipe/meta.yaml create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 850821aa..2ec8436d 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -29,6 +29,33 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 + conda-build: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + mamba-version: "*" + environment-file: environment.yml + - name: Build python wheel + run: | + conda activate shiver + python -m build --wheel --no-isolation + check-wheel-contents dist/shiver-*.whl + - name: Build conda library + shell: bash -l {0} + run: | + # set up environment + cd conda.recipe + echo "versioningit $(versioningit ../)" + # build the package + VERSION=$(versioningit ../) conda mambabuild --output-folder . . + conda verify noarch/shiver*.tar.bz2 + trigger-deploy: runs-on: ubuntu-22.04 needs: [tests] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90dc8484..8d213471 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: "DGS_SC_scripts/.*|.*\\.mat$" +exclude: "setup.*|DGS_SC_scripts/.*|.*\\.mat$" ci: skip: [pylint] diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 00000000..e46ebf8b --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,45 @@ +# load information from setup.cfg/setup.py +{% set data = load_setup_py_data() %} +{% set license = data.get('license') %} +{% set description = data.get('description') %} +{% set url = data.get('url') %} +# this will get the version set by environment variable +{% set version = environ.get('VERSION') %} +{% set version_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} + + +package: + name: shiver + version: {{ version_number }} + +source: + path: .. + +build: + noarch: python + linux-64: python + number: {{ version_number }} + string: py{{py}} + script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv + +requirements: + host: + - python + - versioningit + + build: + - setuptools + - versioningit + - mantidworkbench + - qtpy + - pytest + + run: + - mantidworkbench + +about: + home: {{ url }} + license: {{ license }} + license_family: GPL + license_file: ../LICENSE + summary: {{ description }} diff --git a/environment.yml b/environment.yml index feb3a4c1..44bd6c4e 100644 --- a/environment.yml +++ b/environment.yml @@ -3,6 +3,8 @@ channels: - conda-forge - mantid/label/nightly dependencies: + - boa + - conda-build - mantidworkbench - pre-commit - versioningit @@ -11,7 +13,10 @@ dependencies: - pytest-qt=4.2.0 - pytest-cov=4.0.0 - sphinx + - python-build - pip - pip: + - check-wheel-contents + - setuptools==47.0.0 - https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl - sphinx-rtd-theme diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..4875c611 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,75 @@ +[metadata] +name = shiver +version = 0.0.1 +distance = 0 +description = Spectroscopy Histogram Visualizer for Event Reduction +long_description = file: README.md, LICENSE +long_description_content_type = text/markdown +url = https://github.com/neutrons/Shiver/ +license = GPL3.0 + +[options] +package_dir = + =src +include_package_data = True +packages = find: +python_requires >= 3.8 +install_requires = + mantidworkbench + pyoncat == 1.4.1 + qtpy +tests_require = + pylint + flake8 + black + mypy + pytest + mock + +[options.entry_points] +console_scripts = + shiver = shiver.__init__:main + +[options.packages.find] +where = + src +exclude = + tests* + DGS_SC_scripts* + +[options.package_data] +* = + *.txt + *.yml + *.yaml + *.ini + +[options.extras_require] +dev = + versioningit +tests = pytest + +[flake8] +max-line-length = 120 +ignore = E203, W503 +exclude = conda.recipe/meta.yml + +[versioning] +source-version-file = shiver/_version.py +version-pattern = {tag} +commit-message-pattern = {raw} +tag-message-pattern = {raw} + +[coverage:run] +source = src/shiver +omit = + */tests/* + conda.recipe/* + docs/* + DGS_SC_scripts/* + +[coverage:report] + # temp set low until project is more developed, default 60 +fail_under = 1 +exclude_lines = + if __name__ == "__main__": diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..789e35d1 --- /dev/null +++ b/setup.py @@ -0,0 +1,6 @@ +# this file is necessary so conda can read the contents of setup.cfg using +# its load_setup_py_data function +from setuptools import setup +from versioningit import get_cmdclasses + +setup(cmdclass=get_cmdclasses()) From 95b9579f02611805fc73075dca480b52fac2b2fd Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 12:45:02 -0400 Subject: [PATCH 02/28] remove explicit environment activation from workflow actions --- .github/workflows/actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 2ec8436d..63f2266b 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -43,7 +43,6 @@ jobs: environment-file: environment.yml - name: Build python wheel run: | - conda activate shiver python -m build --wheel --no-isolation check-wheel-contents dist/shiver-*.whl - name: Build conda library From 6938583e302b64221c74d28912b895e588bae582 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 13:19:01 -0400 Subject: [PATCH 03/28] build-systems requires updated --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a677ca8d..8faa8203 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,9 @@ dependencies = [ [build-system] requires = [ "setuptools >= 42", - "versioningit" + "wheel", + "toml", + "versioningit" ] build-backend = "setuptools.build_meta" From 143afd22bb0002264e732463becbf8be662654ee Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 13:20:45 -0400 Subject: [PATCH 04/28] readme listes as dynamic variable --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8faa8203..97a7b39e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "shiver" description = "Spectroscopy Histogram Visualizer for Event Reduction" -dynamic = ["version"] +dynamic = ["version", "readme"] requires-python = ">=3.8" dependencies = [ "mantidworkbench >= 6.6.20230517", From 5a2a73e1e08ef871cfa2f6fbe9727a1b6105e1a6 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 13:23:24 -0400 Subject: [PATCH 05/28] conda-verify added in the environment --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 44bd6c4e..adabe075 100644 --- a/environment.yml +++ b/environment.yml @@ -5,6 +5,7 @@ channels: dependencies: - boa - conda-build + - conda-verify - mantidworkbench - pre-commit - versioningit From 94e147426ea4ec5ebdb33608032235535198bae3 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 13:36:59 -0400 Subject: [PATCH 06/28] dynamic variables added in toml for values defined outside the file --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 97a7b39e..fde23ee1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "shiver" description = "Spectroscopy Histogram Visualizer for Event Reduction" -dynamic = ["version", "readme"] +dynamic = ["version", "readme","scripts","license"] requires-python = ">=3.8" dependencies = [ "mantidworkbench >= 6.6.20230517", From 5b20239169a067641798ba9df57d300cad935ea5 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 13:49:10 -0400 Subject: [PATCH 07/28] add conditional action according to snapred --- .github/workflows/actions.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 63f2266b..8c06c1c1 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -54,6 +54,12 @@ jobs: # build the package VERSION=$(versioningit ../) conda mambabuild --output-folder . . conda verify noarch/shiver*.tar.bz2 + - name: Deploy to Anaconda + shell: bash -l {0} + if: startsWith(github.ref, 'refs/tags/v') + run: | + # label is main or rc depending on the tag-name + echo pushing ${{ github.ref }} with label $CONDA_LABEL trigger-deploy: runs-on: ubuntu-22.04 From 1dd6ecbca06912081eae0e611e73d7f6dce2b894 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 14:01:52 -0400 Subject: [PATCH 08/28] conditional anaconda deploy added and unused packages removed from environment --- .github/workflows/actions.yml | 6 ++++++ environment.yml | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 8c06c1c1..bede0944 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -57,9 +57,15 @@ jobs: - name: Deploy to Anaconda shell: bash -l {0} if: startsWith(github.ref, 'refs/tags/v') + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + IS_RC: ${{ contains(github.ref, 'rc') }} run: | # label is main or rc depending on the tag-name + CONDA_LABEL="main" + if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi echo pushing ${{ github.ref }} with label $CONDA_LABEL + anaconda upload --label $CONDA_LABEL conda.recipe/noarch/shiver*.tar.bz2 trigger-deploy: runs-on: ubuntu-22.04 diff --git a/environment.yml b/environment.yml index adabe075..b68d4c7b 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,6 @@ channels: - conda-forge - mantid/label/nightly dependencies: - - boa - conda-build - conda-verify - mantidworkbench @@ -14,7 +13,6 @@ dependencies: - pytest-qt=4.2.0 - pytest-cov=4.0.0 - sphinx - - python-build - pip - pip: - check-wheel-contents From a815c562229b6a58b6fec6ce94de2c1577429777 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 14:10:24 -0400 Subject: [PATCH 09/28] actions and environment updates for deploy step --- .github/workflows/actions.yml | 2 +- environment.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index bede0944..8b74b3d5 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -69,7 +69,7 @@ jobs: trigger-deploy: runs-on: ubuntu-22.04 - needs: [tests] + needs: [tests, conda-build] # only trigger deploys from protected branches and tags if: ${{ github.ref_protected || github.ref_type == 'tag' }} steps: diff --git a/environment.yml b/environment.yml index b68d4c7b..0a3abae1 100644 --- a/environment.yml +++ b/environment.yml @@ -13,6 +13,7 @@ dependencies: - pytest-qt=4.2.0 - pytest-cov=4.0.0 - sphinx + - python-build - pip - pip: - check-wheel-contents From 10a8dc3305e2a48bf7e85e91e1fa3e551ab4742a Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 14:17:48 -0400 Subject: [PATCH 10/28] boa pckage is placed back --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 0a3abae1..adabe075 100644 --- a/environment.yml +++ b/environment.yml @@ -3,6 +3,7 @@ channels: - conda-forge - mantid/label/nightly dependencies: + - boa - conda-build - conda-verify - mantidworkbench From e7fcc10c327a517ab80aae953353236626ba0840 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Fri, 25 Aug 2023 14:37:03 -0400 Subject: [PATCH 11/28] mypy removed --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4875c611..eca30686 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,7 +22,6 @@ tests_require = pylint flake8 black - mypy pytest mock From 8dc75ba547f205fea5bfafadb4d688c714695c46 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 11:55:50 -0400 Subject: [PATCH 12/28] setup added in pre-commit hook --- .pre-commit-config.yaml | 2 +- setup.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d213471..90dc8484 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: "setup.*|DGS_SC_scripts/.*|.*\\.mat$" +exclude: "DGS_SC_scripts/.*|.*\\.mat$" ci: skip: [pylint] diff --git a/setup.py b/setup.py index 789e35d1..99da8fc6 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,7 @@ -# this file is necessary so conda can read the contents of setup.cfg using -# its load_setup_py_data function +""" +This file is necessary so conda can read the contents of setup.cfg using +its load_setup_py_data function +""" from setuptools import setup from versioningit import get_cmdclasses From 27c03e8411529935c667b139754327c9c13d9991 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 12:07:10 -0400 Subject: [PATCH 13/28] comments addressed for setuptools version, and some build dependencies --- conda.recipe/meta.yaml | 3 --- environment.yml | 2 +- pyproject.toml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index e46ebf8b..1a53e8a2 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -30,9 +30,6 @@ requirements: build: - setuptools - versioningit - - mantidworkbench - - qtpy - - pytest run: - mantidworkbench diff --git a/environment.yml b/environment.yml index adabe075..25910579 100644 --- a/environment.yml +++ b/environment.yml @@ -18,6 +18,6 @@ dependencies: - pip - pip: - check-wheel-contents - - setuptools==47.0.0 + - setuptools - https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl - sphinx-rtd-theme diff --git a/pyproject.toml b/pyproject.toml index fde23ee1..5b87388d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ [build-system] requires = [ - "setuptools >= 42", + "setuptools", "wheel", "toml", "versioningit" From ff54cf8ece60f8625bc4d81128be8f6409218861 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 12:11:18 -0400 Subject: [PATCH 14/28] setuptools added as conda dependency --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 25910579..8a9e52db 100644 --- a/environment.yml +++ b/environment.yml @@ -13,11 +13,11 @@ dependencies: - pytest=7.2.1 - pytest-qt=4.2.0 - pytest-cov=4.0.0 + - setuptools - sphinx - python-build - pip - pip: - check-wheel-contents - - setuptools - https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl - sphinx-rtd-theme From a25b812027572e06f6a28de4cd4ab5a75506e6d1 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 12:12:40 -0400 Subject: [PATCH 15/28] check-wheel-contents added as aconda depndency --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 8a9e52db..78f572bd 100644 --- a/environment.yml +++ b/environment.yml @@ -4,6 +4,7 @@ channels: - mantid/label/nightly dependencies: - boa + - check-wheel-contents - conda-build - conda-verify - mantidworkbench @@ -18,6 +19,5 @@ dependencies: - python-build - pip - pip: - - check-wheel-contents - https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl - sphinx-rtd-theme From a2a1426f0565c8432cdf4465af46d8d9fbf70945 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 12:57:24 -0400 Subject: [PATCH 16/28] check-wheel-contents added back as pip, conda cannot find the package --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 78f572bd..c5a817af 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,6 @@ channels: - mantid/label/nightly dependencies: - boa - - check-wheel-contents - conda-build - conda-verify - mantidworkbench @@ -21,3 +20,4 @@ dependencies: - pip: - https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl - sphinx-rtd-theme + - check-wheel-contents From e9024016de1f0f2472db3b816534aa64e0765413 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 14:05:35 -0400 Subject: [PATCH 17/28] oncat subversion removed --- pyproject.toml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5b87388d..2c1ae889 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ dynamic = ["version", "readme","scripts","license"] requires-python = ">=3.8" dependencies = [ "mantidworkbench >= 6.6.20230517", - "pyoncat == 1.4.1" + "pyoncat == 1.4" ] [build-system] diff --git a/setup.cfg b/setup.cfg index eca30686..dcaac6ce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ packages = find: python_requires >= 3.8 install_requires = mantidworkbench - pyoncat == 1.4.1 + pyoncat == 1.4 qtpy tests_require = pylint From d53f8c5702042d9ab1ca848353dfadfb1d1aacdc Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Mon, 28 Aug 2023 14:34:55 -0400 Subject: [PATCH 18/28] oncat subversion reverted due to No matching distribution found error --- pyproject.toml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2c1ae889..5b87388d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ dynamic = ["version", "readme","scripts","license"] requires-python = ">=3.8" dependencies = [ "mantidworkbench >= 6.6.20230517", - "pyoncat == 1.4" + "pyoncat == 1.4.1" ] [build-system] diff --git a/setup.cfg b/setup.cfg index dcaac6ce..eca30686 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ packages = find: python_requires >= 3.8 install_requires = mantidworkbench - pyoncat == 1.4 + pyoncat == 1.4.1 qtpy tests_require = pylint From e3719c3ecaa068d427627abbe94dcc2848bba4a9 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 09:08:59 -0400 Subject: [PATCH 19/28] move pyoncat to a newer version --- environment.yml | 2 +- pyproject.toml | 2 +- setup.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index c5a817af..56d9292f 100644 --- a/environment.yml +++ b/environment.yml @@ -18,6 +18,6 @@ dependencies: - python-build - pip - pip: - - https://oncat.ornl.gov/packages/pyoncat-1.4.1-py3-none-any.whl + - https://oncat.ornl.gov/packages/pyoncat-1.6.1-py2.py3-none-any.whl - sphinx-rtd-theme - check-wheel-contents diff --git a/pyproject.toml b/pyproject.toml index 5b87388d..a4e7cdd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ dynamic = ["version", "readme","scripts","license"] requires-python = ">=3.8" dependencies = [ "mantidworkbench >= 6.6.20230517", - "pyoncat == 1.4.1" + "pyoncat == 1.6.1" ] [build-system] diff --git a/setup.cfg b/setup.cfg index eca30686..f5a8493b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ packages = find: python_requires >= 3.8 install_requires = mantidworkbench - pyoncat == 1.4.1 + pyoncat == 1.6.1 qtpy tests_require = pylint From c6bd980eb5620664834fc3c8ec8c6ed9a2936d54 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 10:00:47 -0400 Subject: [PATCH 20/28] dynamic variables and definitons in setup.cfg removed --- pyproject.toml | 2 +- setup.cfg | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a4e7cdd8..41523d06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "shiver" description = "Spectroscopy Histogram Visualizer for Event Reduction" -dynamic = ["version", "readme","scripts","license"] +dynamic = ["version"] requires-python = ">=3.8" dependencies = [ "mantidworkbench >= 6.6.20230517", diff --git a/setup.cfg b/setup.cfg index f5a8493b..46d8eb37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,6 @@ description = Spectroscopy Histogram Visualizer for Event Reduction long_description = file: README.md, LICENSE long_description_content_type = text/markdown url = https://github.com/neutrons/Shiver/ -license = GPL3.0 [options] package_dir = @@ -25,10 +24,6 @@ tests_require = pytest mock -[options.entry_points] -console_scripts = - shiver = shiver.__init__:main - [options.packages.find] where = src From 5a1715c50aa73b0cfbdc8c044fe5319cc8d81765 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 10:19:10 -0400 Subject: [PATCH 21/28] long description removed --- setup.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 46d8eb37..4e7868ff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,8 +3,6 @@ name = shiver version = 0.0.1 distance = 0 description = Spectroscopy Histogram Visualizer for Event Reduction -long_description = file: README.md, LICENSE -long_description_content_type = text/markdown url = https://github.com/neutrons/Shiver/ [options] From e600b884054e2c7c4d9475f0d5550324dd3e565a Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 10:28:14 -0400 Subject: [PATCH 22/28] revert long_description_content_type --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 4e7868ff..6fa065ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ name = shiver version = 0.0.1 distance = 0 description = Spectroscopy Histogram Visualizer for Event Reduction +long_description_content_type = text/markdown url = https://github.com/neutrons/Shiver/ [options] From 61c5b22e1dff84d989221012b11febb9cc1da762 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 12:14:03 -0400 Subject: [PATCH 23/28] removed setup.cfg and added some parameters at pyproject.toml --- pyproject.toml | 4 +++ setup.cfg | 68 -------------------------------------------------- 2 files changed, 4 insertions(+), 68 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 41523d06..17c1dfd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,10 @@ file = "src/shiver/_version.py" [tool.setuptools.packages.find] where = ["src"] +exclude = ["tests*", "DGS_SC_scripts*"] + +[tool.setuptools.package-data] +mypkg = ["*.yml","*.yaml","*.ini"] [project.gui-scripts] shiver = "shiver:main" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 6fa065ab..00000000 --- a/setup.cfg +++ /dev/null @@ -1,68 +0,0 @@ -[metadata] -name = shiver -version = 0.0.1 -distance = 0 -description = Spectroscopy Histogram Visualizer for Event Reduction -long_description_content_type = text/markdown -url = https://github.com/neutrons/Shiver/ - -[options] -package_dir = - =src -include_package_data = True -packages = find: -python_requires >= 3.8 -install_requires = - mantidworkbench - pyoncat == 1.6.1 - qtpy -tests_require = - pylint - flake8 - black - pytest - mock - -[options.packages.find] -where = - src -exclude = - tests* - DGS_SC_scripts* - -[options.package_data] -* = - *.txt - *.yml - *.yaml - *.ini - -[options.extras_require] -dev = - versioningit -tests = pytest - -[flake8] -max-line-length = 120 -ignore = E203, W503 -exclude = conda.recipe/meta.yml - -[versioning] -source-version-file = shiver/_version.py -version-pattern = {tag} -commit-message-pattern = {raw} -tag-message-pattern = {raw} - -[coverage:run] -source = src/shiver -omit = - */tests/* - conda.recipe/* - docs/* - DGS_SC_scripts/* - -[coverage:report] - # temp set low until project is more developed, default 60 -fail_under = 1 -exclude_lines = - if __name__ == "__main__": From db380ea20890319d6456f57c2b69ead72cdee58f Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 12:34:51 -0400 Subject: [PATCH 24/28] added only url and package data for template file --- setup.cfg | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..f763c35d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[metadata] +url = https://github.com/neutrons/Shiver/ + +[options.package_data] +* = + *.ini From d60778fea7a73489b3b0f57c65bb845e0a3180d5 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 12:53:46 -0400 Subject: [PATCH 25/28] url moved to pyproject, updated to include .ini file in wheel on server --- pyproject.toml | 5 ++++- setup.cfg | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 17c1dfd1..6fd70502 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,9 @@ dependencies = [ "pyoncat == 1.6.1" ] +[project.urls] +"Homepage" = "https://github.com/neutrons/Shiver/" + [build-system] requires = [ "setuptools", @@ -29,7 +32,7 @@ where = ["src"] exclude = ["tests*", "DGS_SC_scripts*"] [tool.setuptools.package-data] -mypkg = ["*.yml","*.yaml","*.ini"] +"*" = ["*.yml","*.yaml","*.ini"] [project.gui-scripts] shiver = "shiver:main" diff --git a/setup.cfg b/setup.cfg index f763c35d..fd457e27 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[metadata] -url = https://github.com/neutrons/Shiver/ - [options.package_data] * = *.ini From 5ec618f3c1f38d0bdac8f83ebfec5fd40fc825c7 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 13:10:25 -0400 Subject: [PATCH 26/28] removed setup.cfg again --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fd457e27..00000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[options.package_data] -* = - *.ini From 8bc2aeee5f5a599478db167409518b714f3ddd4f Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 13:14:19 -0400 Subject: [PATCH 27/28] setup.cfg with package data needed --- setup.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..e69de29b From c6c7dc44182f6c37c5169c205122c1ab443fa0a0 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Tue, 29 Aug 2023 14:12:41 -0400 Subject: [PATCH 28/28] setup file removed --- setup.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e69de29b..00000000