Skip to content
Open
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
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ get larger files from common open-access data repositories.
## Installing and usage
To install:

```bash
```
python -m pip install scikit-hep-testdata
```

Once installed, absolute file paths can be resolved using the helper methods:

``` python
```python
from skhep_testdata import data_path

filename = data_path("some_file.root")
Expand Down Expand Up @@ -60,18 +60,38 @@ files.
### Command-line invocation
You can also interact with this package from the command-line:

```bash
```
# Print a path (download if needed)
python -m skhep_testdata cms_hep_2012_tutorial/data.root
skhep-testdata cms_hep_2012_tutorial/data.root

# Show all "local" files
python -m skhep_testdata --list
skhep-testdata --list

# Download all files to an existing directory
python -m skhep_testdata --all --dir local
skhep-testdata --all --dir local
```

You can also use `pipx run scikit-hep-testdata` to access the above CLI without installing.
Note: The `scikit-hep-testdata` and `skhep-testdata` command-line tools are the equivalent of `python -m skhep_testdata`.

You can also use any of the following to access the above CLI without installing.

* uv:

```
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```
```bash

Copy link
Member Author

Choose a reason for hiding this comment

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

Bash syntax highlighting on GitHub looks the same as no syntax highlighting on GitHub if you aren't using explicit Bash commands. I would normally suggest console, as that's more correct as people will be executing these in shells regardless of shell type, but that does change the syntax highlighting in a way that just converts all of it to a new color, which isn't very useful.

Is there an advantage to selecting bash here? If no, should we change Scikit-HEP style recommendations?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess none of the three options are much better than the others.

skhep-testdata --all --dir local
skhep-testdata --all --dir local
skhep-testdata --all --dir local

But to be consistent with the rest of the readme, it would be good to keep using bash or switch everything else to either of the other options.

Copy link
Member

@APN-Pucky APN-Pucky Nov 24, 2025

Choose a reason for hiding this comment

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

Besides consistency, it also adds context for LLMs even if it does not change visually on Github. I don't think sh vs bash vs console matters, except that bash seems more common. Maybe all should be changed to console then?

Copy link
Member Author

@matthewfeickert matthewfeickert Nov 26, 2025

Choose a reason for hiding this comment

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

Nothing:

skhep-testdata --all --dir local

bash:

skhep-testdata --all --dir local

console:

skhep-testdata --all --dir local

@ariostas @APN-Pucky I think that this demonstrates why trying to apply a blanket default to every code block is not a reasonable approach. bash means Bash code. A tool CLI is not Bash, and so the local is "correctly" incorrectly highlighted, as local is valid Bash keyword. console is a different color and looks strange because it is expecting to display a command at the prompt and the output, as can be seen in this example

$ skhep-testdata --all --help
usage: skhep_testdata [-h] [--all] [--list] [--dir DIR] [file_path ...]

Expand a testing dataset path to a full path, downloading things if a remote file is request.

positional arguments:
  file_path             Path to expand

options:
  -h, --help            show this help message and exit
  --all                 Download all files
  --list                List all files
  --dir DIR             Path to store in (DEFAULT: ~/.local/skhepdata)

Besides consistency, it also adds context for LLMs even if it does not change visually on Github

I do not find this to be a good argument. We should not be changing how we write human documentation for LLMs — that seems the wrong way round in terms of adaptation. It is reasonable to write different forms of docs if you want to cater to LLMs, but it would also provide incorrect context to label things as bash or console when they're not.

But to be consistent with the rest of the readme, it would be good to keep using bash or switch everything else to either of the other options.

I'd prefer to move to removing syntax hints that do not correspond to the actual language in the block. Though if others would prefer other options I'd suggest moving this to a GitHub Issue for additional discussion and following up on the mailing list for GitHub org wide agreement.

uvx scikit-hep-testdata
```

* pipx:

```
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```
```bash

pipx run scikit-hep-testdata
```

* Pixi:

```
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```
```bash

pixi exec scikit-hep-testdata
```


## Adding new files
Expand Down Expand Up @@ -146,6 +166,6 @@ This project follows the [all-contributors](https://github.com/all-contributors/
This package uses `pytest` to run the unit tests. Install with `pip install scikit-hep-testdata[test]` or `pip install -e .[test]` (dev) to get the testing requirements.
then run:

```bash
```
pytest
```