Skip to content

Commit

Permalink
Merge branch 'dev' into il-3674
Browse files Browse the repository at this point in the history
  • Loading branch information
ireneisdoomed authored Dec 19, 2024
2 parents dbd8be6 + 5534908 commit 34f5f3f
Show file tree
Hide file tree
Showing 12 changed files with 225 additions and 379 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
release:
runs-on: ubuntu-latest
concurrency: release
outputs:
released: ${{ steps.semrelease.outputs.released }}
permissions:
# NOTE: this enables trusted publishing.
# See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1#trusted-publishing
Expand Down Expand Up @@ -46,7 +48,8 @@ jobs:

- name: Publish package to GitHub Release
uses: python-semantic-release/upload-to-gh-release@main
if: ${{ steps.semrelease.outputs.released }} == 'true'
# NOTE: semrelease output is a string, so we need to compare it to a string
if: steps.semrelease.outputs.released == 'true'
with:
# NOTE: allow to start the workflow when push action on tag gets executed
# requires using GH_APP to authenitcate, otherwise push authorised with
Expand All @@ -56,16 +59,16 @@ jobs:
tag: ${{ steps.semrelease.outputs.tag }}

- name: Store the distribution packages
if: steps.semrelease.outputs.released == 'true'
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
needs: release
name: >-
Publish 📦 in PyPI
if: github.ref == 'refs/heads/main'
name: Publish 📦 in PyPI
if: github.ref == 'refs/heads/main' && needs.release.outputs.released == 'true'
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -84,7 +87,7 @@ jobs:
publish-to-testpypi:
name: Publish 📦 in TestPyPI
needs: release
if: github.ref != 'refs/heads/main'
if: github.ref == 'refs/heads/main' && needs.release.outputs.released == 'true'
runs-on: ubuntu-latest

environment:
Expand All @@ -108,7 +111,7 @@ jobs:
documentation:
needs: release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && needs.release.outputs.released == 'true'
steps:
- uses: actions/checkout@v4
with:
Expand Down
12 changes: 0 additions & 12 deletions docs/python_api/common/version_engine.md

This file was deleted.

14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 0 additions & 158 deletions src/gentropy/common/version_engine.py

This file was deleted.

30 changes: 18 additions & 12 deletions src/gentropy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class SessionConfig:
write_mode: str = "errorifexists"
spark_uri: str = "local[*]"
hail_home: str = os.path.dirname(hail_location)
extended_spark_conf: dict[str, str] | None = field(default_factory=dict[str, str])
extended_spark_conf: dict[str, str] | None = field(
default_factory=dict[str, str])
output_partitions: int = 200
_target_: str = "gentropy.common.session.Session"

Expand All @@ -39,7 +40,8 @@ class ColocalisationConfig(StepConfig):
credible_set_path: str = MISSING
coloc_path: str = MISSING
colocalisation_method: str = MISSING
colocalisation_method_params: dict[str, Any] = field(default_factory=dict[str, Any])
colocalisation_method_params: dict[str, Any] = field(
default_factory=dict[str, Any])
_target_: str = "gentropy.colocalisation.ColocalisationStep"


Expand Down Expand Up @@ -124,7 +126,8 @@ class EqtlCatalogueConfig(StepConfig):
eqtl_catalogue_paths_imported: str = MISSING
eqtl_catalogue_study_index_out: str = MISSING
eqtl_catalogue_credible_sets_out: str = MISSING
mqtl_quantification_methods_blacklist: list[str] = field(default_factory=lambda: [])
mqtl_quantification_methods_blacklist: list[str] = field(
default_factory=lambda: [])
eqtl_lead_pvalue_threshold: float = 1e-3
_target_: str = "gentropy.eqtl_catalogue.EqtlCatalogueStep"

Expand All @@ -146,7 +149,8 @@ class FinngenStudiesConfig(StepConfig):
)
finngen_summary_stats_url_suffix: str = ".gz"
efo_curation_mapping_url: str = "https://raw.githubusercontent.com/opentargets/curation/24.09.1/mappings/disease/manual_string.tsv"
sample_size: int = 453733 # https://www.finngen.fi/en/access_results#:~:text=Total%20sample%20size%3A%C2%A0453%2C733%C2%A0(254%2C618%C2%A0females%20and%C2%A0199%2C115%20males)
# https://www.finngen.fi/en/access_results#:~:text=Total%20sample%20size%3A%C2%A0453%2C733%C2%A0(254%2C618%C2%A0females%20and%C2%A0199%2C115%20males)
sample_size: int = 453733
_target_: str = "gentropy.finngen_studies.FinnGenStudiesStep"


Expand Down Expand Up @@ -199,7 +203,6 @@ class LDIndexConfig(StepConfig):
"nfe", # Non-Finnish European
]
)
use_version_from_input: bool = False
_target_: str = "gentropy.gnomad_ingestion.LDIndexStep"


Expand Down Expand Up @@ -409,7 +412,6 @@ class GnomadVariantConfig(StepConfig):
"remaining", # Other
]
)
use_version_from_input: bool = False
_target_: str = "gentropy.gnomad_ingestion.GnomadVariantIndexStep"


Expand All @@ -432,7 +434,6 @@ class PanUKBBConfig(StepConfig):
"EUR", # European
]
)
use_version_from_input: bool = False
_target_: str = "gentropy.pan_ukb_ingestion.PanUKBBVariantIndexStep"


Expand Down Expand Up @@ -680,7 +681,8 @@ class Config:
"""Application configuration."""

# this is unfortunately verbose due to @dataclass limitations
defaults: List[Any] = field(default_factory=lambda: ["_self_", {"step": MISSING}])
defaults: List[Any] = field(default_factory=lambda: [
"_self_", {"step": MISSING}])
step: StepConfig = MISSING
datasets: dict[str, str] = field(default_factory=dict)

Expand Down Expand Up @@ -714,7 +716,8 @@ def register_config() -> None:
name="gwas_catalog_top_hit_ingestion",
node=GWASCatalogTopHitIngestionConfig,
)
cs.store(group="step", name="ld_based_clumping", node=LDBasedClumpingConfig)
cs.store(group="step", name="ld_based_clumping",
node=LDBasedClumpingConfig)
cs.store(group="step", name="ld_index", node=LDIndexConfig)
cs.store(group="step", name="locus_to_gene", node=LocusToGeneConfig)
cs.store(
Expand All @@ -732,7 +735,8 @@ def register_config() -> None:

cs.store(group="step", name="pics", node=PICSConfig)
cs.store(group="step", name="gnomad_variants", node=GnomadVariantConfig)
cs.store(group="step", name="ukb_ppp_eur_sumstat_preprocess", node=UkbPppEurConfig)
cs.store(group="step", name="ukb_ppp_eur_sumstat_preprocess",
node=UkbPppEurConfig)
cs.store(group="step", name="variant_index", node=VariantIndexConfig)
cs.store(group="step", name="variant_to_vcf", node=ConvertToVcfStepConfig)
cs.store(
Expand Down Expand Up @@ -765,5 +769,7 @@ def register_config() -> None:
name="locus_to_gene_associations",
node=LocusToGeneAssociationsStepConfig,
)
cs.store(group="step", name="finngen_ukb_meta_ingestion", node=FinngenUkbMetaConfig)
cs.store(group="step", name="credible_set_qc", node=CredibleSetQCStepConfig)
cs.store(group="step", name="finngen_ukb_meta_ingestion",
node=FinngenUkbMetaConfig)
cs.store(group="step", name="credible_set_qc",
node=CredibleSetQCStepConfig)
Loading

0 comments on commit 34f5f3f

Please sign in to comment.