Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Proposal: use structure sync to track Taxonomy term, Menu and custom block updates. #44

Open
miura opened this issue Oct 23, 2018 · 6 comments
Assignees
Labels
dev environment enhancement New feature or request

Comments

@miura
Copy link
Member

miura commented Oct 23, 2018

@florian-levet @PerrineGilloteaux @vcaldas

please comment.

Updating the workflow for taxonomy terms

Kota

20181023

Current way of Adding, Editing, Weighting Taxonomy Terms

Up until October 2018 Taggathon, taxonomy terms incuding BISE ontology was handled in the following way.

  • Addition: New terms were transferred and added from Webprotege to biii.eu.LocalCopy using python script (Florian's work) - then the updated database is dumped manually, then the dumped file is imported from the biii.eu.
    • Taxonomy terms (EDAM Bioimaging ontology "Functions", "Topics" etc) lives only in database.
  • Weighting: Order of taxonomy appearance is also handled only in the database.
  • Disadvantage: updating of texonomy terms is NOT independent from other database updates, and not tracked by Git - cannot be easily pushed and pulled.

Recommended update in the workflow

By using an add-on package "structure sync", it's possible to export taxonomy terms as yml file and handle them just like other settings.

Expexted workflow is as following

Exporting taxonomy updates from database to yml file

  1. Adding, Editing, Weighting taxonomy terms in the local biii.eu.
  2. Translate the updates to writable format by drush export-taxonomies and it will be ready to be exported as files (changes at this stage only happens within the database)
  3. Check that there is difference in the database and yml file: drush config:status (short form drush cst). If there is difference, you should see structure_sync.data.yml in the list.
  4. As usual, drush cex (config:export) will update structure_sync.data.yml file according to the updates in the database.
  5. git add . & git commit - m "taxnonomy updated" or so will add these changes to the version tracking.
  6. git push origin <branch name>
  7. In Github, issue a pull request to NEUBIAS/bise dev branch. Wait (or insist) someone else to merge the PR.

What Florian can do from now on, is these 7 steps. Extract taxonomy from Webprotege and update your local drupal database using the python script. Then follow step 1 to 6 to push the changes to the Github repo.

Importing taxonomy updates from file to yml file

  1. Check if git pull upstream dev pulled any change in structure_sync.data.yml, If this happened, then taxonomy term has changed and you need to do the following.
  2. drush cim (config:import) to update your local database using updated yml file.
  3. drush import-taxonomies to update taxonomy.
@miura miura added the enhancement New feature or request label Oct 23, 2018
@miura miura pinned this issue Jan 31, 2019
@miura
Copy link
Member Author

miura commented Jan 31, 2019

see miura/bise@1b5a364 for and example structure_sync.data.yml

This was the status in October.

@PerrineGilloteaux
Copy link
Member

Export process worked nicely, cin worked nicely but then import taxonomy got stuck. Inverstigating..
Also for menu not everything was exported...

@PerrineGilloteaux
Copy link
Member

PerrineGilloteaux commented Feb 4, 2019

ok, some patch pending and open issue, maybe not ready for using .. Let's Watch the next version, for now not ok. https://www.drupal.org/project/issues/search/structure_sync?status%5B0%5D=8&status%5B1%5D=13&status%5B2%5D=14

@miura
Copy link
Member Author

miura commented Jun 14, 2020

Revival: please agree to use this module, to avoid the disappearance of contributions like we are seeing this time...

@miura miura pinned this issue Jun 14, 2020
@miura miura changed the title Proposal: use structure sync to track Taxonomy term updates. Proposal: use structure sync to track Taxonomy term, Menu and custom block updates. Jun 14, 2020
@miura
Copy link
Member Author

miura commented Jun 25, 2020

Export process worked nicely, cin worked nicely but then import taxonomy got stuck. Inverstigating..
Also for menu not everything was exported...

In terms of importing, doing it from the GUI works.
/admin/structure/structure-sync/general

@PerrineGilloteaux
Copy link
Member

PerrineGilloteaux commented May 11, 2023

Related to #72 and #66 merged with this one then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev environment enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

4 participants