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

pysoundfile 0.12.1 ❄️ #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

psteyer
Copy link

@psteyer psteyer commented Sep 26, 2024

pysoundfile 0.12.1 ❄️

Destination channel: Snowflake

Links

wfdb <- pysoundfile <- libsndfile <- libopus

Explanation of changes:

  • new recipe build
  • Skipping Windows and s390x for missing dependency libsnfile
  • current source does not bring in a vendored libsndfile, but added a patch and a line in the recipe to make sure.
  • required rebuilds of libopus and libsndfile, which then solved earlier test failures.

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_c5vkbnzan2/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

===== ERRORS =====

  • clone/recipe/meta.yaml:50: missing_pip_check: For pypi packages, pip check should be present in the test commands
    ===== Final Report: =====
    1 Error and 4 Warnings were found

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_4b4gflhn02/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

===== ERRORS =====

  • clone/recipe/meta.yaml:50: missing_pip_check: For pypi packages, pip check should be present in the test commands
    ===== Final Report: =====
    1 Error and 4 Warnings were found

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_4b3yy4bzfc/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

===== ERRORS =====

  • clone/recipe/meta.yaml:44: missing_pip_check: For pypi packages, pip check should be present in the test commands
    ===== Final Report: =====
    1 Error and 4 Warnings were found

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_abye0cmolr/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

===== ERRORS =====

  • clone/recipe/meta.yaml:49: missing_pip_check: For pypi packages, pip check should be present in the test commands
  • clone/recipe/meta.yaml:20: patch_unnecessary: patch should not be in build when source/patches is not set
    ===== Final Report: =====
    2 Errors and 4 Warnings were found

@anaconda-pkg-build
Copy link

Linter check found the following problems: Traceback (most recent call last): File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/run.py", line 208, in main return_code, report = execute_linter( ^^^^^^^^^^^^^^^ File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/run.py", line 180, in execute_linter result = linter.lint(recipes, subdir, variant_config_files, exclusive_config_files, fix_flag) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/lint/__init__.py", line 728, in lint msgs = self.lint_file( ^^^^^^^^^^^^^^^ File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/lint/__init__.py", line 834, in lint_file self.lint_recipe( File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/lint/__init__.py", line 894, in lint_recipe res = self.check_instances[check].run(recipe, fix) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/lint/__init__.py", line 294, in run self.check_recipe(recipe) File "/opt/conda/envs/linter/lib/python3.12/site-packages/anaconda_linter/lint/check_syntax.py", line 35, in check_recipe ro_parser: Final[RecipeParser] = recipe.get_read_only_parser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/linter/lib/python3.12/site-packages/percy/render/recipe.py", line 675, in get_read_only_parser return RecipeParser("\n".join(self.meta_yaml)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/linter/lib/python3.12/site-packages/percy/parser/recipe_parser.py", line 372, in __init__ parent = node_stack[-1] ~~~~~~~~~~^^^^ IndexError: list index out of range

ERROR conda.cli.main_run:execute(125): conda run conda-lint /tmp/abs_907mx88ge4/clone failed. (See above for error)

@psteyer psteyer marked this pull request as ready for review September 27, 2024 20:30
@psteyer psteyer self-assigned this Sep 27, 2024
recipe/meta.yaml Outdated
- export PYSOUNDFILE_PLATFORM=win32
- python -m pip install . --no-deps -vv
# To make sure we really do not bring in _soundfile_data
- rm -rf _soundfile_data

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail on Windows

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windows is skipped anyway

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's being skipped on windows anyways no need to add anything correct?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine personally

recipe/meta.yaml Outdated
python -c "import soundfile; print(soundfile._libname)"
# Verify that soundfile is linking the correct libsndfile object
- python -c "import soundfile; print(soundfile._libname)"
- pytest -vv . -k "not (test_available_formats or test_available_subtypes)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you skip test_available_formats and test_available_subtypes?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, a comment here would be good

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to get the tests to run. It seems that there is one format format and one subtype that are throwing assertion errors, maybe they are missing, or the wrapper is doing something strange?

See failures:

=================================== FAILURES ===================================
____________________________ test_available_formats ____________________________

    def test_available_formats():
        formats = sf.available_formats()
        assert 'WAV' in formats
>       assert 'OGG' in formats
E       AssertionError: assert 'OGG' in {'AIFF': 'AIFF (Apple/SGI)', 'AU': 'AU (Sun/NeXT)', 'AVR': 'AVR (Audio Visual Research)', 'CAF': 'CAF (Apple Core Audio File)', ...}

tests/test_soundfile.py:1005: AssertionError
___________________________ test_available_subtypes ____________________________

    def test_available_subtypes():
        subtypes = sf.available_subtypes()
        assert 'PCM_24' in subtypes
        assert 'FLOAT' in subtypes
>       assert 'VORBIS' in subtypes
E       AssertionError: assert 'VORBIS' in {'ALAC_16': '16 bit ALAC', 'ALAC_20': '20 bit ALAC', 'ALAC_24': '24 bit ALAC', 'ALAC_32': '32 bit ALAC', ...}

tests/test_soundfile.py:1013: AssertionError

I'm not exactly sure how to proceed. I'm currently building the parent package wfdb to see if this would cause a problem farther down the road.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well it looks like you haven't got ogg vorbis enabled. Maybe your libsndfile hasn't been compiled with that support enabled, or maybe something else. Does snowflake want ogg vorbis support? if so, you'd need to fix it

recipe/meta.yaml Outdated
- export PYSOUNDFILE_PLATFORM=win32
- python -m pip install . --no-deps -vv
# To make sure we really do not bring in _soundfile_data
- rm -rf _soundfile_data
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windows is skipped anyway

# Verify that soundfile is linking the correct libsndfile object
python -c "import soundfile; print(soundfile._libname)"
# Verify that soundfile is linking the correct libsndfile object
- python -c "import soundfile; print(soundfile._libname)"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should be the correct libname? It might be nicer to fail if not correct

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This came in when forked from conda-forge. I can remove it and see if it's necessary.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could pipe the output from this into something that checks that the text output from print(soundfile._libname) is correct

recipe/meta.yaml Outdated
python -c "import soundfile; print(soundfile._libname)"
# Verify that soundfile is linking the correct libsndfile object
- python -c "import soundfile; print(soundfile._libname)"
- pytest -vv . -k "not (test_available_formats or test_available_subtypes)"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, a comment here would be good

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_99wz0tl4xq/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

===== ERRORS =====

  • clone/recipe/meta.yaml:52: missing_pip_check: For pypi packages, pip check should be present in the test commands
  • clone/recipe/meta.yaml:23: patch_unnecessary: patch should not be in build when source/patches is not set
    ===== Final Report: =====
    2 Errors and 4 Warnings were found

Copy link

@ryanskeith ryanskeith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants