From bc82045e953e675712c46a1ea280b47441d07bfa Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Wed, 30 Aug 2023 15:21:41 -0400 Subject: [PATCH 1/6] version variables updated and other params in meta.yaml --- conda.recipe/meta.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 1a53e8a2..34452b27 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,16 +1,15 @@ # 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 %} +{% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} package: name: shiver - version: {{ version_number }} + version: {{ version }} source: path: .. @@ -18,7 +17,7 @@ source: build: noarch: python linux-64: python - number: {{ version_number }} + number: {{ git_describe_number }} string: py{{py}} script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv @@ -36,7 +35,6 @@ requirements: about: home: {{ url }} - license: {{ license }} license_family: GPL license_file: ../LICENSE summary: {{ description }} From 746b0f9fd2a2f22156e77e1e743b073672aef34d Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Wed, 30 Aug 2023 16:36:17 -0400 Subject: [PATCH 2/6] poetry added to read variables from pyproject.toml, python version updated for mantid compatibility --- conda.recipe/meta.yaml | 9 +++++---- environment.yml | 1 + pyproject.toml | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 34452b27..aed070b5 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,7 +1,8 @@ -# load information from setup.cfg/setup.py -{% set data = load_setup_py_data() %} -{% set description = data.get('description') %} -{% set url = data.get('url') %} +-# load information from pyproject.toml through poetry +{% set pyproject = load_file_data('pyproject.toml') %} +{% set poetry = pyproject.get('tool', {}).get('poetry') %} +{% set description = poetry.get('description') %} +{% set url = poetry.get('repository') %} # this will get the version set by environment variable {% set version = environ.get('VERSION') %} {% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} diff --git a/environment.yml b/environment.yml index 19d489dc..a9cb1d52 100644 --- a/environment.yml +++ b/environment.yml @@ -16,6 +16,7 @@ dependencies: - pytest-cov=4.0.0 - setuptools - sphinx + - poetry - python-build - pip - pip: diff --git a/pyproject.toml b/pyproject.toml index 6fd70502..01d56c02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,14 +2,17 @@ name = "shiver" description = "Spectroscopy Histogram Visualizer for Event Reduction" dynamic = ["version"] -requires-python = ">=3.8" +requires-python = ">=3.10" dependencies = [ "mantidworkbench >= 6.6.20230517", "pyoncat == 1.6.1" ] +[tool.poetry] +description = "Spectroscopy Histogram Visualizer for Event Reduction" + [project.urls] -"Homepage" = "https://github.com/neutrons/Shiver/" +homepage = "https://github.com/neutrons/Shiver/" [build-system] requires = [ From ac5ab8e32b3997d0b6dafc965449e555244a9ded Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Wed, 30 Aug 2023 16:54:11 -0400 Subject: [PATCH 3/6] license and urls added and comment fixed --- conda.recipe/meta.yaml | 5 +++-- pyproject.toml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index aed070b5..7e28b0f8 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,13 +1,13 @@ --# load information from pyproject.toml through poetry +# load information from pyproject.toml through poetry {% set pyproject = load_file_data('pyproject.toml') %} {% set poetry = pyproject.get('tool', {}).get('poetry') %} +{% set license = poetry.get('license') %} {% set description = poetry.get('description') %} {% set url = poetry.get('repository') %} # this will get the version set by environment variable {% set version = environ.get('VERSION') %} {% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} - package: name: shiver version: {{ version }} @@ -36,6 +36,7 @@ requirements: about: home: {{ url }} + license: {{ license }} license_family: GPL license_file: ../LICENSE summary: {{ description }} diff --git a/pyproject.toml b/pyproject.toml index 01d56c02..65ef480d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,8 @@ dependencies = [ [tool.poetry] description = "Spectroscopy Histogram Visualizer for Event Reduction" +url = "https://github.com/neutrons/Shiver/" +license = "GPL3.0" [project.urls] homepage = "https://github.com/neutrons/Shiver/" From b58fca74c48b141b0f1301baeeb0ecb630b3731c Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Wed, 30 Aug 2023 20:00:11 -0400 Subject: [PATCH 4/6] dependencies updated, python removed,setup.py removed --- environment.yml | 2 +- pyproject.toml | 11 +++++++++-- setup.py | 8 -------- 3 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 setup.py diff --git a/environment.yml b/environment.yml index a9cb1d52..6e10e18f 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: shiver +name: shiver-pkg channels: - conda-forge - mantid/label/nightly diff --git a/pyproject.toml b/pyproject.toml index 65ef480d..0a9bfd46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,9 @@ name = "shiver" description = "Spectroscopy Histogram Visualizer for Event Reduction" dynamic = ["version"] -requires-python = ">=3.10" dependencies = [ "mantidworkbench >= 6.6.20230517", - "pyoncat == 1.6.1" + "pyoncat ~= 1.6.1" ] [tool.poetry] @@ -29,6 +28,14 @@ build-backend = "setuptools.build_meta" method = "git" default-tag = "0.0.1" +[tool.versioningit.next-version] +method = "minor" + +[tool.versioningit.format] +distance = "{next_version}.dev{distance}" +dirty = "{version}+d{build_date:%Y%m%d}" +distance-dirty = "{next_version}.dev{distance}+d{build_date:%Y%m%d%H%M}" + [tool.versioningit.write] file = "src/shiver/_version.py" diff --git a/setup.py b/setup.py deleted file mode 100644 index 99da8fc6..00000000 --- a/setup.py +++ /dev/null @@ -1,8 +0,0 @@ -""" -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 d70d4ebb3f44f4c755c69714bf70c0d870cbee55 Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Thu, 31 Aug 2023 10:20:48 -0400 Subject: [PATCH 5/6] poetry removed, tags used directly for pyproject.toml variables --- conda.recipe/meta.yaml | 11 ++++++----- environment.yml | 3 +-- pyproject.toml | 6 +----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 7e28b0f8..79812f05 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,9 +1,10 @@ -# load information from pyproject.toml through poetry +# load information from pyproject.toml {% set pyproject = load_file_data('pyproject.toml') %} -{% set poetry = pyproject.get('tool', {}).get('poetry') %} -{% set license = poetry.get('license') %} -{% set description = poetry.get('description') %} -{% set url = poetry.get('repository') %} +{% set project = pyproject.get('project', {}) %} +{% set license = project.get('license').get('text') %} +{% set description = project.get('description') %} +{% set project_url = pyproject.get('project', {}).get('urls') %} +{% set url = project_url.get('homepage') %} # this will get the version set by environment variable {% set version = environ.get('VERSION') %} {% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} diff --git a/environment.yml b/environment.yml index 6e10e18f..19d489dc 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: shiver-pkg +name: shiver channels: - conda-forge - mantid/label/nightly @@ -16,7 +16,6 @@ dependencies: - pytest-cov=4.0.0 - setuptools - sphinx - - poetry - python-build - pip - pip: diff --git a/pyproject.toml b/pyproject.toml index 0a9bfd46..d6a8f37a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,11 +6,7 @@ dependencies = [ "mantidworkbench >= 6.6.20230517", "pyoncat ~= 1.6.1" ] - -[tool.poetry] -description = "Spectroscopy Histogram Visualizer for Event Reduction" -url = "https://github.com/neutrons/Shiver/" -license = "GPL3.0" +license = { text = "GPL3.0" } [project.urls] homepage = "https://github.com/neutrons/Shiver/" From 72c83a18fec7610aff67981dfa67c6c9c66c43fa Mon Sep 17 00:00:00 2001 From: Maria Patrou Date: Thu, 31 Aug 2023 10:38:56 -0400 Subject: [PATCH 6/6] explicit oncat subversion removed --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d6a8f37a..9972a5e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "Spectroscopy Histogram Visualizer for Event Reduction" dynamic = ["version"] dependencies = [ "mantidworkbench >= 6.6.20230517", - "pyoncat ~= 1.6.1" + "pyoncat ~= 1.6" ] license = { text = "GPL3.0" }