gentroutils 0.2.0__tar.gz → 1.6.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gentroutils-1.6.0.dev1/.RData +0 -0
- gentroutils-1.6.0.dev1/.Rhistory +0 -0
- gentroutils-1.6.0.dev1/.github/workflows/labeler.yaml +14 -0
- gentroutils-1.6.0.dev1/.github/workflows/pr.yaml +42 -0
- gentroutils-1.6.0.dev1/.github/workflows/release.yaml +73 -0
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/.github/workflows/release_pr.yaml +4 -4
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/.github/workflows/tag.yaml +25 -23
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/.gitignore +17 -1
- gentroutils-1.6.0.dev1/.vscode/extensions.json +7 -0
- gentroutils-1.6.0.dev1/.vscode/settings.json +19 -0
- gentroutils-1.6.0.dev1/CHANGELOG.md +521 -0
- gentroutils-1.6.0.dev1/Dockerfile +16 -0
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/LICENSE +1 -1
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/Makefile +8 -8
- gentroutils-1.6.0.dev1/PKG-INFO +274 -0
- gentroutils-1.6.0.dev1/README.md +249 -0
- gentroutils-1.6.0.dev1/config.yaml +32 -0
- gentroutils-1.6.0.dev1/conftest.py +1 -0
- gentroutils-1.6.0.dev1/docs/00_prepare_tables_for_curation.R +126 -0
- gentroutils-1.6.0.dev1/docs/gwas_catalog_curation.md +45 -0
- gentroutils-1.6.0.dev1/pyproject.toml +333 -0
- gentroutils-1.6.0.dev1/setup.sh +18 -0
- gentroutils-1.6.0.dev1/src/gentroutils/__init__.py +11 -0
- gentroutils-1.6.0.dev1/src/gentroutils/errors.py +39 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/path/__init__.py +6 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/path/ftp.py +48 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/path/gcs.py +45 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/transfer/__init__.py +6 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/transfer/ftp_to_gcs.py +49 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/transfer/model.py +36 -0
- gentroutils-1.6.0.dev1/src/gentroutils/io/transfer/polars_to_gcs.py +20 -0
- gentroutils-1.6.0.dev1/src/gentroutils/parsers/__init__.py +1 -0
- gentroutils-1.6.0.dev1/src/gentroutils/parsers/curation.py +168 -0
- gentroutils-1.6.0.dev1/src/gentroutils/py.typed +0 -0
- gentroutils-1.6.0.dev1/src/gentroutils/tasks/__init__.py +90 -0
- gentroutils-1.6.0.dev1/src/gentroutils/tasks/crawl.py +156 -0
- gentroutils-1.6.0.dev1/src/gentroutils/tasks/curation.py +110 -0
- gentroutils-1.6.0.dev1/src/gentroutils/tasks/fetch.py +141 -0
- gentroutils-1.6.0.dev1/src/gentroutils/transfer.py +81 -0
- gentroutils-1.6.0.dev1/tests/data/ftp/test/databases/gwas/summary_statistics/harmonised_list.txt +0 -0
- gentroutils-1.6.0.dev1/tests/data/gsutil_list.txt +95567 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/correct_curation.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_analysisFlag_type.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_analysisFlag_value.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_columns_curation.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_publicationTitle_type.tsv +3 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_pubmedId_type.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_studyId_type.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_studyId_value.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_studyType_type.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_studyType_value.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/incorrect_traitFromSource_type.tsv +3 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/non_unique_studyId.tsv +3 -0
- gentroutils-1.6.0.dev1/tests/data/manual_curation/null_value_in_studyId.tsv +2 -0
- gentroutils-1.6.0.dev1/tests/data/test.h.tsv.gz +0 -0
- gentroutils-1.6.0.dev1/tests/io/conftest.py +0 -0
- gentroutils-1.6.0.dev1/tests/io/path/conftest.py +0 -0
- gentroutils-1.6.0.dev1/tests/io/path/test_ftp.py +36 -0
- gentroutils-1.6.0.dev1/tests/io/path/test_gcs.py +35 -0
- gentroutils-1.6.0.dev1/tests/io/transfer/conftest.py +0 -0
- gentroutils-1.6.0.dev1/tests/io/transfer/test_ftp_to_gcs.py +87 -0
- gentroutils-1.6.0.dev1/tests/io/transfer/test_model.py +23 -0
- gentroutils-1.6.0.dev1/tests/io/transfer/test_polars_to_gcs.py +45 -0
- gentroutils-1.6.0.dev1/tests/parsers/conftest.py +0 -0
- gentroutils-1.6.0.dev1/tests/parsers/test_curation.py +157 -0
- gentroutils-1.6.0.dev1/tests/tasks/conftest.py +84 -0
- gentroutils-1.6.0.dev1/tests/tasks/test_crawl_task.py +219 -0
- gentroutils-1.6.0.dev1/tests/tasks/test_curation_task.py +220 -0
- gentroutils-1.6.0.dev1/tests/tasks/test_fetch_task.py +198 -0
- gentroutils-1.6.0.dev1/tests/test_transfer.py +94 -0
- gentroutils-1.6.0.dev1/uv.lock +2063 -0
- gentroutils-0.2.0/.github/workflows/pr.yaml +0 -28
- gentroutils-0.2.0/.github/workflows/release.yaml +0 -72
- gentroutils-0.2.0/.github/workflows/test.yaml +0 -31
- gentroutils-0.2.0/.python-version +0 -1
- gentroutils-0.2.0/CHANGELOG.md +0 -263
- gentroutils-0.2.0/PKG-INFO +0 -107
- gentroutils-0.2.0/README.md +0 -86
- gentroutils-0.2.0/pyproject.toml +0 -206
- gentroutils-0.2.0/requirements-dev.lock +0 -143
- gentroutils-0.2.0/requirements.lock +0 -61
- gentroutils-0.2.0/setup.sh +0 -28
- gentroutils-0.2.0/src/gentroutils/__init__.py +0 -44
- gentroutils-0.2.0/src/gentroutils/commands/__init__.py +0 -7
- gentroutils-0.2.0/src/gentroutils/commands/update_gwas_curation_metadata.py +0 -295
- gentroutils-0.2.0/src/gentroutils/commands/utils.py +0 -160
- gentroutils-0.2.0/tests/conftest.py +0 -41
- gentroutils-0.2.0/tests/test_cli.py +0 -22
- gentroutils-0.2.0/tests/test_update_gwas_curation_metadata.py +0 -218
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/.pre-commit-config.yaml +0 -0
- {gentroutils-0.2.0 → gentroutils-1.6.0.dev1}/commitlint.config.js +0 -0
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- dev
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
check:
|
|
12
|
+
name: ${{ matrix.command }}-${{ matrix.python-version }}
|
|
13
|
+
strategy:
|
|
14
|
+
max-parallel: 2
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
17
|
+
command: ["test", "type-check", "dep-check", "lint"]
|
|
18
|
+
# Skip redundant checks.
|
|
19
|
+
exclude:
|
|
20
|
+
- command: "lint"
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
- command: "lint"
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
- command: "dep-check"
|
|
25
|
+
python-version: "3.11"
|
|
26
|
+
- command: "dep-check"
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
- uses: astral-sh/setup-uv@v5
|
|
35
|
+
with:
|
|
36
|
+
enable-cache: true
|
|
37
|
+
cache-dependency-glob: "uv.lock"
|
|
38
|
+
python-version: ${{ matrix.python-version }}
|
|
39
|
+
- name: Install project
|
|
40
|
+
run: uv sync --all-extras
|
|
41
|
+
- name: Run test
|
|
42
|
+
run: make ${{ matrix.command }}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: ['v[0-9]+.[0-9]+.[0-9]']
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: prod
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-22.04
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version-file: pyproject.toml
|
|
19
|
+
- uses: astral-sh/setup-uv@v5
|
|
20
|
+
- name: Install project
|
|
21
|
+
run: uv sync --all-extras
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: make build
|
|
24
|
+
- name: Store the distribution packages
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: python-package-distributions
|
|
28
|
+
path: dist/
|
|
29
|
+
|
|
30
|
+
release:
|
|
31
|
+
name: test-pypi-release
|
|
32
|
+
needs: build
|
|
33
|
+
environment:
|
|
34
|
+
name: DEV
|
|
35
|
+
url: https://test.pypi.org/p/gentroutils
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
contents: write
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/download-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: python-package-distributions
|
|
44
|
+
path: dist/
|
|
45
|
+
- name: Publish distribution 📦 to ${{ vars.PYPI_NAME }}
|
|
46
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
47
|
+
with:
|
|
48
|
+
repository-url: ${{ vars.PYPI_URL }}
|
|
49
|
+
packages-dir: dist/
|
|
50
|
+
verbose: true
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
dev-release:
|
|
54
|
+
needs:
|
|
55
|
+
- build
|
|
56
|
+
permissions:
|
|
57
|
+
id-token: write
|
|
58
|
+
contents: write
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
environment:
|
|
61
|
+
name: PyPI
|
|
62
|
+
url: https://pypi.org/p/gentroutils
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/download-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
name: python-package-distributions
|
|
67
|
+
path: dist/
|
|
68
|
+
- name: Publish distribution 📦 to ${{ vars.PYPI_NAME }}
|
|
69
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
70
|
+
with:
|
|
71
|
+
repository-url: ${{ vars.PYPI_URL }}
|
|
72
|
+
packages-dir: dist/
|
|
73
|
+
verbose: true
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: trigger-release
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
on:
|
|
4
4
|
schedule:
|
|
5
5
|
- cron: "0 11 * * 2"
|
|
6
6
|
workflow_dispatch:
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
|
-
|
|
9
|
+
prepare-release-pr:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
environment: DEV
|
|
12
12
|
steps:
|
|
13
13
|
- uses: actions/create-github-app-token@v1
|
|
14
14
|
id: trigger-token
|
|
15
15
|
with:
|
|
16
|
-
app-id: ${{ vars.TRIGGER_WORKFLOW_GH_APP_ID}}
|
|
16
|
+
app-id: ${{ vars.TRIGGER_WORKFLOW_GH_APP_ID }}
|
|
17
17
|
private-key: ${{ secrets.TRIGGER_WORKFLOW_GH_APP_KEY }}
|
|
18
18
|
- uses: actions/checkout@v4
|
|
19
19
|
with:
|
|
@@ -1,27 +1,20 @@
|
|
|
1
|
-
name:
|
|
2
|
-
|
|
3
|
-
"on":
|
|
1
|
+
name: tag-release
|
|
2
|
+
on:
|
|
4
3
|
push:
|
|
5
|
-
branches:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
group: deploy
|
|
9
|
-
# NOTE: prevent hickups with semantic-release
|
|
10
|
-
cancel-in-progress: false
|
|
4
|
+
branches:
|
|
5
|
+
- dev
|
|
6
|
+
- main
|
|
11
7
|
|
|
12
|
-
env:
|
|
13
|
-
PYTHON_VERSION_DEFAULT: "3.10.8"
|
|
14
8
|
|
|
15
9
|
jobs:
|
|
16
|
-
tag:
|
|
10
|
+
create-tag:
|
|
17
11
|
# NOTE: only trigger the workflow when the commit is not from the GitHubActions bot (prevent self-triggering)
|
|
18
|
-
if: github.event.commits[0].author.name != 'github-actions'
|
|
12
|
+
if: github.event.commits[0].author.name != 'github-actions[botg]'
|
|
19
13
|
runs-on: ubuntu-latest
|
|
20
14
|
concurrency: release
|
|
21
15
|
environment: DEV
|
|
22
16
|
permissions:
|
|
23
17
|
contents: write
|
|
24
|
-
|
|
25
18
|
steps:
|
|
26
19
|
# NOTE: commits using GITHUB_TOKEN does not trigger workflows and we want to trigger PiPY from tag
|
|
27
20
|
- uses: actions/create-github-app-token@v1
|
|
@@ -35,22 +28,31 @@ jobs:
|
|
|
35
28
|
repository: opentargets/gentroutils
|
|
36
29
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
37
30
|
persist-credentials: false
|
|
38
|
-
ref:
|
|
39
|
-
- name:
|
|
31
|
+
ref: ${{ github.ref_name }}
|
|
32
|
+
- name: Create package release
|
|
40
33
|
id: semrelease
|
|
41
34
|
# v9.6.0 is required due to the python v3.12 in the newer version of semantic release action which
|
|
42
35
|
# breaks the poetry build command.
|
|
43
|
-
uses: python-semantic-release/python-semantic-release@v9.
|
|
36
|
+
uses: python-semantic-release/python-semantic-release@v9.19.1
|
|
44
37
|
with:
|
|
45
38
|
github_token: ${{ steps.trigger-token.outputs.token }}
|
|
46
|
-
|
|
47
39
|
- name: Publish package to GitHub Release
|
|
48
|
-
uses: python-semantic-release/
|
|
40
|
+
uses: python-semantic-release/publish-action@v9.19.1
|
|
49
41
|
if: ${{ steps.semrelease.outputs.released }} == 'true'
|
|
50
42
|
with:
|
|
51
|
-
# NOTE: allow to start the workflow when push action on tag gets executed
|
|
52
|
-
# requires using GH_APP to authenitcate, otherwise push authorised with
|
|
53
|
-
# the GITHUB_TOKEN does not trigger the tag artifact workflow.
|
|
54
|
-
# see https://github.com/actions/create-github-app-token
|
|
55
43
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
56
44
|
tag: ${{ steps.semrelease.outputs.tag }}
|
|
45
|
+
- name: Sync dev and main branch
|
|
46
|
+
if: ${{ github.ref_name == 'main' }}
|
|
47
|
+
shell: bash
|
|
48
|
+
run: |
|
|
49
|
+
git config user.name 'github-actions[bot]'
|
|
50
|
+
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
51
|
+
git checkout dev
|
|
52
|
+
git merge main
|
|
53
|
+
- name: Push changes
|
|
54
|
+
if: ${{ github.ref_name == 'main' }}
|
|
55
|
+
uses: ad-m/github-push-action@master
|
|
56
|
+
with:
|
|
57
|
+
github_token: ${{ steps.trigger-token.outputs.token }}
|
|
58
|
+
branch: dev
|
|
@@ -12,6 +12,22 @@ wheels/
|
|
|
12
12
|
# covarage
|
|
13
13
|
.coverage
|
|
14
14
|
coverage.xml
|
|
15
|
-
|
|
15
|
+
.coverage*
|
|
16
16
|
# interrogate
|
|
17
17
|
interrogate_badge.svg
|
|
18
|
+
|
|
19
|
+
.idea
|
|
20
|
+
.cloudstorage
|
|
21
|
+
.mypy_cache
|
|
22
|
+
.pytest_cache
|
|
23
|
+
.ruff_cache
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# R
|
|
27
|
+
.RData
|
|
28
|
+
.Rhistory
|
|
29
|
+
data
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# otter
|
|
33
|
+
work/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.analysis.typeCheckingMode": "standard",
|
|
3
|
+
"[python]": {
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
6
|
+
"editor.codeActionsOnSave": {
|
|
7
|
+
"source.organizeImports": "explicit"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"python.testing.pytestArgs": ["tests", "src"],
|
|
11
|
+
"python.testing.unittestEnabled": false,
|
|
12
|
+
"python.testing.pytestEnabled": true,
|
|
13
|
+
"cSpell.words": [
|
|
14
|
+
"aioftp",
|
|
15
|
+
"gentroutils",
|
|
16
|
+
"harmonised",
|
|
17
|
+
"sumstat"
|
|
18
|
+
]
|
|
19
|
+
}
|