Skip to content

Removing the remove_category function #1047

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

Merged
merged 1 commit into from
Apr 8, 2015

Conversation

josenavas
Copy link
Contributor

I don't think the remove_category function is needed, so I'm removing it from the code base.

The reasons why I think this function should be removed:

  • It is not used in any place in the code base
  • It has a comment that says "This operation may invalidate another user's perspective on the table", but no checks o safe mechanism is put in place.
  • It is buggy: it is dropping a column from the dynamic table, but is not updating the study-columns table.
  • Leaves the filesystem in an inconsistent state: once the column is removed, the sample template file and the qiime mapping file is not being re-generated, so the files do not represent the data in the DB
  • Before removing any column in the metadata templates, multiple checks has to be done (i.e. it has been used in an analysis).

Since it is clear that a lot of though has to be put in this function, I think it is safer to just remove it for now and put it back once the functionality is needed and we actually have a design for all the mechanisms to notify users once a template has been changed in this way. Note that IMOO, adding new columns is not a big deal, however, removing columns is another story.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 79.1% when pulling eeeef3d on josenavas:drop-remove-category into 2199bdd on biocore:master.

@ElDeveloper
Copy link
Contributor

👍 on the basis that it is not being used anywhere and its use could lead to an inconsistent state of the system.

antgonza added a commit that referenced this pull request Apr 8, 2015
Removing the remove_category function
@antgonza antgonza merged commit b0358b9 into qiita-spots:master Apr 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants