gentroutils 0.1.5__tar.gz → 1.5.0__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.
Files changed (52) hide show
  1. gentroutils-1.5.0/.github/workflows/labeler.yaml +14 -0
  2. gentroutils-1.5.0/.github/workflows/pr.yaml +42 -0
  3. gentroutils-1.5.0/.github/workflows/release.yaml +73 -0
  4. {gentroutils-0.1.5 → gentroutils-1.5.0}/.github/workflows/release_pr.yaml +4 -4
  5. {gentroutils-0.1.5 → gentroutils-1.5.0}/.github/workflows/tag.yaml +25 -23
  6. {gentroutils-0.1.5 → gentroutils-1.5.0}/.gitignore +3 -1
  7. gentroutils-1.5.0/CHANGELOG.md +513 -0
  8. {gentroutils-0.1.5 → gentroutils-1.5.0}/Makefile +9 -9
  9. gentroutils-1.5.0/PKG-INFO +135 -0
  10. gentroutils-1.5.0/README.md +110 -0
  11. {gentroutils-0.1.5 → gentroutils-1.5.0}/pyproject.toml +46 -21
  12. gentroutils-1.5.0/setup.sh +18 -0
  13. {gentroutils-0.1.5 → gentroutils-1.5.0}/src/gentroutils/__init__.py +3 -1
  14. gentroutils-1.5.0/src/gentroutils/commands/__init__.py +11 -0
  15. {gentroutils-0.1.5 → gentroutils-1.5.0}/src/gentroutils/commands/update_gwas_curation_metadata.py +12 -38
  16. {gentroutils-0.1.5 → gentroutils-1.5.0}/src/gentroutils/commands/utils.py +51 -34
  17. gentroutils-1.5.0/src/gentroutils/commands/validate_gwas_curation.py +165 -0
  18. gentroutils-1.5.0/src/gentroutils/py.typed +0 -0
  19. gentroutils-1.5.0/tests/conftest.py +132 -0
  20. gentroutils-1.5.0/tests/data/harmonised_list.txt +0 -0
  21. gentroutils-1.5.0/tests/data/manual_curation/correct_curation.tsv +2 -0
  22. gentroutils-1.5.0/tests/data/manual_curation/incorrect_analysisFlag_type.tsv +2 -0
  23. gentroutils-1.5.0/tests/data/manual_curation/incorrect_analysisFlag_value.tsv +2 -0
  24. gentroutils-1.5.0/tests/data/manual_curation/incorrect_columns_curation.tsv +2 -0
  25. gentroutils-1.5.0/tests/data/manual_curation/incorrect_publicationTitle_type.tsv +3 -0
  26. gentroutils-1.5.0/tests/data/manual_curation/incorrect_pubmedId_type.tsv +2 -0
  27. gentroutils-1.5.0/tests/data/manual_curation/incorrect_studyId_type.tsv +2 -0
  28. gentroutils-1.5.0/tests/data/manual_curation/incorrect_studyId_value.tsv +2 -0
  29. gentroutils-1.5.0/tests/data/manual_curation/incorrect_studyType_type.tsv +2 -0
  30. gentroutils-1.5.0/tests/data/manual_curation/incorrect_studyType_value.tsv +2 -0
  31. gentroutils-1.5.0/tests/data/manual_curation/incorrect_traitFromSource_type.tsv +3 -0
  32. gentroutils-1.5.0/tests/data/manual_curation/non_unique_studyId.tsv +3 -0
  33. gentroutils-1.5.0/tests/data/manual_curation/null_value_in_studyId.tsv +2 -0
  34. {gentroutils-0.1.5 → gentroutils-1.5.0}/tests/test_cli.py +1 -0
  35. {gentroutils-0.1.5 → gentroutils-1.5.0}/tests/test_update_gwas_curation_metadata.py +25 -38
  36. gentroutils-1.5.0/tests/test_validate_gwas_curation.py +60 -0
  37. gentroutils-1.5.0/uv.lock +1796 -0
  38. gentroutils-0.1.5/.github/workflows/pr.yaml +0 -28
  39. gentroutils-0.1.5/.github/workflows/release.yaml +0 -72
  40. gentroutils-0.1.5/.github/workflows/test.yaml +0 -31
  41. gentroutils-0.1.5/.python-version +0 -1
  42. gentroutils-0.1.5/CHANGELOG.md +0 -220
  43. gentroutils-0.1.5/PKG-INFO +0 -71
  44. gentroutils-0.1.5/README.md +0 -58
  45. gentroutils-0.1.5/requirements-dev.lock +0 -143
  46. gentroutils-0.1.5/requirements.lock +0 -61
  47. gentroutils-0.1.5/setup.sh +0 -30
  48. gentroutils-0.1.5/src/gentroutils/commands/__init__.py +0 -7
  49. gentroutils-0.1.5/tests/conftest.py +0 -41
  50. {gentroutils-0.1.5 → gentroutils-1.5.0}/.pre-commit-config.yaml +0 -0
  51. {gentroutils-0.1.5 → gentroutils-1.5.0}/LICENSE +0 -0
  52. {gentroutils-0.1.5 → gentroutils-1.5.0}/commitlint.config.js +0 -0
@@ -0,0 +1,14 @@
1
+ name: label-pr
2
+
3
+ "on":
4
+ - pull_request
5
+ - issues
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: srvaroa/labeler@master
13
+ env:
14
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -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: Trigger Release
1
+ name: trigger-release
2
2
 
3
- "on":
3
+ on:
4
4
  schedule:
5
5
  - cron: "0 11 * * 2"
6
6
  workflow_dispatch:
7
7
 
8
8
  jobs:
9
- pull-request:
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: Tag
2
-
3
- "on":
1
+ name: tag-release
2
+ on:
4
3
  push:
5
- branches: ["main"]
6
-
7
- concurrency:
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: main
39
- - name: Python Semantic Release
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.6.0
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/upload-to-gh-release@main
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,8 @@ 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