Skip to content

Feature/ascii grid - #14

Open
lloydgj wants to merge 9 commits into
masterfrom
feature/ascii_grid
Open

lloydgj wants to merge 9 commits into
masterfrom
feature/ascii_grid

Conversation

@lloydgj

@lloydgj lloydgj commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

addition of ascii grid reader and tests. tmy reader remains on this branch but a merge with the csv branch should see it deleted.

@lloydgj
lloydgj requested review from pmslavin and a balanced review from Copilot November 4, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The TMY reader cannot be instantiated and references undefined names, while ASCII Grid row counting and CSV dataset serialization also produce incorrect results.

3 open issues
What changed in this PR

Adds an ESRI ASCII Grid reader to dsprofile’s format-based profiling system, with a sample dataset and tests. The branch also includes CSV support and retains the deferred TMY reader.

Changes:

  • Adds ASCII Grid header parsing, row counts, companion-file detection, and reader registration.
  • Adds CSV reading and documents both new CLI formats.
  • Adds logging compatibility fallbacks and ignores generated local files.
File Description
tests/​test_ascii_grid.py Tests reader initialization and profile output.
tests/​data/​sample.asc Provides a small ASCII Grid fixture.
README.md Documents CSV and ASCII Grid commands.
dsprofile/​utils/​log.py Adds a logging-level lookup fallback.
dsprofile/​main.py Uses compatible logging-level lookup for CLI validation.
dsprofile/​lib/​tmy.py Adds the deferred, unfinished TMY reader.
dsprofile/​lib/​csv.py Adds CSV loading and CLI integration.
dsprofile/​lib/​ascii_grid.py Implements ASCII Grid parsing and profiling.
dsprofile/​lib/​__init__.py Registers CSV and ASCII Grid readers through imports.
.gitignore Excludes build, coverage, cache, and environment files.

Review effort: Balanced

Comment thread dsprofile/lib/tmy.py
from pvlib.iotools import read_tmy3

#subclass
class TMYReader(Reader):
sys.exit(1)
continue

data_rows += 1
Comment thread dsprofile/lib/csv.py

def process(self):
return {
"dataset": str(self.dataset)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants