Skip to content

Commit

Permalink
Merge branch 'master' into contributing-md
Browse files Browse the repository at this point in the history
  • Loading branch information
DhanshreeA authored Oct 17, 2024
2 parents 0efc182 + be2a3f6 commit ca31d30
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,26 @@ jobs:
git tag -a "v${{ steps.version.outputs.VERSION }}" -m "v${{ steps.version.outputs.VERSION }}"
# Tagging happens implicitly; no need to push explicitly
- name: Update version in CITATION.cff
- name: Update version and release date in CITATION.cff
id: update-citation
env:
VERSION: ${{ steps.version.outputs.VERSION }}
run: |
RELEASE_DATE: ${{ github.run_started_at }} # This captures the timestamp when the workflow run was triggered/started

run: |
pip install PyYAML
python -c "
import os
import yaml
release_date = os.environ['RELEASE_DATE'].split('T')[0]
with open('CITATION.cff', 'r') as file:
content = file.read()
citation = yaml.safe_load(content)
citation = yaml.safe_load(file)
citation['version'] = os.environ['VERSION']
citation['date-released'] = release_date
with open('CITATION.cff', 'w') as file:
yaml.dump(citation, file, default_flow_style=False, sort_keys=False)
"
Expand All @@ -72,7 +79,7 @@ jobs:
with:
author_name: "ersilia-bot"
author_email: "[email protected]"
message: "update version [skip ci]"
message: "update version and release date [skip ci]"
repository: "ersilia-os/${{ github.event.repository.name }}"
github_token: ${{ secrets.GITHUB_TOKEN }}
amend: true
Expand Down
11 changes: 11 additions & 0 deletions test/test_compound_identifier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest
from ersilia.utils.identifiers.compound import CompoundIdentifier

@pytest.fixture
def compound_identifier():
return CompoundIdentifier()

@pytest.mark.parametrize("header", ["smiles", "input", "SMILES", "INPUT"])
def test_is_input_header_positive(compound_identifier, header):
"""Test that valid input headers return True."""
assert compound_identifier.is_input_header(header) is True

0 comments on commit ca31d30

Please sign in to comment.