diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..b8161403 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +exclude = .venv,venv,build,dist,*.egg-info,__pycache__ \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..51adca5f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: Python Linter + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + + - name: Run flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics diff --git a/README.md b/README.md index 821f05d7..4d755f24 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,25 @@ Certain utilities also have non-Python dependencies, which must be installed sep - `graph-sbol` requires [Graphviz](https://graphviz.org/) to be able to render diagrams. - `sbol-converter` requires [node.js](https://nodejs.org/en/) to be able to locally run Javascript. +## 🔗 Mapping: Command-Line Tools to Python Modules + +This table provides a quick reference to help developers understand where each command-line utility is implemented within the Python package. + +| **Command-line Tool** | **Python Module** | **Entry Point Function** | +| --------------------------- | ------------------------------------------------- | ------------------------ | +| `excel-to-sbol` | `sbol_utilities.excel_to_sbol` | `main` | +| `graph-sbol` | `sbol_utilities.graph_sbol` | `main` | +| `sbol-expand-derivations` | `sbol_utilities.expand_combinatorial_derivations` | `main` | +| `sbol-calculate-sequences` | `sbol_utilities.calculate_sequences` | `main` | +| `sbol-calculate-complexity` | `sbol_utilities.calculate_complexity_scores` | `main` | +| `sbol-converter` | `sbol_utilities.conversion` | `main` | +| `sbol2-to-sbol3` | `sbol_utilities.conversion` | `sbol2to3` | +| `sbol3-to-sbol2` | `sbol_utilities.conversion` | `sbol3to2` | +| `sbol-to-genbank` | `sbol_utilities.conversion` | `sbol2genbank` | +| `genbank-to-sbol` | `sbol_utilities.conversion` | `genbank2sbol` | +| `sbol-to-fasta` | `sbol_utilities.conversion` | `sbol2fasta` | +| `fasta-to-sbol` | `sbol_utilities.conversion` | `fasta2sbol` | +| `sbol-diff` | `sbol_utilities.sbol_diff` | `main` | ## Utilities