Skip to content

Commit d6f9bb4

Browse files
authored
Rename more references in repository to metamist (#555)
* Rename more sample-metadata references * Configure bumpversion for web * Bump version: 6.2.0 → 6.2.1 * Regenerate package-lock file * Remove bad commit --------- Co-authored-by: Michael Franklin <[email protected]>
1 parent b95ca51 commit d6f9bb4

24 files changed

+69
-67
lines changed

.bumpversion.cfg

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 6.2.0
2+
current_version = 6.2.1
33
commit = True
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>[A-z0-9-]+)
@@ -15,3 +15,7 @@ replace = version='{new_version}',
1515
[bumpversion:file:deploy/python/version.txt]
1616
search = {current_version}
1717
replace = {new_version}
18+
19+
[bumpversion:file:web/package.json]
20+
search = "version": "{current_version}",
21+
replace = "version": "{new_version}",

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sample Metadata
22

3-
[![codecov](https://codecov.io/gh/populationgenomics/sample-metadata/branch/dev/graph/badge.svg?token=OI3XZYR9HK)](https://codecov.io/gh/populationgenomics/sample-metadata)
3+
[![codecov](https://codecov.io/gh/populationgenomics/metamist/branch/dev/graph/badge.svg?token=OI3XZYR9HK)](https://codecov.io/gh/populationgenomics/metamist)
44

55
Metamist is database that stores **de-identified** -omics metadata.
66

@@ -390,7 +390,7 @@ will build the docker container and supply it to regenerate_api.py.
390390

391391
```bash
392392
# SM_DOCKER is a known env variable to regenerate_api.py
393-
export SM_DOCKER="cpg/sample-metadata-server:dev"
393+
export SM_DOCKER="cpg/metamist-server:dev"
394394
docker build --build-arg SM_ENVIRONMENT=local -t $SM_DOCKER -f deploy/api/Dockerfile .
395395
python regenerate_api.py
396396
```

api/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from api.settings import PROFILE_REQUESTS, SKIP_DATABASE_CONNECTION
2121

2222
# This tag is automatically updated by bump2version
23-
_VERSION = '6.2.0'
23+
_VERSION = '6.2.1'
2424

2525
logger = get_logger()
2626

db/backup/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The full recovery process is detailed below. Follow the recovery stages that are
3333
3. Clone this repo
3434
3535
> ```bash
36-
> git clone https://github.com/populationgenomics/sample-metadata.git
36+
> git clone https://github.com/populationgenomics/metamist.git
3737
> ```
3838
3939
4. Navigate to the appropriate directory
@@ -85,7 +85,7 @@ The full recovery process is detailed below. Follow the recovery stages that are
8585
8686
### Daily Backup
8787
88-
A cron job runs a [backup script](https://github.com/populationgenomics/sample-metadata/blob/dev/db/backup/backup.py) daily. The script outputs a folder that is uploaded to GCS in the [cpg-sm-backups](https://console.cloud.google.com/storage/browser/cpg-sm-backups;tab=objects?forceOnBucketsSortingFiltering=false&project=sample-metadata&prefix=&forceOnObjectsSortingFiltering=false) bucket.
88+
A cron job runs a [backup script](https://github.com/populationgenomics/metamist/blob/dev/db/backup/backup.py) daily. The script outputs a folder that is uploaded to GCS in the [cpg-sm-backups](https://console.cloud.google.com/storage/browser/cpg-sm-backups;tab=objects?forceOnBucketsSortingFiltering=false&project=sample-metadata&prefix=&forceOnObjectsSortingFiltering=false) bucket.
8989
9090
All backups will be retained for 30 days in the event that they are deleted.
9191
Setting up
@@ -141,7 +141,7 @@ IMPORTANT: Do not run the validation script in a production environment. In orde
141141
2. Clone this repo
142142
143143
> ```bash
144-
> git clone https://github.com/populationgenomics/sample-metadata.git
144+
> git clone https://github.com/populationgenomics/metamist.git
145145
> ```
146146
147147
3. Navigate to the directory
@@ -196,4 +196,4 @@ To test our monitoring and alerting policy, once a year our database backups wil
196196
Further, alongside the procedure to validate the [database restoration](#running-the-validation-script), the SM API will be validated.
197197
198198
1. Update the configuration to point to the new VM as the production VM.
199-
2. Run the test script, currently under construction [#35](https://github.com/populationgenomics/sample-metadata/pull/35)
199+
2. Run the test script, currently under construction [#35](https://github.com/populationgenomics/metamist/pull/35)

db/python/tables/project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ async def create_project(
409409
return project_id
410410

411411
async def update_project(self, project_name: str, update: dict, author: str):
412-
"""Update a sample-metadata project"""
412+
"""Update a metamist project"""
413413
await self.check_project_creator_permissions(author)
414414

415415
meta = update.get('meta')

deploy/python/version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.2.0
1+
6.2.1

metamist/parser/generic_metadata_parser.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
import re
55
import shlex
66
from functools import reduce
7-
from typing import Dict, List, Optional, Any, Tuple, Union
7+
from typing import Any, Dict, List, Optional, Tuple, Union
88

99
import click
1010

1111
from metamist.parser.generic_parser import (
1212
GenericParser,
1313
GroupedRow,
14-
ParsedSequencingGroup,
14+
ParsedAnalysis,
1515
ParsedAssay,
16+
ParsedSequencingGroup,
1617
# noqa
1718
SingleRow,
1819
run_as_sync,
19-
ParsedAnalysis,
20-
) # noqa
20+
)
2121

2222
__DOC = """
2323
Parse CSV / TSV manifest of arbitrary format.
@@ -697,7 +697,7 @@ async def get_analyses_from_sequencing_group(
697697
@click.option(
698698
'--project',
699699
required=True,
700-
help='The sample-metadata project ($DATASET) to import manifest into',
700+
help='The metamist project ($DATASET) to import manifest into',
701701
)
702702
@click.option('--sample-name-column', required=True)
703703
@click.option(

metamist/parser/generic_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def __init__( # pylint: disable=too-many-arguments
426426
self.ignore_extra_keys = ignore_extra_keys
427427

428428
if not project:
429-
raise ValueError('sample-metadata project is required')
429+
raise ValueError('A metamist project is required')
430430

431431
self.project = project
432432

metamist/parser/sample_file_map_parser.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# pylint: disable=too-many-instance-attributes,too-many-locals,unused-argument,wrong-import-order,unused-argument
3-
from typing import List
43
import logging
4+
from typing import List
55

66
import click
77

@@ -120,7 +120,7 @@ def get_sample_id(self, row: SingleRow) -> str:
120120
@click.command(help=__DOC)
121121
@click.option(
122122
'--project',
123-
help='The sample-metadata project to import manifest into',
123+
help='The metamist project to import manifest into',
124124
)
125125
@click.option('--default-sample-type', default='blood')
126126
@click.option('--default-sequence-type', default='wgs')

metamist_infrastructure/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ The `setup.py` in this directory does some directory magic, it adds:
1818
You can install from git using:
1919

2020
```bash
21-
pip install git+https://github.com/populationgenomics/sample-metadata.git@main#subdirectory=metamist_infrastructure
21+
pip install git+https://github.com/populationgenomics/metamist.git@main#subdirectory=metamist_infrastructure
2222
```
2323

2424
Or add the following to your `requirements.txt`:
2525

2626
```text
2727
# other requirements here
28-
metamist-infrastructure @ git+https://github.com/populationgenomics/sample-metadata.git@main#subdirectory=metamist_infrastructure
28+
metamist-infrastructure @ git+https://github.com/populationgenomics/metamist.git@main#subdirectory=metamist_infrastructure
2929
```

metamist_infrastructure/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
description='Metamist infrastructure plugin for cpg-infrastructure',
2020
long_description=readme,
2121
long_description_content_type='text/markdown',
22-
url=f'https://github.com/populationgenomics/sample-metadata',
22+
url='https://github.com/populationgenomics/metamist',
2323
license='MIT',
2424
packages=[
2525
'metamist_infrastructure',

scripts/arbitrary_sm.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# pylint: disable=no-member,consider-using-with
33
"""
4-
Run the sample-metadata API through the analysis runner
4+
Run the metamist API through the analysis runner
55
in a very generic, customisable way!
66
77
For example:
@@ -11,13 +11,12 @@
1111
--json '{"project": "acute-care", "external_id": "<external-id>"}'
1212
1313
"""
14-
from typing import List
15-
import os.path
16-
import logging
17-
import subprocess
18-
1914
import argparse
2015
import json
16+
import logging
17+
import os.path
18+
import subprocess
19+
from typing import List
2120

2221
from metamist import apis
2322
from metamist.model_utils import file_type
@@ -39,7 +38,7 @@ def run_sm(
3938
api = getattr(apis, api_class_name)
4039
api_instance = api()
4140

42-
# the latest sample-metadata API wants an IOBase, so let's
41+
# the latest metamist API wants an IOBase, so let's
4342
# scan through the params, open and substitute the files
4443
openapi_types = getattr(api_instance, f'{method_name}_endpoint').__dict__[
4544
'openapi_types'
@@ -90,7 +89,7 @@ def from_args(args):
9089
def main(args=None):
9190
"""Main function, parses sys.argv"""
9291

93-
parser = argparse.ArgumentParser('Arbitrary sample-metadata script')
92+
parser = argparse.ArgumentParser('Arbitrary metamist script')
9493
parser.add_argument('api_name')
9594
parser.add_argument('method_name')
9695
parser.add_argument(

scripts/back_populate_library_type.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
import logging
88
import re
9+
910
import click
1011

1112
from metamist.apis import AssayApi
@@ -45,7 +46,7 @@
4546
@click.option(
4647
'--project',
4748
required=True,
48-
help='The sample-metadata project ($DATASET)',
49+
help='The metamist project ($DATASET)',
4950
)
5051
@click.option(
5152
'-d',

scripts/back_populate_sequences.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
The assay ID would be HTJMHDSX3_4_220817_FD123456
1111
"""
1212
import logging
13+
1314
import click
1415

1516
from metamist.apis import AssayApi
@@ -24,7 +25,7 @@
2425
@click.option(
2526
'--project',
2627
required=True,
27-
help='The sample-metadata project ($DATASET)',
28+
help='The metamist project ($DATASET)',
2829
)
2930
def main(project: str):
3031
"""Back populate external_ids for existing assays"""

scripts/create_test_subset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
@click.option(
5555
'--project',
5656
required=True,
57-
help='The sample-metadata project ($DATASET)',
57+
help='The metamist project ($DATASET)',
5858
)
5959
@click.option(
6060
'-n',

scripts/parse_existing_cohort.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@
3232
3333
"""
3434

35-
import logging
3635
import csv
36+
import logging
3737
from typing import List, Optional
38+
3839
import click
3940

40-
from metamist.parser.generic_parser import READS_EXTENSIONS
4141
from metamist.parser.generic_metadata_parser import (
4242
GenericMetadataParser,
43-
SingleRow,
4443
GroupedRow,
44+
SingleRow,
4545
run_as_sync,
4646
)
47+
from metamist.parser.generic_parser import READS_EXTENSIONS
4748

4849
logger = logging.getLogger(__file__)
4950
logger.addHandler(logging.StreamHandler())
@@ -193,7 +194,7 @@ def get_existing_external_sequence_ids(self, participant_map: dict[str, dict]):
193194
@click.command(help='GCS path to manifest file')
194195
@click.option(
195196
'--project',
196-
help='The sample-metadata project to import manifest into',
197+
help='The metamist project to import manifest into',
197198
)
198199
@click.option('--search-location', 'search_locations', multiple=True)
199200
@click.option(

scripts/parse_ont_sheet.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55

66
import click
77

8-
from metamist.parser.generic_metadata_parser import (
9-
GenericMetadataParser,
10-
run_as_sync,
11-
)
8+
from metamist.parser.generic_metadata_parser import GenericMetadataParser, run_as_sync
129
from metamist.parser.generic_parser import ParsedSample, ParsedSequencingGroup
1310

1411
logger = logging.getLogger(__file__)
@@ -128,7 +125,7 @@ async def group_assays(self, sample: ParsedSample) -> list[ParsedSequencingGroup
128125
@click.command()
129126
@click.option(
130127
'--project',
131-
help='The sample-metadata project to import manifest into',
128+
help='The metamist project to import manifest into',
132129
)
133130
@click.option('--default-sample-type', default='blood')
134131
@click.option('--default-sequence-type', default='genome')

scripts/parse_sample_file_map.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# pylint: disable=too-many-instance-attributes,too-many-locals,unused-argument,wrong-import-order,unused-argument
3-
from typing import List
43
import logging
4+
from typing import List
55

66
import click
77

@@ -32,7 +32,7 @@
3232
@click.command(help=__DOC)
3333
@click.option(
3434
'--project',
35-
help='The sample-metadata project to import manifest into',
35+
help='The metamist project to import manifest into',
3636
)
3737
@click.option('--default-sample-type', default='blood')
3838
@click.option('--default-sequence-type', default='wgs')

scripts/parse_tobwgs_csv.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
# pylint: disable=too-many-instance-attributes,too-many-locals,unused-argument,wrong-import-order
22
import logging
3-
from typing import Optional, List
3+
from typing import List, Optional
44

55
import click
66

77
from metamist.models import AnalysisStatus
88
from metamist.parser.generic_metadata_parser import (
99
GenericMetadataParser,
10-
run_as_sync,
11-
ParsedSequencingGroup,
1210
ParsedAnalysis,
1311
ParsedAssay,
12+
ParsedSequencingGroup,
13+
run_as_sync,
1414
)
1515

16-
1716
logger = logging.getLogger(__file__)
1817
logger.addHandler(logging.StreamHandler())
1918
logger.setLevel(logging.INFO)
@@ -169,7 +168,7 @@ async def get_assays_from_group(
169168
@click.command(help='GCS path to manifest file')
170169
@click.option(
171170
'--project',
172-
help='The sample-metadata project to import manifest into (probably "seqr")',
171+
help='The metamist project to import manifest into (probably "seqr")',
173172
)
174173
@click.option('--default-sample-type', default='blood')
175174
@click.option('--default-sequence-type', default='wgs')

scripts/parse_vcgs_manifest.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import logging
33
import os
44
import re
5-
from typing import Dict, List, Any
5+
from typing import Any, Dict, List
66

77
import click
8-
from metamist.model.sequencing_type import SequenceType
98

9+
from metamist.model.sequencing_type import SequenceType
1010
from metamist.parser.generic_metadata_parser import (
1111
GenericMetadataParser,
12-
run_as_sync,
1312
SingleRow,
13+
run_as_sync,
1414
)
1515

1616
rmatch = re.compile(r'_[Rr]\d')
@@ -142,7 +142,7 @@ def get_sequencing_type(self, row: SingleRow) -> SequenceType:
142142
@click.command(help='GCS path to manifest file')
143143
@click.option(
144144
'--project',
145-
help='The sample-metadata project to import manifest into (probably "seqr")',
145+
help='The metamist project to import manifest into (probably "seqr")',
146146
)
147147
@click.option('--default-sample-type', default='blood')
148148
@click.option('--default-sequence-type', default='wgs')

0 commit comments

Comments
 (0)