Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add script to automatically remove accepted ontologies #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cthoyt
Copy link

@cthoyt cthoyt commented Nov 19, 2022

Closes #22

This PR does the following:

  1. Adds a Python script that automatically removes accepted ontologies from the NOR dashboard.
  2. Adds a tox file with appropriate configuration to run this script reproducibly
  3. Adds a GitHub Actions workflow to automate running this script nightly or on request (though it's TBD how well this works with deleting files)
  4. Updates the README with some information on this

After accepting this and running the script via GitHub Actions, the T4FS ontology should get removed.

This took about 15 minutes to write ;)


# Remove folders corresponding to active ontologies
for directory in DASHBOARD_DIRECTORY.iterdir():
if directory.is_dir() and directory.name in prefixes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already an action that deals with cleaning the directory. Only the yaml file needs to be edited! The rest happens automatically!

Copy link
Collaborator

@matentzn matentzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

The dir deletion is unnecessary (dealt with by https://github.com/OBOFoundry/obo-nor.github.io/blob/master/.github/workflows/dashboard.yml) and we should always make PRs, instead of committing to master. This way, when the change is merged, the dashboard is automatically rebuild as well!

git config --local user.name "GitHub Action"
git add --all
git commit -m "Automatically remove accepted ontologies" -a
- name: Push changes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate removing things from NOR dashboard after they're accepted in OBO Foundry
2 participants