heidelbergcement / hcrystalball

A library that unifies the API for most commonly used libraries and modeling techniques for time-series forecasting in the Python ecosystem.
https://hcrystalball.readthedocs.io/
MIT License
151 stars 19 forks source link

Python version, neither filter for folders not taken into account from setup.cfg #22

Closed MichalChromcak closed 3 years ago

MichalChromcak commented 4 years ago

For some reason, the following section is not taken into account when creating distribution for PyPI with python setup.py sdist bdist_wheel.

Such command creates hcrystalball-0.1.4.post0.dev13+gfcf6b6d.dirty-py2.py3-none-any.whl while support for Python 2 should not be included (python_requires = >=3.7)

Also dev and test folders are included in the tar.gz even they are mentioned in [options.packages.find] exclude

(hcb_conda) [hcrystalball-0.1.4.post0.dev13+gfcf6b6d.dirty] ls -l                                                 10:34:29  ☁  matplotlib_base ☂ ⚡ ✭
total 80
-rw-r--r--   1 michalchromcak  staff   370 Jul  2 10:09 AUTHORS.rst
-rw-r--r--   1 michalchromcak  staff   553 Jul  2 15:11 CHANGELOG.rst
-rw-r--r--   1 michalchromcak  staff  1083 Jun 29 13:35 LICENSE.txt
-rw-r--r--   1 michalchromcak  staff  7427 Jul  3 10:28 PKG-INFO
-rw-r--r--   1 michalchromcak  staff  5340 Jul  3 00:07 README.md
drwxr-xr-x   8 michalchromcak  staff   256 Jul  3 10:28 dev
drwxr-xr-x  16 michalchromcak  staff   512 Jul  3 10:28 docs
-rw-r--r--   1 michalchromcak  staff  1189 Jul  3 08:44 environment.yml
-rw-r--r--   1 michalchromcak  staff  1736 Jul  3 10:28 setup.cfg
-rw-r--r--   1 michalchromcak  staff   550 Jul  3 10:18 setup.py
drwxr-xr-x   4 michalchromcak  staff   128 Jul  3 10:28 src
drwxr-xr-x   5 michalchromcak  staff   160 Jul  3 10:28 tests

https://github.com/heidelbergcement/hcrystalball/blob/1b42c12487c577b27034a2740e2c41a268e289bc/setup.cfg#L49-L54

MichalChromcak commented 4 years ago

@xhochy seeing your extensive professional background, would you know how this could be resolved? Thanks @cdeil for pointing me out to Uwe.

xhochy commented 4 years ago

As this is setup with pyscaffold, I'm unable to help sadly. pyscaffold hides too many notches to understand easily what is going wrong.

cdeil commented 4 years ago

@xhochy - Is there some project scaffold that you recommend for small pure-Python projects like this one?

In the past I've just written a minimal setup.py and setup.cfg manually, and used setuptools-scm for versioning, i.e. no scaffold project template really.

MichalChromcak commented 4 years ago

@therhaag any idea how to solve it?

xhochy commented 4 years ago

@xhochy - Is there some project scaffold that you recommend for small pure-Python projects like this one?

I still have to opensource my scaffold but https://github.com/xhochy/fletcher/blob/master/setup.py is pretty close to it. In some cases, it helps to have a src/ directory where your main module(s) live. The important thing is that nowadays setuptools and setuptools_scm work with so small overhead that I believe that pyscaffold is harming more than it helps as it obfuscates things a bit.

cdeil commented 4 years ago

@MichalChromcak - my recommendation is to remove pyscaffold and to use setuptools_scm for versioning. Personally I don't like the src folder, but whether you put hcrystalball directly or in src/hcrystalball as-is, either way it'll work and be fine.

MichalChromcak commented 3 years ago

No plan big need to improve here