pytorch-forecasting icon indicating copy to clipboard operation
pytorch-forecasting copied to clipboard

"RuntimeError: This does not appear to be a Git project" caused by poetry-dynamic-versioning

Open skupr-anaconda opened this issue 1 year ago • 2 comments

  • PyTorch-Forecasting version: 0.10.3
  • PyTorch version: 1.13.1
  • Python version: 3.8-3.11
  • Operating System: osx-64, osx-arm64, linux-64, linux-ppc64le, linux-aarch64, win64

Expected behavior

I'm building the package from sources (1. https://github.com/jdb78/pytorch-forecasting/archive/refs/tags/v0.10.3.tar.gz and 2. https://pypi.org/project/pytorch-forecasting/0.10.3/#files) and expected to build it without errors by conda-build and that poetry-dynamic-versioning works correctly.

Actual behavior

However, the result was RuntimeError: This does not appear to be a Git project I think it is caused by poetry-dynamic-versioning.

Code to reproduce the problem

I run from https://github.com/AnacondaRecipes/pytorch-forecasting-feedstock:

git clone [email protected]:AnacondaRecipes/pytorch-forecasting-feedstock.git then

conda-build .

I tried to apply a patch to temporarily fix it but it would be better if you can fix it on your side too.

See discussion here https://github.com/AnacondaRecipes/pytorch-forecasting-feedstock/pull/2

Also, it's not related but I must also say:

  • the PyPi sdist does not contain tests folder. Could you add it too (if they are not huge)?
  • could you fix optuna compatibility with v3.x.x? Because you have ^2.3.0 https://github.com/jdb78/pytorch-forecasting/blob/v0.10.3/pyproject.toml#L59

skupr-anaconda avatar Jul 18 '23 08:07 skupr-anaconda

This can also be reproduced by running:

pip install https://files.pythonhosted.org/packages/02/f0/92eb7e55f665de688120590bcee95b6704f8c6c07ae07d1255ecf734997e/pytorch_forecasting-0.10.3.tar.gz

The normal pip install pytorch-forecasting works fine because pip uses the wheel available, and as it is python only, it is used everywhere. Anything relying on sdist tarball is currently broken.

rafaelmartins avatar Jul 18 '23 08:07 rafaelmartins

It might be possible that it happens because of lack of .git directory, mandated due to dynamic versioning. See https://github.com/AdnanHodzic/auto-cpufreq/issues/623

rootCircle avatar Jan 21 '24 09:01 rootCircle