python-json-pointer icon indicating copy to clipboard operation
python-json-pointer copied to clipboard

Moved the metadata into `setup.cfg`.

Open KOLANICH opened this issue 4 years ago • 5 comments

Added pyproject.toml. Version is now fetched and populated automatically from git tags using setuptools_scm. Metadata stored in source files is fetched using read_version. Got rid of raw scripts, using console_scripts entry point since now.

KOLANICH avatar Jan 02 '22 14:01 KOLANICH

Coverage Status

Coverage decreased (-24.5%) to 75.472% when pulling 70cdcc09b98dec21d4768a64ac27f682ed69bade on KOLANICH-libs:setup.cfg into 896102d605605ec0f48e26bafb54fb591be66ede on stefankoegl:master.

coveralls avatar Jan 02 '22 14:01 coveralls

Coverage Status

Coverage decreased (-96.2%) to 3.797% when pulling a5bab9f417f8363d36b9cb1a7eabab2b1daf32e4 on KOLANICH-libs:setup.cfg into 896102d605605ec0f48e26bafb54fb591be66ede on stefankoegl:master.

coveralls avatar Jan 02 '22 14:01 coveralls

Thanks for your contribution!

Added pyproject.toml. Version is now fetched and populated automatically from git tags using setuptools_scm.

Can you please explain how that's supposed to work? The tests are failing due to the missing (not yet generated?) version.py.

stefankoegl avatar Jan 16 '22 19:01 stefankoegl

Can you please explain how that's supposed to work?

setuptools_scm is a setultools plugin (in fact poetry_core also can invoke them). It is executed on stage of package building. It detects version control system, fetches the latest tag looking like a version and populates a version from it.

The tests are failing due to the missing (not yet generated?) version.py.

You used to have version hardcoded into package, because fetching it using pkg_resources is terribly slow. Fortunately setuptools_scm has a feature to generate such files. But package building is required to generate the file.

I have added it.

Also I saw that the test for 2.7 fails in the testing module. IDK why it fails (I have not touched that file in this PR), but given that PSF itself has dropped 2.7 and that 3.4 works well on Windows XP, so ones wanting to use your module on ancient machines can just use python 3 (also a no longer supported version, but still 3 branch of python), I just disabled CI for 2.7.

The decrease in coverage is because the code that has not been tested (but that has been executed) is no longer executed, the tests succeed though.

KOLANICH avatar Jan 16 '22 21:01 KOLANICH

I've opened the discussion about dropping Python 2.7 support at #48.

stefankoegl avatar Jan 18 '22 15:01 stefankoegl