diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84be418..cf0866d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,11 +2,11 @@ default_stages: [commit, merge-commit] fail_fast: true repos: - repo: git@github.com:PyCQA/isort.git - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: git@github.com:psf/black.git - rev: 23.11.0 + rev: 23.12.1 hooks: - id: black - repo: git@github.com:pre-commit/pre-commit-hooks.git @@ -18,7 +18,7 @@ repos: - id: trailing-whitespace exclude: tests/fixtures/output/haplogroups\..*\.txt|data/variants/isogg\.[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.txt - repo: git@github.com:PyCQA/flake8.git - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 - repo: git@github.com:PyCQA/pydocstyle.git @@ -28,7 +28,7 @@ repos: additional_dependencies: [tomli] exclude: tests/ - repo: git@github.com:pre-commit/mirrors-mypy.git - rev: v1.7.1 + rev: v1.8.0 hooks: - id: mypy additional_dependencies: [pandas-stubs,types-PyYAML,types-tabulate] diff --git a/Makefile b/Makefile index 3588a30..4504c95 100644 --- a/Makefile +++ b/Makefile @@ -27,10 +27,13 @@ dev-pyenv-virtualenv: ## Set up pyenv-virtual-env-based development environment pyenv local $(ENV_NAME) pip install --upgrade pip setuptools wheel $(MAKE) dev-install + $(MAKE) dev-jupyter $(MAKE) init-hooks dev-install: ## Install package as editable, with all optional dependencies pip install --editable .[dev] + +dev-jupyter: ## Add Jupyter kernel python -m ipykernel install --user --name $(ENV_NAME) --display-name $(PACKAGE_NAME) diff --git a/yhaplo/config.py b/yhaplo/config.py index fda18b0..c92e912 100644 --- a/yhaplo/config.py +++ b/yhaplo/config.py @@ -104,8 +104,8 @@ class Config: # 23andMe: Platform positions platform_pos_data_subdir = "platform" - platform_pos_data_filename_tp = "{platform}.b37.positions.txt" - platform_qc_exclude_data_filename_tp = "{platform}.b37.qc.exclude.txt" + platform_pos_fn_tp = "{platform}.b37.positions.txt" + platform_qc_exclude_fn_tp = "{platform}.b37.qc.exclude.txt" # Example input files # ---------------------------------------------------------------------- diff --git a/yhaplo/snp.py b/yhaplo/snp.py index 5af2f27..c06eba9 100644 --- a/yhaplo/snp.py +++ b/yhaplo/snp.py @@ -272,7 +272,7 @@ def build_platform_to_pos_set() -> dict[str, set[int]]: for platform in Config.platforms: platform_pos_data_file = DataFile( Config.platform_pos_data_subdir, - Config.platform_pos_data_filename_tp.format(platform=platform), + Config.platform_pos_fn_tp.format(platform=platform), f"Platform {platform} SNP positions", ttam_only=True, ) @@ -280,7 +280,7 @@ def build_platform_to_pos_set() -> dict[str, set[int]]: platform_pos_exclude_data_file = DataFile( Config.platform_pos_data_subdir, - Config.platform_qc_exclude_data_filename_tp.format(platform=platform), + Config.platform_qc_exclude_fn_tp.format(platform=platform), f"Platform {platform} SNP QC exclusions table", ttam_only=True, )