Skip to content

Post-Copy Checklist

After running copier copy, see .copier-answers/post-copier-todos/rule-{{ rule_name }}.md for next steps on implementing your rule into the project. You can copy-paste the contents of that file into a GitHub issue or a project management tool to track the implementation of the rule.

Post Copier To-Do's for Rule {{ rule_name }}

This issue is for tracking the development of a rule that was copied from the able-workflow-rule-copier template.

Next steps

Required

  1. workflow/rules/{% if module_type == 'none' %}{{ smk_file_name }}{% endif %}
  2. Specify input: directives as needed.
  3. Specify output: directives as needed.
  4. Specify params: directives as needed.
  5. Specify wildcards: directives as needed.
  6. workflow/scripts/{% if not uses_conda %}rules_global{% else %}rules_conda_{{ conda_env_key }}{% endif %}{{ _copier_conf.sep }}{{ rule_name }}.py
  7. Assign the desired snakemake directives (e.g., input to variables.
  8. Fill in the rule logic within main().
  9. Confirm typecheck and lint checks pass with the following commands
    • tox -e py312-typecheck-core
    • tox -e py312-lint
  10. test/workflow/scripts/{% if not uses_conda %}rules_global{% else %}rules_conda_{{ conda_env_key }}{% endif %}{{ _copier_conf.sep }}test_{{ rule_name }}.py.jinja
  11. Update the Snakemake() parameters of _build_snakemake() with the structure to match the input:, output:, wildcards: and params: directives provided by the rule under test.
  12. Provide dummy or tiny subsets of data for tests in the appropriate location under data/tests/.
  13. Replace test_main_runs() with the desired test logic for the script under test.
  14. Confim tests pass with one of the following commands depending on the conda environment needed to run the test.
    • tox -e py312-workflow-unit-global
    • tox -e py312-workflow-unit-core
    • tox -e py312-workflow-unit-extras
    • tox -e py312-workflow-unit-docs
  15. tests/workflow/rules/test_snakemake_{{ rule_name }}.py
  16. Modify create_dummy_input_file() to create the dummy to subsets of data for tests.
  17. Moidfy test_rule_{{ rule_name }}() to check that output data was created.
  18. Confirm tests pass with the following command:
    • tox -e py312-workflow-rules
  19. Update documentation in docs/docs/contributing/templates/rule-{{ rule_name }}.md on how to use rule or expected output.
  20. Run the logs_to_watch rule and update the "logViewer.watch" section of .vscode/settings.json with the results found in logs/rules/logs_to_watch.log.