Skip to content

Commit

Permalink
feat(update): jinja2 (#4068) (major)
Browse files Browse the repository at this point in the history
### Changed

- Standardize to python project instead of Poetry
- Remove cache to allow updates to be installed
- Update several packages
  • Loading branch information
henrikstranneheim authored Jan 20, 2025
1 parent e313b18 commit 4e936e6
Show file tree
Hide file tree
Showing 14 changed files with 1,924 additions and 1,403 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/tests_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,8 @@ jobs:
with:
virtualenvs-create: false

- name: Cache dependencies
uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install --no-interaction
run: poetry install --no-interaction --all-extras

- name: Test with Pytest & Coveralls
run: |
Expand Down
2,505 changes: 1,476 additions & 1,029 deletions poetry.lock

Large diffs are not rendered by default.

121 changes: 55 additions & 66 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
[project]
name = "cg"
version = "65.0.16"
description = "Clinical Genomics command center"
authors = ["Clinical Genomics <[email protected]>"]
readme = "README.md"
readme = {file = "README.md", content-type = "text/markdown"}
homepage = "https://github.com/Clinical-Genomics/cg"
repository = "https://github.com/Clinical-Genomics/cg"
classifiers = [
Expand All @@ -20,72 +19,62 @@ include = [
"cg/**/*",
"tests/**/*"
]
requires-python = ">=3.9,<3.13"
dependencies = [
"alembic",
"SQLAlchemy",
"PyMySQL",
"click",
"blinker",
"CacheControl",
"Flask-Admin",
"Flask-CORS",
"Flask-Dance",
"Flask",
"Flask-WTF",
"WTForms",
"google-auth",
"gunicorn",
"requests",
"werkzeug",
"cachetools",
"cryptography",
"coloredlogs",
"Jinja2",
"lxml",
"marshmallow",
"MarkupSafe",
"openpyxl",
"packaging",
"pandas",
"paramiko",
"petname",
"psutil",
"pydantic == 2.7.4",
"python-dateutil",
"PyYAML",
"tabulate",
"typing_extensions",
"urllib3",
"genologics",
"housekeeper>=4.11.3",
"pydantic-settings>=2.3.3",
"email-validator>=2.2.0",
"rich-click>=1.8.4",
]
[project.optional-dependencies]
coveralls = ["coveralls"]
mock = ["mock"]
pre-commit = ["pre-commit"]
pytest-cov = ["pytest-cov"]
pytest-mock = ["pytest-mock"]
pytest = ["pytest"]
ruff = ["ruff"]
pytest-xdist = ["pytest-xdist"]

[tool.poetry.dependencies]
python = ">=3.9,<3.13"

# Database
alembic = "*"
SQLAlchemy = "*"
PyMySQL = "*"

# CLI
click = "*"

# Server
blinker = "*"
CacheControl = "*"
Flask-Admin = "*"
Flask-CORS = "*"
Flask-Dance = "*"
Flask = "*"
Flask-WTF = "*"
WTForms = "*"
google-auth = "*"
gunicorn = "*"
requests = "*"
werkzeug = "*"

# Utils
cachetools = "*"
cryptography = "*"
coloredlogs = "*"
Jinja2 = ">=3.1.3"
lxml = "*"
marshmallow = "*"
MarkupSafe = "*"
openpyxl = "*"
packaging = "*"
pandas = "*"
paramiko = "*"
petname = "*"
psutil = "*"
pydantic = "*"
python-dateutil = "*"
PyYAML = "*"
tabulate = "*"
typing_extensions = "*"
urllib3 = "*"

# Apps
genologics = "*"
housekeeper = ">=4.11.3"
pydantic-settings = "^2.3.3"
email-validator = "^2.2.0"
rich-click = "^1.8.4"


[tool.poetry.dev-dependencies]
coveralls = "*"
mock = "*"
pre-commit = "*"
pytest-cov = "*"
pytest-mock = "*"
pytest = "*"
ruff = "*"
pytest-xdist = "*"

[tool.poetry.scripts]
[project.scripts]
cg = "cg.cli.base:base"


Expand Down
7 changes: 4 additions & 3 deletions tests/cli/store/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ def test_store_flow_cell(
assert sample

# GIVEN samples objects on a flow cell
with mocker.patch.object(
Store, "get_samples_by_illumina_flow_cell", return_value=[sample]
), mocker.patch.object(CompressAPI, "add_decompressed_fastq", return_value=True):
with (
mocker.patch.object(Store, "get_samples_by_illumina_flow_cell", return_value=[sample]),
mocker.patch.object(CompressAPI, "add_decompressed_fastq", return_value=True),
):
# WHEN running the store flow cell command
res = cli_runner.invoke(
store_illumina_run,
Expand Down
Loading

0 comments on commit 4e936e6

Please sign in to comment.