Skip to content

Commit 76fb452

Browse files
Copilotkhnumdev
andcommitted
Fix README.md formatting issues
Co-authored-by: khnumdev <[email protected]>
1 parent 119fe80 commit 76fb452

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

README.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ pip install local-storage-utils
1414

1515
This installs the `lsu` CLI.
1616

17-
Installing from TestPyPI (for dry-runs)
18-
-------------------------------------
17+
## Installing from TestPyPI (for dry-runs)
1918

2019
If you want to test publishing to TestPyPI and install the package from the test index, prefer doing that inside a virtual environment. This avoids the "externally-managed-environment" / PEP 668 error you saw when trying to install system-wide on Debian/Ubuntu.
2120

@@ -39,21 +38,26 @@ Notes:
3938

4039
## Install (from source)
4140

41+
```bash
4242
git clone <this-repo-url>
4343
cd local-storage-utils
4444
python3 -m venv .venv
4545
source .venv/bin/activate
4646
python -m pip install -U pip
4747
pip install -e .
48+
```
4849

4950
### Troubleshooting local installs
51+
5052
- If you see "Command 'python' not found", use `python3 -m venv .venv` (above). Inside the venv, `python` will point to Python 3.
5153
- If you see "externally-managed-environment", you are attempting a system-wide install. Always install into a virtual environment:
5254
- Create a venv: `python3 -m venv .venv && source .venv/bin/activate`
5355
- Then use the venv pip: `python -m pip install -U pip && pip install -e .`
54-
```bash
55-
sudo apt-get update && sudo apt-get install -y python3-venv
56-
```
56+
- If `python3-venv` is not installed:
57+
58+
```bash
59+
sudo apt-get update && sudo apt-get install -y python3-venv
60+
```
5761

5862
## Configuration
5963

@@ -92,16 +96,16 @@ log_level: "INFO" # (string) Logging level (DEBUG, INFO, WARNI
9296
9397
The keys above map directly to CLI flags (CLI flags override values in `config.yaml`). Omit any option to use sensible defaults.
9498

95-
# local-storage-utils — Quickstart
99+
## Quickstart
100+
101+
Lightweight utilities for analyzing and cleaning Datastore (Firestore in Datastore mode). Works with the Datastore emulator for local integration testing or GCP when using Application Default Credentials.
96102

97-
Lightweight utilities for analyzing and cleaning Datastore (Firestore in Datastore mode). Works with the
98-
Datastore emulator for local integration testing or GCP when using Application Default Credentials.
103+
### Quick overview
99104

100-
Quick overview
101-
- CLI: run commands via `python3 cli.py <command>` (or install the package and use the entrypoint).
102-
- Makefile: convenience targets are provided to create a venv, install deps, and run tests locally.
105+
- CLI: run commands via `python3 cli.py <command>` (or install the package and use the entrypoint).
106+
- Makefile: convenience targets are provided to create a venv, install deps, and run tests locally.
103107

104-
Quickstart (from source)
108+
### Quickstart (from source)
105109
```bash
106110
git clone <this-repo-url>
107111
cd local-storage-utils
@@ -112,14 +116,15 @@ pip install -U pip
112116
pip install -e .
113117
```
114118

115-
Makefile shortcuts
116-
- `make venv` — create `.venv` and install package in editable mode
117-
- `make unit` — run fast unit tests
118-
- `make integration` — run integration tests (starts/seeds emulator when configured)
119+
### Makefile shortcuts
120+
121+
- `make venv` — create `.venv` and install package in editable mode
122+
- `make unit` — run fast unit tests
123+
- `make integration` — run integration tests (starts/seeds emulator when configured)
119124

120125
Use these targets to get a working dev environment quickly.
121126

122-
Basic CLI examples
127+
### Basic CLI examples
123128
```bash
124129
# list kinds (scans stats or samples)
125130
python3 cli.py analyze-kinds --project my-project
@@ -131,44 +136,47 @@ python3 cli.py analyze-fields --kind MyKind --group-by batchId
131136
python3 cli.py cleanup --ttl-field expireAt --dry-run
132137
```
133138

134-
Configuration
139+
### Configuration
140+
135141
- Local `config.yaml` is supported; CLI flags override config values.
136142
- Example keys: `project_id`, `emulator_host`, `namespaces`, `kinds`, `kind`, `ttl_field`, `batch_size`, `sample_size`, `enable_parallel`.
137143

138-
Emulator & integration testing
144+
### Emulator & integration testing
145+
139146
- Start & seed emulator locally:
140147
- `./scripts/run_emulator_local.sh` (prefers `.venv/bin/python` to run seeder)
141148
- `./scripts/run_emulator_local.sh --no-seed` to skip seeding
142149
- The seeder accepts `SEED_COUNT` and `SEED_NS_COUNT` env vars to increase dataset size for perf tests.
143150

144151
Run integration tests:
152+
145153
```bash
146154
# create venv and install deps (see Quickstart), then:
147155
make integration
148156
```
149157

150-
Development & tests
158+
### Development & tests
159+
151160
- Run unit tests:
152161
- `make unit` (fast)
153162
- Run full test suite locally:
154163
- `make integration`
155164

156-
Publishing
157-
-------
165+
## Publishing
158166

159167
This project uses the `release` workflow to publish releases to PyPI. Follow the packaging tutorial for a complete guide on packaging and publishing: https://packaging.python.org/en/latest/tutorials/packaging-projects/
160168

161169
We support publishing to either TestPyPI (for dry runs) or the real PyPI. The workflow can be triggered automatically on pushes to `main` or manually via the Actions UI (use the "Run workflow" button). When you run it manually you can set the `publish_target` input to `testpypi` to publish to TestPyPI instead of PyPI.
162170

163-
Secrets and tokens
171+
### Secrets and tokens
164172
- For production publishing to the real PyPI, set the repository secret named `PYPI_API_TOKEN` with a PyPI API token.
165173
- For test publishing to TestPyPI, set the repository secret named `TEST_PYPI_API_TOKEN` with a TestPyPI API token.
166174

167175
The release workflow selects the appropriate token based on the `publish_target` input. Use TestPyPI first to validate packaging and metadata before publishing to the real index.
168176

169-
Notes
177+
## Notes
178+
170179
- `sample_size` bounds per-kind/group analysis to avoid scanning entire datasets. Set to 0 or `null` in config to disable sampling.
171180
- `enable_parallel` (default true) enables multi-threaded processing during analysis and deletion; set to false to force single-threaded behavior.
172181

173182
If you'd like a short walkthrough or to change the default Makefile targets, tell me what you'd prefer and I can adjust the README or Makefile.
174-
pip install ruff black

0 commit comments

Comments
 (0)