Skip to content

install scilifelab_parsers #94

install scilifelab_parsers

install scilifelab_parsers #94

Workflow file for this run

name: lint-code
on: [push]
jobs:
# Use ruff to check for code style violations
ruff-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- 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 ruff
- name: ruff --> Check for style violations
# Configured in pyproject.toml
run: ruff check .
# Use ruff to check code formatting
ruff-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- 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 ruff
- name: ruff --> Check code formatting
run: ruff format --check .
# Use mypy for static type checking
mypy-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- 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 mypy
# Start by installing type stubs
- name: mypy --> Install stubs
run: echo -e "y" | mypy --install-types **/*.py || exit 0
- name: mypy --> Static type checking
# Configured in pyprojet.toml
run: mypy **/*.py
# Use pipreqs to check for missing dependencies
pipreqs-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install pipreqs
run: pip install pipreqs
# Install packages that are not found on PyPI
- name: Install postgreSQL
run: sudo apt-get install postgresql
- name: Install flowcell_parser
run: pip install git+https://github.com/SciLifeLab/flowcell_parser.git
- name: Install scilifelab_parsers
run: pip install git+https://github.com/SciLifeLab/scilifelab_parsers.git
- name: Run pipreqs
run: pipreqs --savepath pipreqs.txt
- name: Compare requirements
run: |
echo "=== pipreqs.txt contents: ==="
cat pipreqs.txt
echo "=== requirements.txt contents: ==="
cat requirements.txt
echo "=== diff contents: ==="
diff=$(diff requirements.txt pipreqs.txt)
echo $diff
exit 1