Skip to content

build validation script, and cleaned-up major issues#72

Open
jsenellart wants to merge 3 commits into
merlinquantum:mainfrom
jsenellart:PAPER-31-enforce-the-structure
Open

build validation script, and cleaned-up major issues#72
jsenellart wants to merge 3 commits into
merlinquantum:mainfrom
jsenellart:PAPER-31-enforce-the-structure

Conversation

@jsenellart
Copy link
Copy Markdown
Contributor

This PR fixes output-directory hygiene and adds repo-level paper-structure validation.

It updates nearest_centroids_merlin configs to write run artifacts to outdir/ instead of results/, removes committed generated results/run_* artifacts there, and adds a pre-commit validator that checks paper layout against the contribution conventions. The validator supports nested multi-part papers such as fock_state_expressivity/PARTX, treats .gitignore, models/, and results/ as recommended rather than required, and now rejects any committed run_* directory anywhere under a paper’s results/ tree.

It also updates how_to_contribute.md to document the validator usage, required vs recommended structure entries, and the multi-part paper layout, and brings papers/reproduction_template in line with the recommended structure by adding .gitignore and results/.

@jsenellart
Copy link
Copy Markdown
Contributor Author

remaining issues that will need to be fixed by reproducers:

  • HQNN_MythOrReality: missing notebook artifact
  • QCNN_data_classification: missing notebook artifact
  • photonic_quantum_enhanced_kernels: missing notebook artifact
  • photonic_QGAN: missing cli.json
  • qrc_memristor: missing cli.json
  • quantum_adversarial_ml: missing cli.json

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a repository-level validator to enforce the expected papers/<name>/... reproduction layout, and cleans up artifact hygiene by moving nearest_centroids_merlin run outputs to outdir/ while removing previously committed generated results/run_* directories.

Changes:

  • Add scripts/check_paper_structure.py and wire it into pre-commit as a local hook.
  • Update nearest_centroids_merlin configs to write to outdir/ and remove committed generated results/run_* artifacts.
  • Update contribution docs + template to reflect/align with the validator and recommended structure.

Reviewed changes

Copilot reviewed 30 out of 35 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/check_paper_structure.py New paper-structure validation script (required/recommended entries, JSON validation, results/run_* rejection).
.pre-commit-config.yaml Adds local pre-commit hook to run the paper-structure validator on staged files.
how_to_contribute.md Documents required vs recommended layout, multi-part papers, and validator usage.
.gitignore Ignores work/ directory at repo root.
papers/reproduction_template/.gitignore Adds template-level ignores (incl. outdir/) to match recommended hygiene.
papers/reproduction_template/results/.gitkeep Ensures results/ exists in the template.
papers/nearest_centroids_merlin/utils/.gitkeep Ensures utils/ is present even when empty.
papers/nearest_centroids_merlin/results/.gitkeep Ensures results/ directory exists after removing generated runs.
papers/nearest_centroids_merlin/configs/defaults.json Switch default outdir from results to outdir.
papers/nearest_centroids_merlin/configs/mnist_0v1.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/mnist_2v7.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/mnist_4class.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/mnist_10class.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/iris_ns100.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/iris_ns500.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/iris_ns1000.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/synthetic_4q_2c.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/synthetic_4q_4c.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/synthetic_8q_2c.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/configs/synthetic_8q_4c.json Switch outdir from results to outdir.
papers/nearest_centroids_merlin/results/run_20251205-114409/summary_results.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-114409/run.log Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-114409/results_0_1_2_3.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-114409/figures/label_table_classes_0_1_2_3.txt Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-114409/done.txt Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-114409/config_snapshot.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113816/run.log Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113816/results_2_7.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113816/results_0_1_2_3.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113816/results_0_1.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113816/config_snapshot.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113343/run.log Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-113343/config_snapshot.json Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-112507/run.log Removes committed generated run artifact under results/run_*.
papers/nearest_centroids_merlin/results/run_20251205-112507/config_snapshot.json Removes committed generated run artifact under results/run_*.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

print(f" WARN: {issue}")


def main(argv: list[str] | None = None) -> int:


def main(argv: list[str] | None = None) -> int:
args = parse_args(argv or sys.argv[1:])
Comment on lines +108 to +112
path = Path(raw_path)
parts = path.parts
if len(parts) < 2 or parts[0] != "papers":
continue
root_name = parts[1]
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.

3 participants