Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1514 +/- ##
===========================================
- Coverage 71.53% 60.89% -10.65%
===========================================
Files 83 54 -29
Lines 13938 14017 +79
===========================================
- Hits 9971 8535 -1436
- Misses 3967 5482 +1515 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository toward a Scientific Python “cookiecutter” style project layout, with updated packaging, docs structure, and CI/CD, while adding/relocating a large set of tests and support modules.
Changes:
- Switched packaging/build configuration to Hatch (dynamic VCS versioning), added Nox sessions, and updated dev/test/doc dependency sets.
- Reworked documentation layout under
docs/(Sphinx config + API reference scaffolding) and adjusted notebook execution + docs workflows accordingly. - Added multiple new modules and extensive test suite additions/updates, plus new CI/CD workflows and Dependabot config.
Reviewed changes
Copilot reviewed 61 out of 279 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Moves build system to Hatch, adds Ruff/Mypy/PyLint/Coverage/Pytest config and env metadata. |
noxfile.py |
Adds Nox automation for lint/tests/docs/build. |
.pre-commit-config.yaml |
Expands pre-commit hooks (formatting/linting/schema checks). |
.github/workflows/ci.yml |
Adds multi-OS/multi-Python CI, coverage upload, pre-commit + pylint. |
.github/workflows/cd.yml |
Adds distribution build and (test-)PyPI publish on release. |
.readthedocs.yaml |
Adds RTD build steps using uv and Sphinx. |
docs/conf.py |
Updates Sphinx configuration for new docs layout and type-hints extension. |
docs/index.rst |
Updates top-level docs navigation to new docs/ structure. |
docs/reference/** |
Adds API reference scaffolding for tools and models. |
docs/overview/**, docs/guides/** |
Adds/updates overview and contributor/user guides. |
docs/license.md |
Adds a license page in docs (needs alignment with repo license). |
src/HARK/helpers.py |
Introduces filesystem/environment helpers (currently broken due to missing imports/dead code). |
src/HARK/parser.py |
Adds initial YAML/sympy parsing utilities (currently contains a constructor bug). |
src/HARK/parallel.py |
Adds Joblib-based parallel command execution helpers. |
src/HARK/validators.py |
Adds a non_empty argument validator decorator. |
src/HARK/models/** |
Adds example block-based model definitions and YAML configs (one YAML block has structural indentation issues). |
tests/** |
Adds/updates a broad unittest/pytest-based test suite (several tests currently won’t behave as intended). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - &portfolio_choice | ||
| name: portfolio choice | ||
| shocks: | ||
| risky_return: !Lognormal | ||
| mean: Rfree + EqP | ||
| std: RiskyStd | ||
| dynamics: | ||
| stigma: !Control | ||
| info: a | ||
| R: Rfree + (risky_return - Rfree) * stigma |
There was a problem hiding this comment.
In the portfolio_choice block, dynamics: is indented under shocks:, so YAML will treat it as another shock entry rather than a sibling section. Fix the indentation so dynamics is at the same level as shocks and reward.
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| release: | ||
| types: | ||
| - published | ||
|
|
There was a problem hiding this comment.
CD is configured to run on pushes to main, but other workflows still target master. Align the branch filters so releases/builds run from the repo’s default branch consistently.
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
There was a problem hiding this comment.
CI is configured to run on pushes to main, but other workflows in this repo (e.g. .github/workflows/examples.yml) still target master. Align the branch filters so CI/CD reliably run on the default branch.
This pull request includes a variety of changes to improve the project's configuration, documentation, and continuous integration workflows. The most important changes include adding detailed contribution guidelines, setting up continuous integration and continuous deployment workflows, and updating pre-commit hooks.
Configuration and Documentation Improvements:
.github/CONTRIBUTING.md: Added detailed contribution guidelines, including instructions for setting up a development environment, running tests, and building documentation..readthedocs.yaml: Added a configuration file for Read the Docs to specify the build environment and commands for generating documentation.Continuous Integration and Deployment:
.github/workflows/ci.yml: Added a CI workflow to run pre-commit hooks, linting, and tests on multiple operating systems and Python versions..github/workflows/cd.yml: Added a CD workflow to build and publish the package to PyPI upon release..github/dependabot.yml: Configured Dependabot to maintain dependencies for GitHub Actions.Pre-commit Hooks:
.pre-commit-config.yaml: Updated and added new pre-commit hooks for code formatting, linting, and validation.Documentation Updates:
.github/workflows/documentation.yml: Updated paths and commands to reflect the new documentation structure. [1] [2] [3] [4]Documentation/overview/index.rst: Removed outdated documentation structure.Please ensure your pull request adheres to the following guidelines: