Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move versioneer configuration from setup.cfg to pyproject.toml #256

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

yarikoptic
Copy link
Member

versioneer became a bit too obnoxious in reporting its success and fail stories to the user in stdout which we rely on using as a result of an inquiry to setup.py:

❯ python setup.py --name 2>/dev/null
Failed to load config from /home/yoh/proj/datalad/datalad-container/pyproject.toml: 'versioneer'
Try to load it from setup.cfg
datalad_container
❯ echo $?
0

to workaround -- just moving its configuration to its preferred location - pyproject.toml and it starts to behave a bit better

versioneer became a bit too obnoxious in reporting its success and fail stories
to the user in stdout which we rely on using as a result of an inquiry to
setup.py:

	❯ python setup.py --name 2>/dev/null
	Failed to load config from /home/yoh/proj/datalad/datalad-container/pyproject.toml: 'versioneer'
	Try to load it from setup.cfg
	datalad_container
	❯ echo $?
	0

to workaround -- just moving its configuration to its preferred location -
pyproject.toml and it starts to behave a bit better
@yarikoptic yarikoptic added release Create a release when this pr is merged internal Changes only affect the internal API labels Jan 17, 2024
Copy link

codeclimate bot commented Jan 17, 2024

Code Climate has analyzed commit 6e560d7 and detected 0 issues on this pull request.

View more on Code Climate.

@yarikoptic
Copy link
Member Author

wow -- quite wild side-effects

Running "build_script" scripts
python -m pip install -q -r requirements-devel.txt
  ERROR: Command errored out with exit status 1:
   command: /home/appveyor/dlvenv/bin/python /home/appveyor/DLTMP/tmpjm4hxin6 get_requires_for_build_wheel /home/appveyor/DLTMP/tmpbz0ku69x
       cwd: /home/appveyor/projects/datalad-container
  Complete output (27 lines):
  Traceback (most recent call last):
    File "/home/appveyor/DLTMP/tmpjm4hxin6", line 280, in <module>
      main()
    File "/home/appveyor/DLTMP/tmpjm4hxin6", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/appveyor/DLTMP/tmpjm4hxin6", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/home/appveyor/DLTMP/pip-build-env-pfgxta44/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/home/appveyor/DLTMP/pip-build-env-pfgxta44/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "/home/appveyor/DLTMP/pip-build-env-pfgxta44/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 480, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "/home/appveyor/DLTMP/pip-build-env-pfgxta44/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line [311](https://ci.appveyor.com/project/mih/datalad-container/builds/48967357/job/38ej3yj95dubq1c2#L311), in run_setup
      exec(code, locals())
    File "<string>", line 15, in <module>
    File "/home/appveyor/projects/datalad-container/versioneer.py", line 1871, in get_version
      return get_versions()["version"]
    File "/home/appveyor/projects/datalad-container/versioneer.py", line 1803, in get_versions
      cfg = get_config_from_root(root)
    File "/home/appveyor/projects/datalad-container/versioneer.py", line 416, in get_config_from_root
      parser.get("versioneer", "VCS")  # raise error if missing
    File "/usr/lib/python3.8/configparser.py", line 781, in get
      d = self._unify_values(section, vars)
    File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
      raise NoSectionError(section) from None
  configparser.NoSectionError: No section: 'versioneer'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/appveyor/dlvenv/bin/python /home/appveyor/DLTMP/tmpjm4hxin6 get_requires_for_build_wheel /home/appveyor/DLTMP/tmpbz0ku69x Check the logs for full command output.
Command exited with code 1
Running "on_finish" scripts
while [ -f ~/BLOCK ]; do sleep 5; done

and I guess it got there since there is no tomli but then sounds like chicken/egg issue -- let's try anyways

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c4c2945) 94.70% compared to head (6e560d7) 94.70%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #256   +/-   ##
=======================================
  Coverage   94.70%   94.70%           
=======================================
  Files          24       24           
  Lines        1133     1133           
=======================================
  Hits         1073     1073           
  Misses         60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yarikoptic
Copy link
Member Author

ha, ok, no chicken/egg then, all good. Let's see if that resolves our release issues!

@yarikoptic yarikoptic merged commit f468228 into datalad:master Jan 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Changes only affect the internal API release Create a release when this pr is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant