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/

Lint 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

# Install working copy

# If desired, optional packages for Excel or other DBs...
# python -m pip install -e .[excel]
# python -m pip install -e .[mysql]
# python -m pip install -e .[all]

# 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:
 * get_verb
 * is_verb

Classes:
 * BaseTask -- missing methods:

   - implement
   - validate_results
 * DirectoryVisit
 * Echoer -- missing methods:

   - implement
 * 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
 * Task
 * TaskList -- missing methods:

   - load_tasks
   - template_content

laforge.command
---------------
Functions:
 * find_build_config
 * get_package_logger
 * run_build
 * technobabble

laforge.distros
---------------
Classes:
 * Distro -- missing methods:

   - create_engine
   - create_spec
   - determine_dtypes
   - find
   - known
 * MSSQL -- missing methods:

   - create_spec
   - find
 * MySQL -- missing methods:

   - create_spec
 * PostgresQL -- missing methods:

   - create_spec
 * SQLite -- missing methods:

   - create_spec
   - find

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

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

Classes:
 * ModifiableVerb
 * Technobabbler