GithubHelp home page GithubHelp logo

tripal_file's Introduction

alt tag

Tripal 4 (Drupal 10)

               _   _                 _____                 _                                  _
     /\       | | (_)               |  __ \               | |                                | |
    /  \   ___| |_ ___   _____      | |  | | _____   _____| | ___  _ __  _ __ ___   ___ _ __ | |_
   / /\ \ / __| __| \ \ / / _ \     | |  | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __|
  / ____ \ (__| |_| |\ V /  __/     | |__| |  __/\ V /  __/ | (_) | |_) | | | | | |  __/ | | | |_
 /_/    \_\___|\__|_| \_/ \___|     |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__|
                                                                  | |
                                                                  |_|

Compatibility

Target Drupal Version 10.2.x-dev

Tested on PostgreSQL 13 + PostgreSQL 16

Drupal 10.2.x 10.3.x
PHP 8.1 Grid81-102-Badge Grid81-103-Badge
PHP 8.2 Grid82-102-Badge Grid82-103-Badge
PHP 8.3 Grid83-102-Badge Grid83-103-Badge

Code Coverage

This project uses Code Climate to determine the quality of our codebase and the coverage of our test suite. Compatibility above is based on passing of this test suite.

Test Coverage

Maintainability

Current Timeline

Required for Tripal 4.alpha3 Release

  • Display suite / page work
  • Importers: Publications
  • Search (ElasticSearch + Views)

How to get involved!

This upgrade to Drupal 10 is a community effort. As such, we NEED YOUR HELP!

  • To get involved, please join our Tripal Slack and comment in the #core-dev channel.
    • Alternatively, feel free to contact Lacey-Anne Sanderson through Slack direct message.
    • We can use help both with programming, documentation, outreach and welcome all individuals from all backgrounds!
  • We prefer automated testing for all Pull Requests (PRs) and are happy to guide you through the process!
    • Just comment on the issue if you need help designing tests
    • If you need help implementing tests see our documentation
  • If more documentation would be helpful, please create an issue here and we'll add it.

Documentation

Documentation for Tripal 4 has begun on ReadtheDocs.

Tripal Docker

Tripal Docker is currently focused on Development and Automated Testing. There will be a production focused Tripal Docker soon and if you're interested in helping or providing tips -please join us on our Slack channel!

For more information about how to use our fully functional development docker, see our documentation on ReadtheDocs!

tripal_file's People

Contributors

cwytko avatar dsenalik avatar spficklin avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dsenalik

tripal_file's Issues

Default Properties

What are the list of properties that should automatically accompany files:

  • DOI

Feature request: for sio__file field to allow removal of a reference to a file

I accidentally added two files to the wrong analysis. Oh noes!
I need a way to remove them. I was wondering how this could be made to work.

I tried to select "-- Select a file --" and save - that didn't do it

The options that I thought of:

  1. What I tried would work and delete the reference to the file
  2. An additional column on the right with checkboxes with column header "Delete" (or "Remove")
  3. An option at the top of the "Order" dropdown that says "delete" - that seems pretty sketchy though

AJAX error caused by this module

The file tripal_file/theme/tripal_file.theme.inc is responsible for AJAX errors in various places, for example go to publish and select any content type, an error like this appears
20210423_ajaxerror

The original contents of this file is just 5 bytes

<?php

but there is no return character. I did a few tests, the contents of this file is appearing in the AJAX error, I have highlighted this in red.

If this file has a return character, however, everything works correctly. I will supply a pull request ( #22 ) to add the return character.

I want to also reference Issue #7 because maybe these were somehow related. At the very least it's the same file.

Directory Structure Hierarchy

It has been request that the module provide a data hierarchy for storing files. This needs some design and would probably vary from site to site. Perhaps the file content type could have a setting where tokens can be used (with property values) for creating a heirarchy.

Load EDAM Vocabulary - incorrect response from EBI

When launching the job to load the EDAM vocabulary, the server gets a bad response from EBI:

Cannot find the ontology via an EBI OLS lookup: EDAM_data. \nWe tried to access: http://www.ebi.ac.uk/ols/api/ontologies/EDAM_dataEBI Reported: Resource not found. Consider finding the OBO file for this ontology and manually loading it first.
Cannot find the term via an EBI OLS lookup: EDAM_data:0005. We tried to access: "http://www.ebi.ac.uk/ols/api/ontologies//terms/0005" EBI Reported: No message available. Consider finding the OBO file for this ontology and manually loading it first.
Performing EBI OLS Lookup for: EDAM_data:0006
Cannot find the term via an EBI OLS lookup: EDAM_data:0006. We tried to access: "http://www.ebi.ac.uk/ols/api/ontologies//terms/0006" EBI Reported: No message available. Consider finding the OBO file for this ontology and manually loading it first.
Performing EBI OLS Lookup for: EDAM_data:0007
Cannot find the term via an EBI OLS lookup: EDAM_data:0007. We tried to access: "http://www.ebi.ac.uk/ols/api/ontologies//terms/0007" EBI Reported: No message available. Consider finding the OBO file for this ontology and manually loading it first.

This continues on for every term (~3000 - http://edamontology.org/EDAM.obo), and then the same for 'format', 'operation', and 'topic'.

Letting it run to completion (instead of cancelling it) results in a Division by Zero error from TripalImporter.inc:646 followed by evidently not loading any type defs or terms:

Step 3: Loading type defs...
Step 4: Loading terms... %. Memory: 46,783,152 bytes.

The double slash in the URL does not seem to be the cause.

Stray <php inserted

In the tripal_file.theme.inc file, there is a lone <?php followed by EOF which gets misinterpreted by PHP and inserted into pages, including AJAX responses.

URI tripal field on license page is not clickable by default

The URI on a license page is not a clickable link.
This field is a textfield, and it can be made clickable by first going to tripal content types and set Text processing to Filtered text
URI-field
Then you have the option to set the text format to Full HTML (that happened automatically for me)
URI-field2
and the link is automatically converted to be clickable.

So - I think this should be the default, but I'm not sure how that is done! Maybe in tripal_file.module:

$info['data__uri']['settings']['text_processing'] = '1';

but I'm not sure how to test that since I already have the module installed.

sio__references_file warnings and display problems

I have a file with a reference to an organism defined in the chado.organism_file table.
I am seeing two warnings:
Notice: Trying to get property 'type_id' of non-object in sio__references_file->load() (line 214 of /var/www/2020-02-18/drupal-7.69/sites/all/modules/tripal_file/includes/TripalFields/sio__references_file/sio__references_file.inc).
Notice: Trying to get property 'name' of non-object in sio__references_file->load() (line 220 of /var/www/2020-02-18/drupal-7.69/sites/all/modules/tripal_file/includes/TripalFields/sio__references_file/sio__references_file.inc).
and the field displays incompletely with no name, and the infraspecific type omitted
before

I'll submit a pull request to fix

Notice from sio__file_widget when adding new tripal content

I am seeing a Notice when adding new content that comes from the sio__file widget.
To reproduce, add new content for something that has the sio__file field, e.g. a new analysis. On the form we see

Notice: Trying to get property 'analysis_id' of non-object in sio__file_widget->form() (line 33 of ...sites/all/modules/tripal_file/includes/TripalFields/sio__file/sio__file_widget.inc).

I propose pull request to fix this

File Format Checks

It has been requested to have a file format test for files. For example:

  • Provide some default file checking functions with hooks to support extension modules that can check file formats.
  • Default implementations: FASTA, FASTQ, GTF/GFF3 (simple checks). Be careful with this as it may bog down the web server for large files.

Warnings from schema__itemlocation.inc and schema__license_formatter.inc

The following two warnings appear on a file page:

Warning: A non-numeric value encountered in tripal_format_bytes() (line 153 of /var/www/2020-02-18/drupal-7.69/sites/all/modules/tripal/tripal/api/tripal.files.api.inc).

Notice: Undefined index: empty in theme_table() (line 2003 of /var/www/2020-02-18/drupal-7.69/includes/theme.inc).Notice: Undefined index: empty in theme_table() (line 2003 of /var/www/2020-02-18/drupal-7.69/includes/theme.inc).

The first warning appears when the file is a URL and the file size is a null string in schema__itemlocation.inc

The second notice appears because a value for ['empty'] is not defined in schema__license_formatter.inc

See pull request #12 for corrections for these issues.

File Naming Checks

It has been requested that there be a file naming format check that may include the following:

  • Standard suffix (fna, faa, fastq, bam)
  • Have instructions for how to name files.
  • Have a field for a new name that allows for automatic renaming of the file if the one uploaded doesn't match.
  • Have a hook to allow in-house extension modules to enforce a naming system.

Uploads via the itemLocation field

Currently, the itemLocation field only supports provide a remote file URL, or a local Tripal uploaded file. It does not have it's own uploader which it should provide.

If issue #4 were implemented then the uploader could place the file in the desired structure.

File Relationships

We are missing the ability to have relationships between files such that one could supercede the other or files could be grouped

sio__references field does not work for publications

The sio__references field displays a blank for a file linked to a publication

20210407_Journal-reference-bug

This occurs because the displayed value for the field comes from the name column of the relevant table, but the publication table uses title.

I'll submit a pull request, then it will look like
20210407_Journal-reference-fixed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.