Package: qbuild
qbuildis a build system for Quera technology challenges.InstallationFor installing qbuild, run the following command:$sudopipinstallqbuildChallenge Structurechallenge-name (git repo)
├── src
│   ├── [ ... source and test files ... ]
│   ├── .gitignore (optional)
│   ├── .qignore (optional)
│   ├── .qsolution (optional)
│   ├── .qtest (optional, BUT USUALLY NEEDED)
│   └── .qrun.py (optional)
├── statement
│   ├── attachments
│   │   └── [ ... image files ... ]
│   └── statement.md
├── .gitignore
├── README.md  (generated from statement/statement.md, DO NOT EDIT)
├── tester_config.json
└── valid_filesCLI Usageqbuild: Build the challengeFirst,cdto the root of the challenge's git repository. Then runqbuildcommand. That's it!$cdGIT-REPO
$qbuildForjupyterproblems if you need generate nonquera initial:$qbuild--jupyterFolderdistand fileREADME.mdwill be generated.
It creates folder.qbuildfor its internal work.
Do not push it. Adddistand.qbuildto gitignore.qbuild diff$cdGIT-REPO
$qbuilddiffThis command generates a diff betweeninitialandmodel_solutionexports.It's helpful for checking that things are set correctly.qbuild tree$qbuildtreepath/to/some/directoryUseqbuild treeto print the tree structure of a directory.Do notusetreecommand or anything else.qbuild --versionPrints currently installed version.FeaturesProblem Statementstatement
├── attachments
│   ├── image1.png
│   └── image2.png
└── statement.mdstatement.mdis a Jinja2 template and must inheritstatement_base.md.
You can use variableshas_initial,initial_structure,solution_structure.{% extends "statement_base.md" %}

{% block name %}Problem Name{% endblock %}

{% block readme %}
... extra info about problem ...
{% endblock readme %}

{% block intro %}
... intro ...
![Image 1](attachments/image1.png)
{% endblock intro %}

{% block details %}
... details ...
{% endblock details %}

{% block notes %}
... notes ...
```
{{ solution_structure }}
```
{% endblock notes %}Ignore files:.qignore,.qsolution,.qtest,.qsampletestThese files must be at the root ofsrcfolder.
Their syntax is like gitignore.
You can specify test files in.qtestYou can specify sample test files in.qsampletest. This files just hide inmodel_solutionexport.
and solution files in.qsolution.
Files ignored by.qignorewill be removed in all exports.Warning:.qhideis deprecated and is replaced by.qsolution.Replacement Rules: Comment Directives// _q_solution_begin
  ... Part of Solution ...
// _q_end

// _q_test_begin
  ... Part of Test ...
// _q_endThey can also have areplaceblock:// _q_solution_begin
  ... Part of Solution ...
// _q_replace
//  ... This will be uncommented & replaced ...
// _q_end

/* _q_test_begin */
  ... Part of Test ...
/* _q_replace */
/*  ... This will be uncommented & replaced ... */
/* _q_end */Any one-line comment syntax is supported.Comments in each block should follow the same syntax.
e.g. You can't mix// ...and/* ... */.Warning: These directives are depricated:_q_hide_from_users_begin: replaced by_q_solution_begin_q_hide_from_users_end: replaced by_q_endReplacement Rules:.nosolution,.notestWhen comment directives can't help...src/path/to/some/file.js
src/path/to/some/file.nosolution.js  (`file.js` without solution)

src/path/to/some/file.js
src/path/to/some/file.notest.js  (`file.js` without test)Warning:.initialis deprecated and is replaced by.nosolution.Build hook:.qrun.py.qrun.pymust be at the root ofsrc.qbuildruns.qrun.pyin each export.Arguments passed to.qrun.py:--hide-solution: If passed, current export shouldn't contain solutions.--hide-test: If passed, current export shouldn't contain tests.Use.qrun.pyonly if other features are not enough.