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

enable preview for PRs? #297

Closed
yarikoptic opened this issue Mar 29, 2023 · 10 comments
Closed

enable preview for PRs? #297

yarikoptic opened this issue Mar 29, 2023 · 10 comments

Comments

@yarikoptic
Copy link
Contributor

yarikoptic commented Mar 29, 2023

I guess would need smth like https://github.com/marketplace/actions/deploy-pr-preview . Inspired by inability to see the result in #294

@Remi-Gau
Copy link
Collaborator

that would be nice but never took the time to implement it

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Jul 9, 2023

tried to use netlify but so far failing in CI because of some bids schema version that is not PEP compliant (???)

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Jul 9, 2023

9:28:52 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
9:28:45 AM: build-image version: 1ae4e4d7d5e3544ab1eb7f270391cdbb47c1e1e5 (focal)
9:28:45 AM: buildbot version: 1ae4e4d7d5e3544ab1eb7f270391cdbb47c1e1e5
9:28:46 AM: Fetching cached dependencies
9:28:46 AM: Failed to fetch cache, continuing with build
9:28:46 AM: Starting to prepare the repo for build
9:28:46 AM: No cached dependencies found. Cloning fresh repo
9:28:46 AM: git clone --filter=blob:none https://github.com/bids-standard/bids-starter-kit
9:28:46 AM: Preparing Git Reference pull/301/head
9:28:49 AM: Starting to install dependencies
9:28:49 AM: Python version set to 3.8
9:28:49 AM: Installing pip dependencies
9:28:49 AM: Started restoring cached pip cache
9:28:49 AM: Finished restoring cached pip cache
9:28:50 AM: Processing ./tools/bids-specification/tools/schemacode
9:28:50 AM:   Installing build dependencies: started
9:28:51 AM:   Installing build dependencies: finished with status 'done'
9:28:51 AM:   Getting requirements to build wheel: started
9:28:52 AM:   Getting requirements to build wheel: finished with status 'error'
9:28:52 AM:   ERROR: Command errored out with exit status 1:
9:28:52 AM:    command: /opt/buildhome/python3.8/bin/python /tmp/tmpj78uppso get_requires_for_build_wheel /tmp/tmpiatlm0te
9:28:52 AM:        cwd: /tmp/pip-req-build-nymffkrr
9:28:52 AM:   Complete output (44 lines):
9:28:52 AM:   /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/expand.py:132: SetuptoolsWarning: File '/tmp/pip-req-build-nymffkrr/bidsschematools/data/schema/SCHEMA_VERSION' cannot be found
9:28:52 AM:     return '\n'.join(
9:28:52 AM:   Traceback (most recent call last):
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py, line 597, in _parse_version
9:28:52 AM:       Version(version)
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/_vendor/packaging/version.py, line 198, in __init__
9:28:52 AM:       raise InvalidVersion(fInvalid version: '{version}')
9:28:52 AM:   setuptools.extern.packaging.version.InvalidVersion: Invalid version: ''
9:28:52 AM:   During handling of the above exception, another exception occurred:
9:28:52 AM:   Traceback (most recent call last):
9:28:52 AM:     File /tmp/tmpj78uppso, line 280, in <module>
9:28:52 AM:       main()
9:28:52 AM:     File /tmp/tmpj78uppso, line 263, in main
9:28:52 AM:       json_out['return_val'] = hook(**hook_input['kwargs'])
9:28:52 AM:     File /tmp/tmpj78uppso, line 114, in get_requires_for_build_wheel
9:28:52 AM:       return hook(config_settings)
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/build_meta.py, line 341, in get_requires_for_build_wheel
9:28:52 AM:       return self._get_build_requires(config_settings, requirements=['wheel'])
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/build_meta.py, line 323, in _get_build_requires
9:28:52 AM:       self.run_setup()
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/build_meta.py, line 338, in run_setup
9:28:52 AM:       exec(code, locals())
9:28:52 AM:     File <string>, line 1, in <module>
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/__init__.py, line 107, in setup
9:28:52 AM:       return distutils.core.setup(**attrs)
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py, line 159, in setup
9:28:52 AM:       dist.parse_config_files()
9:28:52 AM:     File /opt/buildhome/python3.8/lib/python3.8/site-packages/_virtualenv.py, line 21, in parse_config_files
9:28:52 AM:       result = old_parse_config_files(self, *args, **kwargs)
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/dist.py, line 894, in parse_config_files
9:28:52 AM:       setupcfg.parse_configuration(
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py, line 189, in parse_configuration
9:28:52 AM:       meta.parse()
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py, line 500, in parse
9:28:52 AM:       section_parser_method(section_options)
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py, line 475, in parse_section
9:28:52 AM:       self[name] = value
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py, line 293, in __setitem__
9:28:52 AM:       parsed = self.parsers.get(option_name, lambda x: x)(value)
9:28:52 AM:     File /tmp/pip-build-env-h2gbm9cw/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py, line 599, in _parse_version
9:28:52 AM:       raise OptionError(
9:28:52 AM:   distutils.errors.DistutilsOptionError: Version loaded from file:bidsschematools/data/schema/SCHEMA_VERSION does not comply with PEP 440:
9:28:52 AM:   ----------------------------------------
9:28:52 AM: ERROR: Command errored out with exit status 1: /opt/buildhome/python3.8/bin/python /tmp/tmpj78uppso get_requires_for_build_wheel /tmp/tmpiatlm0te Check the logs for full command output.
9:28:52 AM: Error installing pip dependencies
9:28:52 AM: Build was terminated: dependency_installation script returned non-zero exit code: 1
9:28:52 AM: Failing build: Failed to install dependencies

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Jul 9, 2023

also struggling to set up the action you mentioned because of what seems to be a token access issue.

see PR #301

@sappelhoff
Copy link
Member

Remi asked me for help on this, and I'll look into it soon (using the netlify preview, as for the bids-website repo)

@sappelhoff sappelhoff self-assigned this Sep 2, 2023
@sappelhoff
Copy link
Member

sappelhoff commented Sep 11, 2023

currently trying to get netlify going for this -- but I run into this during the build step of netlify:

2:26:58 PM: distutils.errors.DistutilsOptionError: Version loaded from file:bidsschematools/data/schema/SCHEMA_VERSION does not comply with PEP 440:

and to be fair, the SCHEMA_VERSION does look uncompliant:

https://github.com/bids-standard/bids-specification/blob/76db9aa8fbdc32ed1b5f073a5617407112b23ea6/src/schema/SCHEMA_VERSION#L1

feel free to check yourself:

from pep440 import is_canonical

is_canonical('7.2.0-dev')  # this will yield False

Should we perhaps make the versioning system compliant with pep440? Something like 7.2.0.dev0 (or 7.2.0.dev1, if a version 7.1.x has been released in the meantime, etc.)

cc @effigies

EDIT: The funny thing is, that I cannot reproduce it locally. There, everything works as expected and without errors.

@bendhouseart
Copy link
Contributor

EDIT: The funny thing is, that I cannot reproduce it locally. There, everything works as expected and without errors.

Seems to not check out on Python 3.11, you mentioned in the meeting it failed on some part of the make nelify?

pip3 install pep440
Collecting pep440
  Downloading pep440-0.1.2-py3-none-any.whl (4.6 kB)
Installing collected packages: pep440
Successfully installed pep440-0.1.2
python
Python 3.11.0 (v3.11.0:deaf509e8f, Oct 24 2022, 14:43:23) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pep440 import is_canonical
>>> is_canonical("7.2.0-dev")
False
>>> 

Seems like it would be nice to be compliant with PEP 440, is this going to create issues with backwards compatibility?

@effigies
Copy link
Contributor

The ridiculous thing is that we specifically used something with a clear PEP440 normalization: https://peps.python.org/pep-0440/#development-release-separators

@bendhouseart
Copy link
Contributor

The ridiculous thing is that we specifically used something with a clear PEP440 normalization: https://peps.python.org/pep-0440/#development-release-separators

Oh, this is weird. There haven't been any changes in the pep440 library since last year according to page on pypi so this has existed for quite a while.

@Remi-Gau
Copy link
Collaborator

closing as this will probably be made obsolete by the merge of our websites.

@sappelhoff sappelhoff removed their assignment Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

5 participants