text
stringlengths
185
73.3k
repo
stringlengths
7
100
path
stringlengths
4
146
language
stringclasses
7 values
hash
stringlengths
16
16
score
float64
7
8.5
stars
int64
0
237k
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """add index to pid_value in pidstore""" import sqlalchemy as sa from alembic import op # revision identifi...
inspirehep/inspirehep
backend/inspirehep/alembic/b0cdab232269_add_index_to_pid_value_in_pidstore.py
.py
f55bb9486fcf43dd
7.66
20
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """add recid to RecordsAuthors id_type""" from alembic import op # revision identifiers, used by Alembic. r...
inspirehep/inspirehep
backend/inspirehep/alembic/b495825c322b_add_recid_to_recordsauthors_id_type.py
.py
75ab1fa3bb5369fc
7.66
20
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Add Citation Table""" import sqlalchemy as sa from alembic import op from sqlalchemy_utils.types import U...
inspirehep/inspirehep
backend/inspirehep/alembic/b646d3592dd5_add_citation_table.py
.py
22605ce9dfb9d508
7.66
20
# # Copyright (C) 2019 CERN. # # inspirehep is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. """Change record_citations to records_citations for consistency""" from alembic import op # revision identifiers, used by Alembic. revision =...
inspirehep/inspirehep
backend/inspirehep/alembic/c6570e49b7b2_change_record_citations_to_records_.py
.py
f4a95b2f3ae632d5
7.66
20
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """init oai""" from alembic import op from invenio_oaiserver.models import OAISet # revision identifiers, u...
inspirehep/inspirehep
backend/inspirehep/alembic/c9f31d2a189d_init_oai.py
.py
039ee27d4a843f28
7.66
20
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Add 'institution_literature' table.""" import sqlalchemy as sa from alembic import op from sqlalchemy_uti...
inspirehep/inspirehep
backend/inspirehep/alembic/cea5fa2e5d2c_add_institution_literature_table.py
.py
c62596a9aed0ad88
7.66
20
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Add 'conference_literature' table.""" import sqlalchemy as sa from alembic import op from sqlalchemy_util...
inspirehep/inspirehep
backend/inspirehep/alembic/f563233434cd_add_conference_literature_table.py
.py
ec6f17d6b42fd85f
7.66
20
# # Copyright (C) 2019 CERN. # # inspirehep is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. """INSPIREHEP Celery app instantiation.""" import os import signal import flask import structlog from celery.signals import worker_process_in...
inspirehep/inspirehep
backend/inspirehep/celery.py
.py
f8b27f53c28234ab
7.66
20
# # Copyright (C) 2019 CERN. # # inspirehep is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. """Default configuration for inspirehep. You overwrite and set instance-specific configuration by either: - Configuration file: ``<virtualenv...
inspirehep/inspirehep
backend/inspirehep/config.py
.py
7359b14a7be22ab8
7.66
20
import logging from logging.config import fileConfig from flask import current_app from alembic import context # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python logging. # This line sets up loggers b...
RedHatInsights/ros-backend
migrations/env.py
.py
5327ddba4b77f49c
7.56
12
"""empty message Revision ID: 0158f7c00beb Revises: f7fa0888a0ea Create Date: 2021-02-17 13:56:37.616624 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '0158f7c00beb' down_revision = 'f7fa0888a0ea' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/0158f7c00beb_.py
.py
2ba61cfe78ff77a8
7.56
12
"""update performance profile table Revision ID: 015d7d1fea52 Revises: 605a688d0cd2 Create Date: 2022-03-23 15:48:26.160344 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '015d7d1fea52' down_revision = '605a688d0cd2' ...
RedHatInsights/ros-backend
migrations/versions/015d7d1fea52_update_performance_profile_table.py
.py
0027f1247ae7bb2b
7.56
12
"""remove unique constraint from account column Revision ID: 020def9f5b94 Revises: 93262eab7d77 Create Date: 2024-04-18 15:28:09.067224 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '020def9f5b94' down_revision = '93262eab7d77' branch_labels = None depends_on...
RedHatInsights/ros-backend
migrations/versions/020def9f5b94_.py
.py
ac2c898f78b8bb9c
7.56
12
"""empty message Revision ID: 0cc86f3e4037 Revises: f0b64806a260 Create Date: 2021-04-12 14:48:13.586341 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0cc86f3e4037' down_revision = 'f0b64806a260' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/0cc86f3e4037_.py
.py
44ed96182c768139
7.56
12
"""update default value for group column Revision ID: 1051e0d7e62e Revises: b21a2ec1a281 Create Date: 2023-07-21 20:50:08.705356 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '1051e0d7e62e' down_revision = 'b21a2ec1a281' branch_labels = None depends_on = None...
RedHatInsights/ros-backend
migrations/versions/1051e0d7e62e_update_default_value_for_group_column.py
.py
a269b9b6cc668360
7.56
12
"""remove columns from systems Revision ID: 26a16593ec96 Revises: 3d3a1981593c Create Date: 2022-03-24 01:24:52.670825 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects.postgresql import JSONB # revision identifiers, used by Alembic. revision = '26a16593ec96' down_revision = '3d3a1981593c' ...
RedHatInsights/ros-backend
migrations/versions/26a16593ec96_remove_columns_from_systems.py
.py
89aced0d9d6ba66a
7.56
12
"""empty message Revision ID: 290a91f4eff6 Revises: f1fdaf4da40c Create Date: 2022-08-03 19:24:48.439957 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '290a91f4eff6' down_revision = 'f1fdaf4da40c' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/290a91f4eff6_.py
.py
57abe8c48098a91d
7.56
12
"""empty message Revision ID: 37ef515b370d Revises: Create Date: 2020-12-08 19:15:38.124079 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '37ef515b370d' down_revision = None branch_labels = None depends_on = None de...
RedHatInsights/ros-backend
migrations/versions/37ef515b370d_.py
.py
d5485c128ec78605
7.56
12
"""rename performance_score column Revision ID: 397d8c6c506a Revises: e67b2b19df0e Create Date: 2021-09-13 00:17:30.617007 """ from alembic import op # revision identifiers, used by Alembic. revision = '397d8c6c506a' down_revision = 'e67b2b19df0e' branch_labels = None depends_on = None def upgrade(): op.alter_...
RedHatInsights/ros-backend
migrations/versions/397d8c6c506a_rename_performance_score_column.py
.py
d482e66fb85b3102
7.56
12
"""added psi enabled Revision ID: 3fb61393a227 Revises: 290a91f4eff6 Create Date: 2022-10-18 21:47:05.192322 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3fb61393a227' down_revision = '290a91f4eff6' branch_labels = None depends_on = None def upgrade(): ...
RedHatInsights/ros-backend
migrations/versions/3fb61393a227_added_psi_enabled.py
.py
76e9bf311f9b2188
7.56
12
"""Add indices on system, recommendation_rating, performance_profile_history Revision ID: 42ae31e22f84 Revises: 3fb61393a227 Create Date: 2023-03-03 11:28:23.004229 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '42ae31e22f84' down_revision = '3fb61393a227' br...
RedHatInsights/ros-backend
migrations/versions/42ae31e22f84_add_indices_on_system_recommendation_.py
.py
50196d7bc04f68fa
7.56
12
"""set keys on performance profile history Revision ID: 457844090fad Revises: 8c6f4554d24d Create Date: 2022-03-24 16:34:39.897983 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '457844090fad' down_revision = '8c6f4554d24d' branch_labels = None depends_on = No...
RedHatInsights/ros-backend
migrations/versions/457844090fad_set_keys_on_performance_profile_history.py
.py
37b0b3785077020f
7.56
12
"""add created_at field to rh_accounts Revision ID: 52381cafc36f Revises: 020def9f5b94 Create Date: 2024-08-28 16:11:42.517790 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '52381cafc36f' down_revision = '020def9f5b94' branch_labels = None depends_on = None ...
RedHatInsights/ros-backend
migrations/versions/52381cafc36f_add_created_at_field_to_rh_accounts.py
.py
e2d77b36e179014a
7.56
12
"""empty message Revision ID: 605a688d0cd2 Revises: db7f5df23e1b Create Date: 2022-02-25 19:42:44.282997 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '605a688d0cd2' down_revision = 'db7f5df23e1b' branch_labels = Non...
RedHatInsights/ros-backend
migrations/versions/605a688d0cd2_.py
.py
d1975944544846d5
7.56
12
"""empty message Revision ID: 77a3ca142468 Revises: a983b8b1865d Create Date: 2022-06-17 11:38:00.557432 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '77a3ca142468' down_revision = 'a983b8b1865d' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/77a3ca142468_.py
.py
1f6d3b70ad192db3
7.56
12
"""empty message Revision ID: 7805dfde3ca9 Revises: ac76a3ecb338 Create Date: 2021-03-10 11:25:26.878848 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '7805dfde3ca9' down_revision = 'ac76a3ecb338' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/7805dfde3ca9_.py
.py
c263ec1db0a46db9
7.56
12
"""empty message Revision ID: 7a2f8d6f27fc Revises: 0158f7c00beb Create Date: 2021-02-23 14:49:09.917838 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7a2f8d6f27fc' down_revision = '0158f7c00beb' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/7a2f8d6f27fc_.py
.py
e41a2f38894b8e80
7.56
12
"""create performance profile history Revision ID: 8c6f4554d24d Revises: 26a16593ec96 Create Date: 2022-03-24 13:39:41.695476 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '8c6f4554d24d' down_revision = '26a16593ec96'...
RedHatInsights/ros-backend
migrations/versions/8c6f4554d24d_create_performance_profile_history.py
.py
389399427f519dc8
7.56
12
"""Update top_candidate and top_candidate_price for existing records of PerformanceProfile Revision ID: 93262eab7d77 Revises: c6f2cd708cea Create Date: 2023-07-31 19:41:07.252297 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '93262eab7d77' down_revision = 'c6...
RedHatInsights/ros-backend
migrations/versions/93262eab7d77_update_top_candidate_and_top_candidate_price_for_existing_records.py
.py
70a10f5f35782cba
7.56
12
"""empty message Revision ID: a983b8b1865d Revises: d13d58080d80 Create Date: 2022-05-22 11:52:35.335067 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'a983b8b1865d' down_revision = 'd13d58080d80' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/a983b8b1865d_.py
.py
e8b0880261bfa027
7.56
12
"""empty message Revision ID: ac6838d7af60 Revises: 7a2f8d6f27fc Create Date: 2021-02-24 01:03:02.685857 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ac6838d7af60' down_revision = '7a2f8d6f27fc' branch_labels = None depends_on = None def upgrade(): # #...
RedHatInsights/ros-backend
migrations/versions/ac6838d7af60_.py
.py
05adb47b3ab989a4
7.56
12
"""empty message Revision ID: ac76a3ecb338 Revises: ac6838d7af60 Create Date: 2021-03-03 12:57:15.953877 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ac76a3ecb338' down_revision = 'ac6838d7af60' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/ac76a3ecb338_.py
.py
4b97f862db474a3b
7.56
12
"""added groups column to systems Revision ID: b21a2ec1a281 Revises: 42ae31e22f84 Create Date: 2023-06-27 12:09:23.334537 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'b21a2ec1a281' down_revision = '42ae31e22f84' bra...
RedHatInsights/ros-backend
migrations/versions/b21a2ec1a281_added_groups_column_to_systems.py
.py
7480460b9d69f83d
7.56
12
"""Add top_candidate, top_candidate_price on PerformanceProfile Revision ID: c6f2cd708cea Revises: 1051e0d7e62e Create Date: 2023-07-31 19:39:02.205466 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c6f2cd708cea' down_revision = '1051e0d7e62e' branch_labels =...
RedHatInsights/ros-backend
migrations/versions/c6f2cd708cea_add_top_candidate_top_candidate_price_.py
.py
a77ef3774d6c45c0
7.56
12
"""keep last reported in perf profile Revision ID: ccf59577aca2 Revises: 457844090fad Create Date: 2022-03-24 21:02:10.471949 """ from migrations.session_helpers import session from sqlalchemy import func, tuple_, DateTime, Integer, Column from sqlalchemy.ext.declarative import declarative_base # revision identifier...
RedHatInsights/ros-backend
migrations/versions/ccf59577aca2_keep_last_reported_in_perf_profile.py
.py
69562b8c8f5e44bf
7.56
12
"""empty message Revision ID: d13d58080d80 Revises: e65ffbc90def Create Date: 2022-05-11 16:06:51.909817 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'd13d58080d80' down_revision = 'e65ffbc90def' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/d13d58080d80_.py
.py
d3f95aeaa78299bf
7.56
12
"""empty message Revision ID: d1b9d14cd00a Revises: 7805dfde3ca9 Create Date: 2021-03-16 14:35:55.627096 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd1b9d14cd00a' down_revision = '7805dfde3ca9' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/d1b9d14cd00a_.py
.py
6579823308a50130
7.56
12
"""empty message Revision ID: db7f5df23e1b Revises: de502e7c8c6a Create Date: 2021-12-09 18:49:33.616848 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'db7f5df23e1b' down_revision = 'de502e7c8c6a' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/db7f5df23e1b_.py
.py
3b658fbfcfe98232
7.56
12
"""modify keys in performance_utilization Revision ID: de502e7c8c6a Revises: 397d8c6c506a Create Date: 2021-09-15 14:33:26.386292 """ from sqlalchemy import Date, Integer, Column from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declarative_base from migrations.session_helpers ...
RedHatInsights/ros-backend
migrations/versions/de502e7c8c6a_modify_keys_in_performance_utilization.py
.py
b8a16a4fcf010195
7.56
12
"""empty message Revision ID: e65ffbc90def Revises: 77fdc857c94f Create Date: 2022-04-18 11:29:29.984378 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e65ffbc90def' down_revision = '77fdc857c94f' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/e65ffbc90def_.py
.py
6d7446262eddd435
7.56
12
"""empty message Revision ID: e67b2b19df0e Revises: 0cc86f3e4037 Create Date: 2021-09-02 14:43:40.159163 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql.expression import true # revision identifiers, used by Alembic. revision = 'e67b2b19df0e' down_revision = '0cc86f3e4037' branch_labels = Non...
RedHatInsights/ros-backend
migrations/versions/e67b2b19df0e_.py
.py
86400f9d7a29e80e
7.56
12
"""empty message Revision ID: f0b64806a260 Revises: d1b9d14cd00a Create Date: 2021-04-05 18:45:56.321738 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f0b64806a260' down_revision = 'd1b9d14cd00a' branch_labels = None depends_on = None def upgrade(): # ...
RedHatInsights/ros-backend
migrations/versions/f0b64806a260_.py
.py
90896b472af5613b
7.56
12
"""empty message Revision ID: f1fdaf4da40c Revises: 77a3ca142468 Create Date: 2022-07-08 14:49:44.151908 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'f1fdaf4da40c' down_revision = '77a3ca142468' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/f1fdaf4da40c_.py
.py
79df1388c213f01f
7.56
12
"""empty message Revision ID: f7fa0888a0ea Revises: 37ef515b370d Create Date: 2021-02-17 13:52:48.369837 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'f7fa0888a0ea' down_revision = '37ef515b370d' branch_labels = None...
RedHatInsights/ros-backend
migrations/versions/f7fa0888a0ea_.py
.py
7b5935416d0f1eba
7.56
12
""" Custom readonly class for Recommendation """ from ros.lib.constants import ( RosSummary, Suggestions ) class Recommendation: """Custom readonly recommendation class to generate list.""" def __init__(self, rule_data, rule_hit, system, psi_enabled): rule_hit_key = rule_hit.get("key") ...
RedHatInsights/ros-backend
ros/api/modules/recommendations.py
.py
3b47f8ba952c8d76
7.56
12
#!/usr/bin/env python3 """ Utility script to add date prefixes to Jekyll posts that are missing them. This script scans all markdown files in the _posts subdirectories and renames them to include the YYYY-MM-DD prefix required by Jekyll, extracting dates from frontmatter. Usage: python add-date-prefixes.py [--dry...
bamr87/it-journey
scripts/development/content/add-date-prefixes.py
.py
f4ebce90cce17a7d
7.48
8
#!/usr/bin/env python3 """ Update 'date' frontmatter in Markdown files using git history. Scans all .md files in the repository and adds or updates the 'date' frontmatter field to reflect the file's original creation date as determined by git (the author date of the first commit that introduced the file). Usage: ...
bamr87/it-journey
scripts/development/content/update-date-frontmatter.py
.py
67152026ccc14a47
7.48
8
#!/usr/bin/env python3 """ File: compress_images.py Path: scripts/generation/compress_images.py Purpose: Compress tracked raster images to WebP and repoint every reference. The preview-image generators (the `zer0-image-generator` gem and scripts/lib/preview_generator.py) both emit PNG, which for AI-rendered artwork ru...
bamr87/it-journey
scripts/generation/compress_images.py
.py
0182423a13250022
7.48
8
#!/usr/bin/env python3 """Sync the site owner's public GitHub data into _data/github/*.yml. Used by .github/workflows/sync-github.yml (daily) and runnable locally. Auth: GH_TOKEN env (Actions: secrets.GITHUB_TOKEN; local: `gh auth token`). User: GH_USER env (default: bamr87). Writes six files consumed at build time v...
bamr87/it-journey
scripts/generation/sync_github.py
.py
66116bad8cfa53d8
7.48
8
#!/usr/bin/env python3 """Emit ``_data/quests/levels.yml`` from ``scripts/quest/quest_registry.py``. The generated file is consumed by quest layouts and includes so they can render tier names, themes, and XP ranges without hardcoding strings. Schema:: levels: "0000": theme: "Foundation & Init World...
bamr87/it-journey
scripts/quest/generate-quest-levels-data.py
.py
05d4d7dd93930271
7.48
8
#!/usr/bin/env python3 """ normalize-quest-frontmatter.py — the ONE idempotent, registry-driven frontmatter normalizer for the quest collection. Replaces the deleted one-off fixers. It uses round-trip YAML (ruamel.yaml) so it only changes what it touches — comments, key order, and quoting of untouched fields are prese...
bamr87/it-journey
scripts/quest/normalize-quest-frontmatter.py
.py
44d3c2f6155daa5e
7.48
8
import json import os import pathlib from spack.package import * from spack_repo.builtin.build_systems.generic import Package class Icon4py(Package): """ICON4Py Python interface package.""" homepage = "https://github.com/C2SM/icon4py" git = "https://github.com/C2SM/icon4py.git" # --- Versions --- ...
C2SM/spack-c2sm
repos/spack_repo/c2sm/packages/icon4py/package.py
.py
4780567a53d25ea2
7.5
9
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import re from collections import defaultdict from spack_repo.builtin.build_systems.autotools import AutotoolsP...
C2SM/spack-c2sm
repos/spack_repo/c2sm/packages/icontools/package.py
.py
74ac8c43bba86e58
7.5
9
import re from spack_commands import spack_install def test_icon_nwp_fflags_reach_fortran_compiler(): # Regression test for `fflags="..."` set on the icon-nwp spec (e.g. via # spack.yaml) being silently dropped instead of reaching the Fortran # compiler: icon's set_configure_args() (upstream, in the buil...
C2SM/spack-c2sm
test/balfrin_system_test.py
.py
097457fea79ab899
7
9
import pytest from spack_commands import spack_install def test_install_clang_format(): spack_install("clang-format") def test_install_cosmo_eccodes_definitions(): spack_install("cosmo-eccodes-definitions") def test_install_makedepf90(): # Tests are disabled because they fail with: # test1.sh: No ...
C2SM/spack-c2sm
test/common_system_test.py
.py
6307c3a4a6d1fd91
7
9
import os import subprocess import time from pathlib import Path REPO_DIR = Path(__file__).parents[1].resolve() PACKAGES_DIR = REPO_DIR / "repos/spack_repo/c2sm/packages" ALL_PACKAGES = [p.name.replace("_", "-") for p in PACKAGES_DIR.iterdir() if p.is_dir()] def time_format(seconds) -> str: "Returns a string for...
C2SM/spack-c2sm
test/spack_commands.py
.py
a52d486e9fcf3319
8
9
package comparesdk import ( "flag" "os" "path/filepath" "strings" "testing" ) var update = flag.Bool("update", false, "update golden expected.txt files under testdata/") // TestCompareScenarios runs every scenario directory under testdata/ through // Compare and checks both rendered reports against goldens: exp...
pulumi/ci-mgmt
provider-ci/internal/pkg/comparesdk/diff_test.go
.go
721fa58a0aa9b4c1
7.13
17
"""Measure what `import mama` costs, and name what it loads that it should not. python bench/bench_import.py The median of N cold interpreter runs, plus the deferred-module check. python bench/bench_import.py --tree The 25 costliest modules of one run, self time first. Use this to find the nex...
RedFox20/Mama
bench/bench_import.py
.py
0a8b3176f2c4589c
7.56
12
"""Profile mama itself: the child processes a run spawns, and where its own Python time goes. Three modes, in the order to use them: python bench/profile_mama.py census pytest tests/test_git_pin_change/ python bench/profile_mama.py census mama build Count every child process the run spawns, with total...
RedFox20/Mama
bench/profile_mama.py
.py
606d32b3ef37e33f
7.56
12
"""Remove published archives from the artifactory FTP. This module deletes, so every path through it lists what it found and asks before it acts. It also drops the local copy of anything it removes. A machine that cleans the server and keeps its own cache would go on serving the exact package nobody else can get.""" f...
RedFox20/Mama
mama/artifactory_unpublish.py
.py
dd4e6d6c86ee6a75
7.56
12
"""How a build is named: the variant suffix that a build dir AND an artifactory archive both carry, and the build dir name itself. ONE spelling for both, so a build and its uploaded package never disagree.""" from __future__ import annotations import re from typing import TYPE_CHECKING from .platforms.platform import ...
RedFox20/Mama
mama/build_names.py
.py
ccedb967295f7136
7.56
12
"""Cross-build-dir reuse of CMake compiler detection, which cuts a cold configure from about 6.5s to 1.7s. publish() captures only the toolchain detection files, never project flags, and inject() replays them.""" from __future__ import annotations import os, re, shutil, hashlib, json, time, threading from mama.utils.f...
RedFox20/Mama
mama/buildsys/cmake/compiler_cache.py
.py
4858443d3b413bfd
7.56
12
from __future__ import annotations from mama.platforms.registry import PLATFORMS # The CMake condition per platform, tested in registry order: android is also UNIX and iOS is also # APPLE, so the specific guard comes first. A consumer cannot detect a platform missing from here. _GUARDS = { 'android': 'ANDROID OR...
RedFox20/Mama
mama/buildsys/cmake/mamacmake.py
.py
5363b37ff553055a
7.56
12
from __future__ import annotations from typing import TYPE_CHECKING import os from mama.platforms.toolchain import Toolchain if TYPE_CHECKING: from mama.build_target import BuildTarget from mama.build_config import BuildConfig from mama.platforms.platform import Platform def use_toolchain_file(config:Bu...
RedFox20/Mama
mama/buildsys/cmake/options.py
.py
aa7a025121dc0416
7.56
12
"""The version mama computes for a local module that pins none. See docs/roadmap-local-module-version.md. A local dependency needs no pre-clone reader, because its source is already on disk. So mama names it by content, and both the download side and the upload side run the same function over the same tree. """ from ...
RedFox20/Mama
mama/local_version.py
.py
28619697ea9e3e63
7.56
12
"""What version a mamafile declares, read WITHOUT running the file, so the download side can name an artifactory package before the clone. See docs/roadmap-target-version.md.""" from __future__ import annotations import ast, os, re from typing import NamedTuple from .utils.system import warning from .utils.fileio imp...
RedFox20/Mama
mama/mamafile_version.py
.py
3c4526fa0d8d2a9a
7.56
12
from __future__ import annotations from typing import TYPE_CHECKING from collections import Counter import os, zipfile, shutil from .artifactory import artifactory_archive_name, artifactory_upload_ftp from .build_names import build_dir_build_type from .mamafile_version import pinned_version, computed_local_version fro...
RedFox20/Mama
mama/papa_upload.py
.py
b1e05fe8522b86d6
7.56
12
import os, runpy, inspect from .utils.system import console from .utils.fileio import read_text_from, write_text_to, file_sha1 from .utils.paths import path_join def parse_mamafile(config, target_class, mamafile): """Run `mamafile` and return (name, class) of its first `target_class` subclass.""" if not mamaf...
RedFox20/Mama
mama/parse_mamafile.py
.py
663cb0344eaf03d4
7.56
12
from __future__ import annotations from .windows import Windows from .linux import Linux from .macos import Macos from .ios import Ios from .android import Android from .raspi import Raspi from .mips import Mips from .oclea import Oclea from .xilinx import Xilinx from .imx8mp import Imx8mp from ..utils.system import Sy...
RedFox20/Mama
mama/platforms/registry.py
.py
75c06e42a0ef19e2
7.56
12
import os class Asset: def __init__(self, relpath, fullpath, category): """Create an asset. relpath: relative path to the source file fullpath: full path to the source file category: deploy path prefix that replaces the relative directory when set """ reldir = os.pat...
RedFox20/Mama
mama/types/asset.py
.py
5013f35e2c8bca85
7.56
12
class DepSource(object): # A parent declares this on add_git/add_local/add_artifactory_pkg. It appends to the archive version, # so a changed packaging recipe renames the package on every platform and compiler at once. version_suffix = '' def __init__(self, name:str): self.name = name ...
RedFox20/Mama
mama/types/dep_source.py
.py
5f490b745380e43d
7.56
12
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Extracted from https://github.com/sankalpjonn/timeloop """ import time from threading import Thread, Event from datetime import timedelta def time_ms(now): return str(time.ctime(now).split()[3]) + '.' + str.format("%03.0f" % (int(now % 1 * 1000))) def time_stamp(no...
SiliconLabs/wfx-common-tools
src/wfx_common_tools/test_feature/job.py
.py
6f353a92c006d8b5
8
9
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
OpenVoiceOS/ovos-skill-wikipedia
ovos_skill_wikipedia/__init__.py
.py
af784305a9f4fb76
7.54
11
"""Golden-utterance end-to-end coverage for ovos-skill-wikipedia (en-US). The golden corpus (``golden_utterances.jsonl``) is a vendored slice of the shared ovoscope golden-utterance dataset, keyed by ``skill_id == "ovos-skill-wikipedia.openvoiceos"`` (matches this skill's real OPM entry point too). One shared ``MiniCr...
OpenVoiceOS/ovos-skill-wikipedia
test/end2end/test_golden_utterances.py
.py
bf4634ce9fd56b9c
8.04
11
"""DDS CLI utils module.""" import numbers import pathlib import typing import http from typing import Dict, List, Union import logging from datetime import datetime import requests import rich.console import simplejson from jwcrypto.common import InvalidJWEOperation from jwcrypto.jwe import InvalidJWEData from jwcry...
ScilifelabDataCentre/dds_cli
dds_cli/utils.py
.py
655afcfd6813d594
7.57
13
from _pytest.logging import LogCaptureFixture from pyfakefs.fake_filesystem import FakeFilesystem from dds_cli import account_manager from dds_cli import utils from typing import Dict from requests_mock.mocker import Mocker from dds_cli import DDSEndpoint from dds_cli import exceptions import pytest import pathlib impo...
ScilifelabDataCentre/dds_cli
tests/test_account_manager.py
.py
bd8678e3f20a8ea4
7.07
13
"""Test the base module authentication functionality.""" from unittest.mock import MagicMock, patch import pathlib import pytest from dds_cli.base import DDSBaseClass from dds_cli.exceptions import AuthenticationError ###### Test constants ###### MOCK_USERNAME = "testuser" MOCK_PASSWORD = "testpass" MOCK_2FA_CODE ...
ScilifelabDataCentre/dds_cli
tests/test_base.py
.py
13cab5d3108fffe9
7.07
13
"""Tests for CLI commands in dds_cli.__main__""" from click.testing import CliRunner from unittest.mock import MagicMock, patch import pytest import dds_cli.exceptions from dds_cli.__main__ import dds_main #### AUTH COMMANDS ##### ## TWOFACTOR subcommands ## # parametrized options to pass to the test @pytest.ma...
ScilifelabDataCentre/dds_cli
tests/test_commands.py
.py
7f30d80db7c5aa22
7.07
13
from _pytest.logging import LogCaptureFixture from pyfakefs.fake_filesystem import FakeFilesystem from requests_mock.mocker import Mocker import pytest import pathlib import logging from dds_cli import data_remover from dds_cli import DDSEndpoint from dds_cli.exceptions import APIError def test_delete_tempfile_canno...
ScilifelabDataCentre/dds_cli
tests/test_data_remover.py
.py
9bd8912719903cef
8.07
13
"""Test for the decorators.""" # refference: https://medium.com/analytics-vidhya/testing-python-decorators-3c5777e4524d import pytest from unittest.mock import patch, MagicMock from dds_cli import custom_decorators ## TEST DATA PROJECT_ID = "test-123" ##### HELPER FUNCTIONS AND DECORATORS class DecoratorHelper: ...
ScilifelabDataCentre/dds_cli
tests/test_decorators.py
.py
6edf90efafb14238
8.07
13
from _pytest.logging import LogCaptureFixture from pyfakefs.fake_filesystem import FakeFilesystem from dds_cli import FileSegment, file_handler_local import pathlib import logging import typing import os import csv import hashlib from dds_cli import file_compressor from dds_cli import file_encryptor def test_compres...
ScilifelabDataCentre/dds_cli
tests/test_file_compressor.py
.py
045a3ed561520ec7
7.07
13
import hashlib import pathlib import typing from dds_cli import file_encryptor from dds_cli import FileSegment from dds_cli import file_handler_local from pyfakefs.fake_filesystem import FakeFilesystem import os import csv from cryptography.hazmat.primitives import asymmetric, serialization from cryptography.hazmat.pri...
ScilifelabDataCentre/dds_cli
tests/test_file_encryptor.py
.py
e1729d1a5a2df84b
7.07
13
import pathlib from pyfakefs.fake_filesystem import FakeFilesystem from unittest.mock import MagicMock, patch import pytest import hashlib from dds_cli.file_handler_local import LocalFileHandler # ---------- Helper Functions ---------- def create_test_file(fs, dir_path: str, file_name: str, contents: bytes): "...
ScilifelabDataCentre/dds_cli
tests/test_file_handler_local.py
.py
47eb794d54a73a3c
7.07
13
"""Test the motd_manager module.""" import logging import re from typing import Dict, List import pytest from _pytest.capture import CaptureFixture from _pytest.logging import LogCaptureFixture from requests_mock.mocker import Mocker from dds_cli import DDSEndpoint, motd_manager from dds_cli.exceptions import ApiRes...
ScilifelabDataCentre/dds_cli
tests/test_motd_manager.py
.py
66067c9d35f947f2
7.07
13
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.account_information import AccountInformation from bitmovin_api_sdk.models.response_envelope import Respon...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/account/information/information_api.py
.py
de00f6ae2fa10f48
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.acl import Acl from bitmovin_api_sdk.models.bitmovin_response import BitmovinResponse from bitmovin_api_sd...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/account/organizations/groups/permissions/permissions_api.py
.py
a8d22b6d45e585f9
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.organization_pending_invitation import OrganizationPendingInvitation from bitmovin_api_sdk.models.response...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/account/organizations/invitations/invitations_api.py
.py
efc64790a63e901a
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.organization import Organization from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope fr...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/account/organizations/sub_organizations/sub_organizations_api.py
.py
b11b6f497efd20ab
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope from bitmovin_api_sdk.models.response_error import ResponseError...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/account/organizations/tenants/tenants_api.py
.py
efe4202381f0f317
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.agent_session_history_response import AgentSessionHistoryResponse from bitmovin_api_sdk.models.agent_sessi...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/agents/aisa/sessions/sessions_api.py
.py
4e5efdd21d4dd77b
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.agent_session_history_response import AgentSessionHistoryResponse from bitmovin_api_sdk.models.agent_sessi...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/agents/assistant/sessions/sessions_api.py
.py
e61b97f711be4549
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope from bitmovin_api_sdk.models.response_error import ResponseError...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/ai_scene_analysis/analyses/analyses_api.py
.py
294532411ed50d32
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope from bitmovin_api_sdk.models.response_error import ResponseError...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/ai_scene_analysis/analyses/by_encoding_id/ad_placements/ad_placements_api.py
.py
c7c86397359eb932
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope from bitmovin_api_sdk.models.response_error import ResponseError...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/ai_scene_analysis/analyses/by_encoding_id/details/details_api.py
.py
9704b14f4f992d8b
7.6
15
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope from bitmovin_api_sdk.models.response_error import ResponseError...
bitmovin/bitmovin-api-sdk-python
bitmovin_api_sdk/ai_scene_analysis/analyses/by_encoding_id/details/language/language_api.py
.py
7038402f5212aa01
7.6
15
# Copyright 2020-2025 SURF. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
workfloworchestrator/SuPA
src/supa/buildtools/backend.py
.py
07d7f3ffaaabe321
7.45
7
# Copyright 2020 SURF. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
workfloworchestrator/SuPA
src/supa/connection/error.py
.py
39d367d315ebc952
7.45
7
# Copyright 2020 SURF. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
workfloworchestrator/SuPA
src/supa/connection/fsm.py
.py
b43a9f689773471c
7.45
7
# Copyright 2020 SURF. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
workfloworchestrator/SuPA
src/supa/db/session.py
.py
c329fb43458e4a90
7.45
7
# Copyright 2025 SURF. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
workfloworchestrator/SuPA
src/supa/db/utils.py
.py
c03f6de3190742fe
7.45
7