Package: equation-sampler
AutoRA TemplateQuickstart GuideCreate GitHub RepositoryYou should create a GitHub repository from the root folder of this project:Create a new repository on GitHub (a sensible name for the repository would be autora-experiment-runner-synthetic-autora-synthetic-generator-equation-sampler)Follow the guide under…or push an existing repository from the command lineVirtual EnvironmentInstall this in an environment using your chosen package manager. In this example we are using virtualenvInstall:python (3.8 or greater):https://www.python.org/downloads/virtualenv:https://virtualenv.pypa.io/en/latest/installation.htmlCreate a new virtual environment:virtualenvvenvNote: You want to ensure that the python version matches that of autora. If necessary
you can specify the respective python version directly, e.g.,virtualenv venv --python=python3.9Activate it:sourcevenv/bin/activateInstall Dev DependenciesUsepip installto install the current project (".") in editable mode (-e) with dev-dependencies ([dev]):pipinstall-e".[dev]"Note: You may install new dependencies viapip install packagenameinside your virtual environment. If those
dependencies are vital to your package, you will have to add them to thepyproject.toml(see Step 6 of the
Contribution Guide).Contribution GuideExperiment RunnersA method that orchestrates the collecting of observations for a given set of
experiment conditions, which may include the recruitment of participants.Example: TheFirebase-Prolific Runnerenables the collection of behavioral data from human participants via web-based experiments hosted onFirebase, using a pool of participants registered throughProlific.SyntheticA ground-truth model that implements a hypothesized relationship between experimental conditions
$X$ and observations $Y$. Synthetic models may act as objects of study for which the underlying mechanisms are known,
and be used for benchmarking theorists and experimentalists in AutoRA in terms of
their ability to recover the underlying model from synthetic data, e.g., by acting as "synthetic participants".Example: The basicSynthetic Data Packageimplements simple models of economic choice and psychophysics.Step 1: Implement Your CodeYou may now add your code tosrc/autora/experiment_runner/synthetic/autora_synthetic_generator_equation_sampler/__init__.pyfile. You may
also add additional files in this folder. Just make sure to import the core function or class of your feature
in the__init__.pyif it is implemented elsewhere.Step 2 (Optional): Add TestsIt is highly encouraged to add unit tests to ensure your code is working as intended. These can bedoctestsor test cases intests/test_autora_synthetic_generator_equation_sampler.py.Note: Tests are required if you wish that your feature becomes part of the mainautorapackage. However, regardless of whether you choose to implement tests,
you will still be able to install your package separately, in addition to autora.Step 3 (Optional): Add DocumentationIt is highly encouraged that you add documentation of your package in yourdocs/index.md. You can also add new pages
in thedocsfolder. Update themkdocs.ymlfile to reflect structure of the documentation. For example, you can add
new pages or delete pages that you deleted from thedocsfolder.Note: Documentation is required if you wish that your feature becomes part of the mainautorapackage. However, regardless of whether you choose to write
documentation, you will still be able to install your package separately, in addition to autora.Step 4: Add DependenciesIn pyproject.toml add the new dependencies underdependenciesInstall the added dependenciespipinstall-e".[dev]"Step 5: Publish Your PackageOnce your project is implemented, you may publish it as subpackage of AutoRA. If you have not thoroughly vetted your project or would otherwise like to refine it further, you may
nervous about the state of your package–you will be able to publish it as a pre-release, indicating to users that
the package is still in progress.Step 5.1: Update MetadataTo begin publishing your package, update the metadata underprojectin the pyproject.toml file to includenamedescriptionauthor-nameauthor-email
Also, update the URL for the repository underproject.urls.Step 5.2 Publish via GitHub ActionsTo automate the publishing process for your package, you can use a GitHub action:Add a github secret in your repository named PYPI_API_TOKEN, that contains a PyPI token of your accountAdd the GitHub action to the.github/workflowsdirectory: For example, you can use the default publishing action:Navigate to theactionson the GitHub website of your repository.Search for thePublish Python Packageaction and add it to your projectCreate a new release: Click oncreate new releaseon the GitHub website of your repository.Choose a tag (this is the version number of the release. If you didn't set up dynamic versioning it should match the version in thepyproject.tomlfile)Generate release notes automatically by clickinggenerate release, which adds the markdown of the merged pull requests and the contributors.If this is a pre-release check the boxset as pre-releaseClick onpublish releaseStep 6: Add the package toautoraOnce your package is working and published, you canmake a pull requestonautorato have it vetted and added to the "parent" package.
To do so, you'll need to clone the parent repository, add your package to it as an optional dependency, and make sure your documentation is imported.
Then create a pull request with the changes to let us know about your contribution.Add the package as optional dependencyIn thepyproject.tomlfile of your clonedautorapackage,
add an optional dependency for your new package in the[project.optional-dependencies]section:example-contribution=["autora-example-contribution==1.0.0"]!!! success
Ensure you include the version number.Add the example-contribution to be part of the corresponding all-contribution-type dependencies:all-contribution-type=[..."autora[example-contribution]",...]Add documentation from the package repositoryImport your documentation in themkdocs.ymlof theautorapackage:- User Guide:
  - Contribution Type:
    - Overview: 'contribution-type/overview.md'
    ...
    - Example Contribution: '!import https://github.com/example-contributor/example-contribution/?branch=v1.0.0&extra_imports=["mkdocs/base.yml"]'
    ...Questions & HelpIf you have any questions or require any help, please add your question in theContributor Q&A of AutoRA Discussions.
We look forward to hearing from you!