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

fix: small bug in snakemake.executors #1440

Merged
merged 1 commit into from Mar 1, 2022
Merged

Conversation

holtgrewe
Copy link
Contributor

Description

Fixing an issue where actually sys.stdout should have been used.

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

@holtgrewe
Copy link
Contributor Author

Failure is unrelated and points towards a wrong or out of date assumption regarding temporary file creation @johanneskoester .

============================= test session starts ==============================
platform linux -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0 -- /usr/share/miniconda/envs/snakemake/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/snakemake/snakemake
plugins: requests-mock-1.9.3, cov-3.0.0
collecting ... collected 3 items

tests/test_google_lifesciences.py::test_google_lifesciences FAILED

=================================== FAILURES ===================================
___________________________ test_google_lifesciences ___________________________

    @google_credentials
    def test_google_lifesciences():
        bucket_name = "***-%s" % next(tempfile._get_candidate_names())
>       create_google_storage(bucket_name)

tests/test_google_lifesciences.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_google_lifesciences.py:51: in create_google_storage
    return client.create_bucket(bucket_name)
/usr/share/miniconda/envs/snakemake/lib/python3.9/site-packages/google/cloud/storage/client.py:934: in create_bucket
    bucket = self._bucket_arg_to_bucket(bucket_or_name)
/usr/share/miniconda/envs/snakemake/lib/python3.9/site-packages/google/cloud/storage/client.py:699: in _bucket_arg_to_bucket
    bucket = Bucket(self, name=bucket_or_name)
/usr/share/miniconda/envs/snakemake/lib/python3.9/site-packages/google/cloud/storage/bucket.py:609: in __init__
    name = _validate_name(name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = '***-dfvq2hu_'

    def _validate_name(name):
        """Pre-flight ``Bucket`` name validation.
    
        :type name: str or :data:`NoneType`
        :param name: Proposed bucket name.
    
        :rtype: str or :data:`NoneType`
        :returns: ``name`` if valid.
        """
        if name is None:
            return
    
        # The first and last characters must be alphanumeric.
        if not all([name[0].isalnum(), name[-1].isalnum()]):
>           raise ValueError("Bucket names must start and end with a number or letter.")
E           ValueError: Bucket names must start and end with a number or letter.

@holtgrewe holtgrewe changed the title Fixing small bug in snakemake.executors fix: small bug in snakemake.executors Mar 1, 2022
@sonarcloud
Copy link

sonarcloud bot commented Mar 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester merged commit 6e64292 into main Mar 1, 2022
@johanneskoester johanneskoester deleted the holtgrewe-patch-1 branch March 1, 2022 14:25
@holtgrewe
Copy link
Contributor Author

@johanneskoester could I get a patch release with this? ;-) my Slurm controller server would be very grateful

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.

None yet

2 participants