Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
import os, sys, urllib.error, urllib.request

new = os.environ["NEW"]
url = f"https://pypi.org/pypi/emdatabase/{new}/json"
url = f"https://pypi.org/pypi/em-database/{new}/json"
try:
urllib.request.urlopen(url, timeout=30)
except urllib.error.HTTPError as error:
Expand All @@ -105,7 +105,7 @@ jobs:
print(f"::warning::could not reach PyPI ({error.reason}), skipping the check")
sys.exit(0)
sys.exit(
f"emdatabase {new} is already on PyPI. A version can only ever be "
f"em-database {new} is already on PyPI. A version can only ever be "
f"uploaded once, so pick a higher one."
)
PY
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ A list of all datasets and model weights can be found in our [docs](https://elec
## Installation

```bash
pip install emdatabase
pip install em-database
```
You can install `emdatabase` via pip or as a local install in the usual way.
You can install `em-database` via pip or as a local install in the usual way. The distribution is named `em-database` on PyPI; the import name is `emdatabase`.

## Usage

Expand Down
4 changes: 2 additions & 2 deletions emdatabase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def browse(**kwargs):
Returns an `anywidget` widget listing every dataset grouped by technique,
showing which are downloaded, revealing full metadata on hover, and
downloading on click with a live progress bar. Requires the optional
`anywidget` dependency (`pip install emdatabase[widget]`).
`anywidget` dependency (`pip install em-database[widget]`).

``display(emdatabase)`` renders the same browser.
"""
Expand Down Expand Up @@ -51,7 +51,7 @@ def _repr_mimebundle_(self, include=None, exclude=None, **kwargs):
return {
"text/plain": (
"emdatabase — install the interactive browser with "
"`pip install emdatabase[widget]`, then call "
"`pip install em-database[widget]`, then call "
"emdatabase.browse()."
)
}
Expand Down
8 changes: 4 additions & 4 deletions emdatabase/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,23 +347,23 @@ def card(dataset):
"""Return an interactive card widget for a single dataset (Jupyter).

This backs ``display(dataset)`` / a dataset being the last line in a cell.
Requires anywidget (``pip install emdatabase[widget]``).
Requires anywidget (``pip install em-database[widget]``).
"""
_prepare_frontend()
try:
cls = _make_card_class()
except ImportError as error:
raise ImportError(
"Displaying a dataset needs anywidget. Install it with "
"`pip install emdatabase[widget]` (or `pip install anywidget`)."
"`pip install em-database[widget]` (or `pip install anywidget`)."
) from error
return cls(dataset)


def browse(**kwargs):
"""Return an interactive dataset browser widget for Jupyter.

Requires anywidget (``pip install emdatabase[widget]``). The widget lists
Requires anywidget (``pip install em-database[widget]``). The widget lists
every dataset grouped by technique, shows which are downloaded, reveals full
metadata on hover, and downloads on click with a live progress bar.
"""
Expand All @@ -373,7 +373,7 @@ def browse(**kwargs):
except ImportError as error:
raise ImportError(
"emdatabase.browse() needs anywidget. Install it with "
"`pip install emdatabase[widget]` (or `pip install anywidget`)."
"`pip install em-database[widget]` (or `pip install anywidget`)."
) from error
return cls(**kwargs)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "emdatabase"
name = "em-database"
version = "0.5.0"
description = "A database for electron microscopy data using pooch to download and manage files."
readme = "README.md"
Expand Down
Loading