Skip to content

Commit 06e558d

Browse files
anastasiabratulinkorikuzmaAnastasia Bratulinjennifer-bowser
authored
refactor: seqrepo rest service to follow python package template (#1)
addresses [biocommons hackathon issue #32](biocommons/hackathon#32) --------- Co-authored-by: Kori Kuzma <korikuzma@gmail.com> Co-authored-by: Anastasia Bratulin <bratulin.1@osu.edu> Co-authored-by: Jennifer Bowser <jduffbowser@gmail.com>
1 parent 0729ce9 commit 06e558d

32 files changed

Lines changed: 2318 additions & 553 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Setup Python Environment"
2+
description: "Set up Python environment for the given Python version"
3+
4+
inputs:
5+
python-version:
6+
description: "Python version to use"
7+
required: true
8+
default: "3.13"
9+
uv-version:
10+
description: "uv version to use"
11+
required: true
12+
default: "0.7.14"
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ inputs.python-version }}
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
version: ${{ inputs.uv-version }}
25+
enable-cache: 'true'
26+
cache-suffix: ${{ matrix.python-version }}
27+
28+
- name: Install Python dependencies
29+
run: uv sync --frozen
30+
shell: bash

.github/workflows/build-and-push-image.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
https://raw.githubusercontent.com/biocommons/.github/main/etc/labels.yml
2727
.github/labels.yml
2828
29-
delete-other-labels: false
29+
delete-other-labels: false

.github/workflows/python-ci-cd.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Python CI/CD
2+
permissions:
3+
contents: write
4+
id-token: write
5+
6+
on:
7+
push:
8+
branches: ["*"]
9+
tags: ["*"]
10+
11+
jobs:
12+
python-ci-cd:
13+
name: Python CI/CD
14+
permissions:
15+
contents: write
16+
id-token: write
17+
uses: biocommons/.github/.github/workflows/python-ci-cd.yml@main
18+
with:
19+
publish: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
20+
secrets:
21+
pypi-token: ${{ secrets.UV_PUBLISH_TOKEN }}

.github/workflows/python-package.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# https://github.com/actions/stale
2-
31
name: 'Close stale issues and PRs'
42
on:
53
workflow_dispatch:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Validate Codecov Config
2+
3+
on:
4+
pull_request:
5+
paths: [codecov.yaml]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
validate-codecov-config:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Validate codecov configuration
17+
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate

.gitignore

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,92 @@
1-
*.bak
1+
*$py.class
2+
*.cover
23
*.egg
3-
*.egg-info
4+
*.egg-info/
45
*.log
56
*.manifest
6-
*.orig
7+
*.mo
8+
*.pot
9+
*.py.cover
10+
*.py[codz]
11+
*.sage.py
12+
*.so
13+
*.spec
714
*.sqlite3
15+
*.sqlite3-journal
816
*~
17+
.DS_Store
18+
.Python
19+
.abstra/
920
.cache
1021
.coverage
11-
.eggs
12-
.idea
22+
.coverage.*
23+
.cursorignore
24+
.cursorindexingignore
25+
.dmypy.json
26+
.eggs/
27+
.env
28+
.envrc
29+
.hypothesis/
30+
.installed.cfg
1331
.ipynb_checkpoints
14-
.tox
32+
.mypy_cache/
33+
.nox/
34+
.pdm-build/
35+
.pdm-python
36+
.pixi
37+
.pybuilder/
38+
.pypirc
39+
.pyre/
40+
.pytest_cache/
41+
.pytype/
42+
.ropeproject
43+
.ruff_cache/
44+
.scrapy
45+
.spyderproject
46+
.spyproject
47+
.tox/
48+
.venv
1549
.vscode
16-
__pycache__
50+
.webassets-cache
51+
/site
52+
ENV/
53+
MANIFEST
54+
__marimo__/
55+
__pycache__/
56+
__pypackages__/
1757
archive
18-
build
19-
dist
20-
docs/_build
58+
build/
59+
celerybeat-schedule
60+
celerybeat.pid
61+
cover/
62+
coverage.xml
63+
cython_debug/
64+
develop-eggs/
65+
dist/
66+
dmypy.json
67+
docs/_build/
68+
docs/source
69+
downloads/
70+
eggs/
71+
env.bak/
72+
env/
73+
htmlcov/
74+
instance/
75+
ipython_config.py
76+
lib/
77+
lib64/
78+
local_settings.py
79+
marimo/_lsp/
80+
marimo/_static/
2181
nosetests.xml
22-
venv
82+
parts/
83+
pip-delete-this-directory.txt
84+
pip-log.txt
85+
profile_default/
86+
sdist/
87+
share/python-wheels/
88+
target/
89+
var/
90+
venv.bak/
91+
venv/
92+
wheels/

.mailmap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# I pick the account with the most modified files in git shortlog -sne
2+
# This is used by Git to consolidate the users who used multiple accounts
3+
Reece Hart <reecehart@gmail.com>
4+
Reece Hart <reece@biocmmons.org>
5+
James Stevenson <james.sharpsteen@gmail.com>
6+
Kyle Ferriter <kferrite@broadinstitute.org>
7+
Andreas Prlic <andreas.prlic@invitae.com>
8+
Ben Robinson <ben.robinson@invitae.com>
9+
Blake Peterman <blake@peterman.io>
10+
James Stevenson <james.stevenson@nationwidechildrens.org>
11+
Kori Kuzma <korikuzma@gmail.com>
12+
melissacline <melissa.s.cline@gmail.com>

.pre-commit-config.yaml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
1-
- repo: https://github.com/astral-sh/ruff-pre-commit
2-
rev: v0.4.4
3-
hooks:
4-
- id: ruff-format
5-
args: [ --check ]
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: "v6.0.0"
4+
hooks:
5+
- id: check-case-conflict
6+
- id: check-merge-conflict
7+
- id: check-json
8+
exclude: ^.devcontainer/.*devcontainer.json
9+
- id: check-shebang-scripts-are-executable
10+
- id: check-symlinks
11+
- id: check-toml
12+
- id: check-yaml
13+
- id: detect-private-key
14+
- id: end-of-file-fixer
15+
- id: mixed-line-ending
16+
args: [ --fix=lf ]
17+
- id: pretty-format-json
18+
exclude: ^.devcontainer/.*devcontainer.json
19+
args: [--autofix, --no-sort-keys]
20+
- id: trailing-whitespace
621

22+
- repo: https://github.com/astral-sh/ruff-pre-commit
23+
rev: "v0.12.7"
24+
hooks:
25+
- id: ruff-check
26+
args: [ --fix, --exit-non-zero-on-fix ]
27+
- id: ruff-format
28+
29+
- repo: local
30+
hooks:
31+
- id: canonicalize-gitignore
32+
name: Sort unique .gitignore
33+
entry: sh -c 'LC_ALL=C sort -u -o .gitignore .gitignore'
34+
language: system
35+
files: ^\.gitignore$
36+
37+
- repo: local
38+
hooks:
39+
- id: canonicalize-pyproject
40+
name: Ensure pyproject.toml in canonical order and format
41+
entry: uvx toml-sort --in-place --all pyproject.toml
42+
language: system
43+
files: ^pyproject.toml$

0 commit comments

Comments
 (0)