You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have to record a version change in 3 files:
pyproject.toml,
conda.recipe/<project>/meta.yaml, and
__init__.py.
This is fragile and often results in inconsistent version reporting.
==> Implement some form of single source versioning.
Helpful Resources
The following may contain various bits of information helpful in this pursuit:
Importing information from pyproject.toml into conda-build flow
Code in the meta.yaml similar to the following may be used to import information (such as the project version number) from the pyproject.toml file into the conda-build flow:
{% set pyproject = load_file_data('pyproject.toml') %}{% set poetry = pyproject.get('tool', {}).get('poetry') %}package:
name: {{ poetry.get('name') }}version: {{ poetry.get('version') }}
Importing package version from pyproject.toml into __init__.py
This SO answer suggests a way to import the version number from pyproject.toml into __init__.py.
When combined with the above technique, this should allow the pyproject.toml file to become the sole source for package version number information.
The text was updated successfully, but these errors were encountered:
* Implemented single source revisioning.
The `pyproject.toml` file is now the sole definer of the project version number.
Fixes#122
* Implemented single source versioning for PyAMI.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Problem Description & Change Request
Currently, we have to record a version change in 3 files:
pyproject.toml
,conda.recipe/<project>/meta.yaml
, and__init__.py
.This is fragile and often results in inconsistent version reporting.
==> Implement some form of single source versioning.
Helpful Resources
The following may contain various bits of information helpful in this pursuit:
Importing information from
pyproject.toml
intoconda-build
flowCode in the
meta.yaml
similar to the following may be used to import information (such as the project version number) from thepyproject.toml
file into theconda-build
flow:See this page for more detail.
Importing package version from
pyproject.toml
into__init__.py
This SO answer suggests a way to import the version number from
pyproject.toml
into__init__.py
.When combined with the above technique, this should allow the
pyproject.toml
file to become the sole source for package version number information.The text was updated successfully, but these errors were encountered: