-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into contributing-md
- Loading branch information
Showing
2 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
" | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |