Skip to content

Conversation

@antgonza
Copy link
Member

@antgonza antgonza commented Jun 8, 2022

This adds the possibility to archive BIOM files and delete their log files.

@charles-cowart charles-cowart self-requested a review June 8, 2022 23:24
@coveralls
Copy link

coveralls commented Jun 9, 2022

Coverage Status

Coverage increased (+0.0005%) to 92.871% when pulling 6959ceb on antgonza:archive-biom into 1dee59f on qiita-spots:dev.

Additionally, study artifacts have 5 different states: sandboxed, awaiting_approval,
private, public and archived. A sandboxed artifact has all operational
capabilities in the system but is not publicly available, allowing for quick
integration with other studies but at the same time keeping it private so the
Copy link
Contributor

Choose a reason for hiding this comment

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

I think using 'private' in this sentence might be confusing, since it's not the same meaning as the 'private' state for study artifacts. The text on 'awaiting_approval' was also a little confusing. Here are some suggested changes in the context of the text as a whole:


Additionally, study artifacts have 5 different states: sandboxed,
awaiting_approval, private, public and archived. A sandboxed artifact has all
operational capabilities in the system but is not publicly available, allowing
for quick integration with other studies but at the same time keeping it hidden
so the user can improve the analysis. 

Once a user is satisfied with their analysis, they can request to upgrade their
project's status to 'private'; this confers additional benefits to the project,
including permanent space in the repository. During this time, an administrator
will validate their study and its status will change to 'awaiting_approval'.

At this stage in Qiita the whole study (including all processed data) is
private. This process is completely automatic via the Graphical User Interface
(GUI). Currently sequence data is deposited for permanent storage to the
European Nucleotide Archive (ENA), part of the European Bioinformatics
Institute (EBI). When the user is ready, usually when the main manuscript of
the study is ready for publication, the user can request for the artifact to be
made 'public', both in Qiita and the permanent repository, Figure 2. Finally,
when new processing algorithms are available, the older BIOM artifacts are
'archived', for long term storage.



def artifact_visibilities_to_skip():
return tuple([qdb.util.convert_to_id('archived', "visibility")])
Copy link
Contributor

Choose a reason for hiding this comment

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

A new function for one line of code seems a little excessive. However I appreciate the readability. Not sure I would suggest unfolding it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried adding as a global variable in the artifact.py and as a member of the Artifact object but turns out that this is not possible because the code will try to initialize those variables when the code is initiated (and there is no database) so it fails, for example.

QiitaDBOperationNotPermittedError
If the artifact is not public
If the artifact_type is not BIOM
If the artifact belowns to an analysis
Copy link
Contributor

Choose a reason for hiding this comment

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

belowns -> belongs

'Only non raw artifacts can be archived')

# let's find all ancestors that can be deleted (it has parents and no
# ancestors, and delete them
Copy link
Contributor

Choose a reason for hiding this comment

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

ancestors -> descendants?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's actually both but added extra info to make it clearer

@charles-cowart charles-cowart merged commit a372436 into qiita-spots:dev Jun 14, 2022
Copy link
Contributor

@charles-cowart charles-cowart left a comment

Choose a reason for hiding this comment

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

Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants