Contributing to Development

laforge supports Python 3.6+.

Process

Tool

Documentation

Automation

Nox

https://nox.readthedocs.io/

Test

pytest

https://docs.pytest.org/

Test coverage

pytest-cov

https://pytest-cov.readthedocs.io/

Format

Black

https://black.readthedocs.io/

Lint

Flake8

http://flake8.pycqa.org/

List more

Pylint

https://pylint.readthedocs.io/en/latest/

Document

Sphinx

https://www.sphinx-doc.org/

Suggested Environment

# Create virtual environment
python -m venv .venv

# Activate virtual environment with shell-specific script:
. .venv/bin/activate.fish           # fish
# $ source ./.venv/bin/activate     # bash
#  source ./.venv/bin/activate.csh  # csh
# Note that Python for Windows creates ./Scripts/ rather than ./bin/
# .\.venv\Scripts\Activate.ps1      # PowerShell
# .venv\Scripts\Activate.bat        # cmd

# Install packages
python -m pip install -r requirements.txt

# Optional [packages] to include Excel and/or non-SQLite databases
python -m pip install -e .[mysql]

# Run tests
python -m pytest

# Run the gauntlet
python -m nox

Embedded TODOs

Todo

Implement cache_results=False

original entry

Todo

Restore quiet?

original entry

Todo

if “:” in self.content:

previous_result_key, actual_path_content = self.content.split(“:”)

original entry

Todo

De-messify

original entry

Todo

Factor out to superclass to allow views

original entry

Todo

class InvalidIdentifierError relay_id_problem(identifier, action, reason=None, replacement=None)

original entry

Docstring Gaps

Undocumented Python objects
===========================
laforge.builder
---------------
Functions:
 * find_build_config_in_directory
 * get_package_logger
 * get_verb
 * is_verb
 * run_cmd
 * seconds_since

Classes:
 * BaseTask -- missing methods:

   - implement
   - validate_results
 * ExistenceChecker -- missing methods:

   - implement
 * FileReader -- missing methods:

   - implement
 * FileWriter -- missing methods:

   - implement
   - write
 * InternalPythonExecutor -- missing methods:

   - implement
 * SQLExecutor -- missing methods:

   - implement
 * SQLQueryReader -- missing methods:

   - implement
 * SQLReaderWriter -- missing methods:

   - implement
 * ShellExecutor -- missing methods:

   - implement
 * StataExecutor -- missing methods:

   - implement
 * Task
 * TaskList -- missing methods:

   - load_tasks
   - template_content

laforge.command
---------------
Functions:
 * user_confirms_cleartext

laforge.distros
---------------
Classes:
 * Distro
 * MSSQL
 * MySQL
 * PostgresQL
 * SQLite

laforge.sql
-----------
Functions:
 * fix_bad_columns

Classes:
 * Channel -- missing methods:

   - clean_up_statement
   - find
   - grab
   - retrieve_engine
   - save_engine
 * Identifier -- missing methods:

   - check
 * Script -- missing methods:

   - read
 * Table -- missing methods:

   - exists
   - resolve

laforge.tech
------------
Functions:
 * capitalize_sentences
 * nobabble

Classes:
 * ModifiableVerb
 * Technobabbler

laforge.toolbox
---------------
Functions:
 * is_reserved_word