Skip to content

Include missing files in datastack; object-oriented datastack archiving#2594

Draft
emlys wants to merge 7 commits into
natcap:mainfrom
emlys:bugfix/2589
Draft

Include missing files in datastack; object-oriented datastack archiving#2594
emlys wants to merge 7 commits into
natcap:mainfrom
emlys:bugfix/2589

Conversation

@emlys

@emlys emlys commented Jun 5, 2026

Copy link
Copy Markdown
Member

Description

This fixes #2589 by updating the datastack-archiving logic to include any file-based inputs referenced in a CSV, not just spatial inputs.

I also decided to refactor build_datastack_archive into an object-oriented design, where each Input type owns its method for archiving a value. I think this is overall clearer and more extensible than the previous design. In the case of the HRA criteria table, the custom archiving logic now lives in a HRACriteriaTableInput subclass.

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
  • Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@emlys emlys changed the title Bugfix/2589 Include missing files in datastack; object-oriented datastack archiving Jun 9, 2026
Comment thread src/natcap/invest/spec.py
class IOModel(ImmutableBaseModel):
"""Base class for both `Input` and `Output`."""

id: str

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved these attributes into the base class because they are shared between Input and Output.

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.

Crop Production datastack archive is built incompletely

1 participant