Skip to content

Commit

Permalink
Allow "." in beaker names (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored Apr 27, 2022
1 parent b426ab2 commit 4fcc8d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed behavior of `Beaker.dataset.create()` and `Beaker.dataset.sync()` with respect to source files. By default now, source files and directories will be uploading as their given path, instead of just their name. You can still get the old behavior by passing `strip_paths=True`.
- Changed default value of `max_workers` to `None` in `Beaker.dataset.create()` and `.sync()`.
When left as `None`, the number of workers will be determined by the [`ThreadPoolExecutor`](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor).
- "." now allowed in beaker names.

## [v0.12.0](https://github.com/allenai/beaker-py/releases/tag/v0.12.0) - 2022-04-26

Expand Down
5 changes: 3 additions & 2 deletions beaker/services/service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def url_quote(self, id: str) -> str:
return urllib.parse.quote(id, safe="")

def validate_beaker_name(self, name: str):
if not name.replace("-", "").replace("_", "").isalnum():
if not name.replace("-", "").replace("_", "").replace(".", "").isalnum():
raise ValueError(
f"Invalid name '{name}'. Beaker names can only contain letters, digits, dashes, and underscores."
f"Invalid name '{name}'. Beaker names can only contain letters, "
f"digits, periods, dashes, and underscores."
)

0 comments on commit 4fcc8d5

Please sign in to comment.