From df8f443c9562e3bf052dbb23340ea9fdeecb26d7 Mon Sep 17 00:00:00 2001 From: Chris Mungall Date: Tue, 7 May 2024 13:49:33 -0700 Subject: [PATCH 1/7] Adding installation guide. Fixes #114 --- docs/developers/developers.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/developers/developers.md b/docs/developers/developers.md index ba96e3fb..52bfb114 100644 --- a/docs/developers/developers.md +++ b/docs/developers/developers.md @@ -1,5 +1,30 @@ # For developers +## Local Installation + +We recommend creating a local environment: + +```bash +python3 -m venv .venv +source .venv/bin/activate +``` + +You can then do a local/editable install: + +```bash +python3 -m pip install --editable ".[test]" +``` + +Note this uses `pyproject.toml` to declare dependencies, so you will need pip ≥ 21.3 for this to work. + +After installation you should be able to run the test suite: + +```bash +pytest +``` + + +## Creating Phenopackets pyphetools provides two main ways of creating phenopackets. From 44728b735d16fb540ef358c0ad715ff3c045f6cf Mon Sep 17 00:00:00 2001 From: Daniel Danis Date: Wed, 8 May 2024 16:57:46 -0400 Subject: [PATCH 2/7] Put virtual environment into `venv`. --- docs/developers/developers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developers/developers.md b/docs/developers/developers.md index 52bfb114..24ac8e1a 100644 --- a/docs/developers/developers.md +++ b/docs/developers/developers.md @@ -5,8 +5,8 @@ We recommend creating a local environment: ```bash -python3 -m venv .venv -source .venv/bin/activate +python3 -m venv venv +source venv/bin/activate ``` You can then do a local/editable install: From 885c0fb79eba7c8893b614d2c129d46183a8f075 Mon Sep 17 00:00:00 2001 From: Daniel Danis Date: Wed, 8 May 2024 16:59:30 -0400 Subject: [PATCH 3/7] Suggest updating `pip` before installation. --- docs/developers/developers.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/developers/developers.md b/docs/developers/developers.md index 24ac8e1a..4e34e893 100644 --- a/docs/developers/developers.md +++ b/docs/developers/developers.md @@ -9,14 +9,19 @@ python3 -m venv venv source venv/bin/activate ``` +and updating Python's `pip` tool: + +```bash +python3 -m pip install --upgrade pip +``` + You can then do a local/editable install: + ```bash python3 -m pip install --editable ".[test]" ``` -Note this uses `pyproject.toml` to declare dependencies, so you will need pip ≥ 21.3 for this to work. - After installation you should be able to run the test suite: ```bash From c322938865a4e5ec65b7ee3c723616c9ba8ce138 Mon Sep 17 00:00:00 2001 From: Daniel Danis Date: Wed, 8 May 2024 17:06:18 -0400 Subject: [PATCH 4/7] Generate FBN1 phenopackets using today's `phenopacket-store` state. --- .github/workflows/generate_phenopackets.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_phenopackets.yml b/.github/workflows/generate_phenopackets.yml index 81e2baf6..f1982c00 100644 --- a/.github/workflows/generate_phenopackets.yml +++ b/.github/workflows/generate_phenopackets.yml @@ -3,8 +3,8 @@ name: Generate phenopackets env: # We generate the phenopackets from this state # of the `phenopacket-store` repository. - PHENOPACKET_STORE_TAG: pyphe-ci-wip -# PHENOPACKET_STORE_TAG: c06a52e0 # State from Mar 5th, 2024 + # State from May 8th, 2024 + PHENOPACKET_STORE_TAG: 9fe73a29246bce4493d98e85efdd0f9f3cb56856 on: push: From d79c2754432c3401545e945b865034df92fd6ed4 Mon Sep 17 00:00:00 2001 From: Daniel Danis Date: Wed, 8 May 2024 17:09:27 -0400 Subject: [PATCH 5/7] Update *FBN1* notebook names. --- .github/workflows/generate_phenopackets.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_phenopackets.yml b/.github/workflows/generate_phenopackets.yml index f1982c00..ce8e1c32 100644 --- a/.github/workflows/generate_phenopackets.yml +++ b/.github/workflows/generate_phenopackets.yml @@ -47,8 +47,8 @@ jobs: # Prepare the notebooks to run declare -a fbn1_notebooks=( - "FBN1/Comeglio_isolated_ectopia_lentis.ipynb" - "FBN1/FBN1_lipodystrophy_Lin_2020.ipynb" + "FBN1/FBN1_isolated_ectopia_lentis_individuals.ipynb" + "FBN1/FBN1_lipodystropy_individuals.ipynb" "FBN1/Katzke_2002_Marfan.ipynb" "FBN1/LeGoff_FBN1_acromicric_and_geleophysic_dysplasia.ipynb" "FBN1/Loeys2010_stiff_skin_syndrome.ipynb" From ee0ebc8e224036802fde191546dab82d88e6fe5e Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 21 May 2024 05:46:15 +0200 Subject: [PATCH 6/7] triggered rebuild --- docs/user-guide/template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/template.md b/docs/user-guide/template.md index cf64b8ba..0404d6b7 100644 --- a/docs/user-guide/template.md +++ b/docs/user-guide/template.md @@ -64,7 +64,7 @@ tc.create_template(disease_id="", disease_label="", gene_symbol="", HGNC_id="", - transcript="" + transcript="") ``` From 42c5846030110b296d30cee52e5d9fddb532fb50 Mon Sep 17 00:00:00 2001 From: Daniel Danis Date: Tue, 21 May 2024 20:08:55 +0200 Subject: [PATCH 7/7] Drop the GitHub action that runs selected `phenopacket-store` notebooks. --- .github/workflows/generate_phenopackets.yml | 65 --------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/generate_phenopackets.yml diff --git a/.github/workflows/generate_phenopackets.yml b/.github/workflows/generate_phenopackets.yml deleted file mode 100644 index ce8e1c32..00000000 --- a/.github/workflows/generate_phenopackets.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Generate phenopackets - -env: - # We generate the phenopackets from this state - # of the `phenopacket-store` repository. - # State from May 8th, 2024 - PHENOPACKET_STORE_TAG: 9fe73a29246bce4493d98e85efdd0f9f3cb56856 - -on: - push: - branches: [ develop ] - pull_request: - branches: [ main, develop ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Initialize Python 3.8 - uses: actions/setup-python@v4.3.1 - with: - python-version: "3.8" - - - name: Install pyphetools & dependencies - run: | - python3 -m pip install --editable . - - - name: Install Jupyter and register current Python as kernel - run: | - python3 -m pip install ipykernel notebook - python3 -m ipykernel install --user --name pp_env --display-name "Pyphetools (Python 3)" - - - name: Check out phenopacket-store - run: | - cd .. - git clone https://github.com/monarch-initiative/phenopacket-store.git - cd phenopacket-store - git checkout $PHENOPACKET_STORE_TAG - - - name: Generate phenopackets - run: | - # phenopacket-store folder - pps_dir=$(dirname $(pwd))/phenopacket-store - - # Prepare the notebooks to run - declare -a fbn1_notebooks=( - "FBN1/FBN1_isolated_ectopia_lentis_individuals.ipynb" - "FBN1/FBN1_lipodystropy_individuals.ipynb" - "FBN1/Katzke_2002_Marfan.ipynb" - "FBN1/LeGoff_FBN1_acromicric_and_geleophysic_dysplasia.ipynb" - "FBN1/Loeys2010_stiff_skin_syndrome.ipynb" - "FBN1/Palz_Marfan_2000.ipynb" - "FBN1/Tiecke_2001_Marfan.ipynb" - ) - - # Run the notebooks - for nb in ${fbn1_notebooks[@]} - do - nb_path=${pps_dir}/notebooks/${nb} - printf "Running %s\n" ${nb_path} - jupyter execute --kernel_name=pp_env ${nb_path} - done