Skip to content

Commit

Permalink
Update paper_ranking workflow (#1289)
Browse files Browse the repository at this point in the history
This pull request addresses the issue where the most recent iteration of
the 'paper ranking workflow' failed due to the `bioregistry` module not
being found.

Log details:
https://github.com/biopragmatics/bioregistry/actions/runs/12101327040/job/33741034641

I made the following changes to address this issue (and a couple other
issues):
- Updated `paper_ranking.yml` to ensure that the PYTHONPATH is properly
set, pointing to the `src` directory.
- Added `curies` to `paper_ranking_requirements.txt`
- Removed unnecessary lambda function

I confirmed that these changes successfully run the pipeline and update
the corresponding issue without error in my forked repository.
  • Loading branch information
nagutm authored Dec 1, 2024
1 parent c51cb8f commit 07a0109
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/paper_ranking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ jobs:
start_date=$(date -d "$end_date - 30 days" +'%Y-%m-%d')
echo "START_DATE=$start_date" >> $GITHUB_ENV
echo "END_DATE=$end_date" >> $GITHUB_ENV
- name: Set PYTHONPATH
run: |
echo "PYTHONPATH=$PWD/src" >> $GITHUB_ENV
- name: Run Paper Ranking Script
id: run-ranking-script
run: |
echo "PYTHONPATH=$PYTHONPATH" # Verify PYTHONPATH
python src/bioregistry/analysis/paper_ranking.py --start-date ${{ env.START_DATE }} --end-date ${{ env.END_DATE }}
- name: Upload Full List as Artifact
Expand Down
2 changes: 1 addition & 1 deletion src/bioregistry/analysis/paper_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _first_of_month() -> str:
"--end-date",
required=True,
help="End date of the period",
default=lambda x: datetime.date.today().isoformat(),
default=datetime.date.today().isoformat(),
)
def main(bioregistry_file: Path, start_date: str, end_date: str) -> None:
"""Load data, train classifiers, evaluate models, and predict new data.
Expand Down
1 change: 1 addition & 0 deletions src/bioregistry/analysis/paper_ranking_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
click
curies
indra
pandas
scikit-learn
Expand Down

0 comments on commit 07a0109

Please sign in to comment.