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 for filenames which contain regular expressions #231

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

williamjameshandley
Copy link
Collaborator

@williamjameshandley williamjameshandley commented Sep 11, 2022

Description

Filenames which contain regex characters (like '+') currently cannot be read.

PR introduces a failing test, which is fixed by changing one line to include an re.escape(...). I have also removed the .ranges files in the examples, since these are no longer used as of #212.

Checklist:

  • I have performed a self-review of my own code
  • My code is PEP8 compliant (flake8 anesthetic tests)
  • My code contains compliant docstrings (pydocstyle --convention=numpy anesthetic)
  • New and existing unit tests pass locally with my changes (python -m pytest)
  • I have added tests that prove my fix is effective or that my feature works

@williamjameshandley williamjameshandley added the bug Something isn't working label Sep 11, 2022
@williamjameshandley williamjameshandley added this to the 2.0.1 milestone Sep 11, 2022
@codecov
Copy link

codecov bot commented Sep 11, 2022

Codecov Report

Merging #231 (4c2a1c1) into master (85d5243) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #231   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines         2182      2182           
=========================================
  Hits          2182      2182           
Impacted Files Coverage Δ
anesthetic/read/cobaya.py 100.00% <100.00%> (ø)
anesthetic/read/getdist.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@williamjameshandley williamjameshandley marked this pull request as ready for review September 11, 2022 16:35
Copy link
Collaborator

@lukashergt lukashergt left a comment

Choose a reason for hiding this comment

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

Looks good, please squash and merge.

@williamjameshandley williamjameshandley merged commit a28ffe4 into master Sep 12, 2022
@williamjameshandley williamjameshandley deleted the regex_escape branch September 12, 2022 07:26
@williamjameshandley williamjameshandley restored the regex_escape branch January 19, 2023 21:54
@williamjameshandley williamjameshandley deleted the regex_escape branch June 14, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants