Skip to content

Commit

Permalink
Merge pull request #53 from djarecka/fix/category
Browse files Browse the repository at this point in the history
adding check before overwriting category
  • Loading branch information
djarecka authored Nov 27, 2024
2 parents ab9eb53 + 88f9421 commit f82053d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/add_dunder_methods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add bkbit/models/genome_annotation.py
git commit -m 'Update genome_annotation.py with dunder methods'
git push
if ! git diff --quiet; then
git add bkbit/models/genome_annotation.py
git commit -m 'Update genome_annotation.py with dunder methods'
git push
else
echo "No changes to commit"
fi
3 changes: 2 additions & 1 deletion bkbit/model_converters/sheets_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def bican_fix(schema: SchemaDefinition) -> SchemaDefinition:
"""
# fixing values for categories
for nm, cl in schema.classes.items():
cl.slot_usage["category"] = SlotDefinition(name="category", pattern=r"^bican:[A-Z][A-Za-z]+$")
if "category" in cl.slots:
cl.slot_usage["category"] = SlotDefinition(name="category", pattern=r"^bican:[A-Z][A-Za-z]+$")
# not needed anymore
# if "name_pr" in cl.slots:
# cl.slots["name"] = cl.slots.pop("name_pr")
Expand Down
2 changes: 1 addition & 1 deletion bkbit/models/library_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9581,7 +9581,7 @@ class Library(ProvEntity, MaterialSample):
'local_names': {'NIMP': {'local_name_source': 'NIMP',
'local_name_value': 'library_quantification_ng'}},
'slot_uri': 'bican:318b2d3a-dae7-4c63-bfbb-93862b92f63e'} })
R1/R2_index_name: Optional[LibraryR1R2Index] = Field(None, description="""Name of the pair of library indexes used for sequencing. Indexes allow libraries to be pooled together for sequencing. Sequencing output (fastq) are demultiplexed by using the indexes for each library. The name will be associated with the sequences of i7, i5, and i5as, which are needed by SeqCores for demultiplexing. The required direction of the sequence (sense or antisense) of the index can differ depending on sequencing instruments.""", json_schema_extra = { "linkml_meta": {'alias': 'R1/R2 index name',
R1_R2_index_name: Optional[LibraryR1R2Index] = Field(None, description="""Name of the pair of library indexes used for sequencing. Indexes allow libraries to be pooled together for sequencing. Sequencing output (fastq) are demultiplexed by using the indexes for each library. The name will be associated with the sequences of i7, i5, and i5as, which are needed by SeqCores for demultiplexing. The required direction of the sequence (sense or antisense) of the index can differ depending on sequencing instruments.""", json_schema_extra = { "linkml_meta": {'alias': 'R1/R2 index name',
'domain_of': ['Library'],
'exact_mappings': ['NIMP:PD-VLLMWZ60'],
'in_subset': ['analysis', 'tracking'],
Expand Down

0 comments on commit f82053d

Please sign in to comment.