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

User tracking #3419

Closed
wants to merge 26 commits into from
Closed

User tracking #3419

wants to merge 26 commits into from

Commits on Mar 21, 2024

  1. make help email address configurable instead of hard coding (qiita-sp…

    …ots#3384)
    
    * Update CHANGELOG.md
    
    * make help email address configurable instead of hard coding
    
    * codestyle
    
    * don't default with email addresses but raise Errors
    
    * set mail addresses in example configuration, which is also used for
    testing
    
    * addessing Antonios issues + switch to a non deprecated read fct.
    
    * updating dummy help email address in tests
    
    ---------
    
    Co-authored-by: Antonio Gonzalez <[email protected]>
    sjanssen2 and antgonza authored Mar 21, 2024
    Configuration menu
    Copy the full SHA
    d743a81 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. PR: Resource allocation plots in util.py (qiita-spots#3382)

    * Initial commmit to resource allocation plots
    
    * Update to util.py and tests
    
    * Update test_util.py
    
    * revert 072023.ipynb
    
    * Debug test_util
    
    * testing plot based on № failures
    
    * Addressed Antonio's comments
    
    * Updates according to @charles-cowart comments
    
    * define functions as const @charles-cowart
    Gossty authored Mar 27, 2024
    Configuration menu
    Copy the full SHA
    8c91945 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. add trailing/separating whitespace (qiita-spots#3385)

    * Update CHANGELOG.md
    
    * add trailing/separating whitespace
    
    got the error `Error running SQL: SYNTAX_ERROR. MSG: trailing junk after numeric literal at or near "1A" LINE 6: WHERE study_id = 1AND artifact_type = '... ^ ` on my test instance
    
    log says
    ```
    ==> bcf_qiita/Logs/qiita_21174.log <==
    [E 240322 13:35:00 web:1669] Uncaught exception GET /study/description/1 (127.0.0.1)
        HTTPServerRequest(protocol='https', host='qiita.jlab.bio', method='GET', uri='/study/description/1', version='HTTP/1.0', remote_ip='127.0.0.1')
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 256, in _execute
            cur.execute(sql, sql_args)
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/psycopg2/extras.py", line 146, in execute
            return super().execute(query, vars)
        psycopg2.errors.SyntaxError: trailing junk after numeric literal at or near "1A"
        LINE 6:                      WHERE study_id = 1AND artifact_type = '...
                                                      ^
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 199, in _raise_execution_error
            raise ValueError(
        ValueError: Error running SQL: SYNTAX_ERROR. MSG: trailing junk after numeric literal at or near "1A"
        LINE 6:                      WHERE study_id = 1AND artifact_type = '...
                                                      ^
        
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/tornado/web.py", line 1590, in _execute
            result = method(*self.path_args, **self.path_kwargs)
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/tornado/web.py", line 3006, in wrapper
            return method(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_pet/handlers/study_handlers/base.py", line 28, in get
            study_info = study_get_req(study, self.current_user.id)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_pet/handlers/api_proxy/studies.py", line 120, in study_get_req
            study.artifacts(artifact_type='BIOM')) != 0
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/study.py", line 1108, in artifacts
            for aid in qdb.sql_connection.TRN.execute_fetchflatten()]
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 49, in wrapper
            return func(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 389, in execute_fetchflatten
            return list(chain.from_iterable(self.execute()[idx]))
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 49, in wrapper
            return func(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 313, in execute
            return self._execute()
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 260, in _execute
            self._raise_execution_error(sql, sql_args, e)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 205, in _raise_execution_error
            raise ValueError("Error running SQL query: %s" % str(error))
        ValueError: Error running SQL query: Error running SQL: SYNTAX_ERROR. MSG: trailing junk after numeric literal at or near "1A"
        LINE 6:                      WHERE study_id = 1AND artifact_type = '...
                                                      ^
        
        
    [E 240322 13:35:00 web:2161] 500 GET /study/description/1 (127.0.0.1) 159.63ms
    [E 240322 13:35:00 web:1114] Uncaught exception in write_error
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 256, in _execute
            cur.execute(sql, sql_args)
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/psycopg2/extras.py", line 146, in execute
            return super().execute(query, vars)
        psycopg2.errors.SyntaxError: trailing junk after numeric literal at or near "1A"
        LINE 6:                      WHERE study_id = 1AND artifact_type = '...
                                                      ^
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 199, in _raise_execution_error
            raise ValueError(
        ValueError: Error running SQL: SYNTAX_ERROR. MSG: trailing junk after numeric literal at or near "1A"
        LINE 6:                      WHERE study_id = 1AND artifact_type = '...
                                                      ^
        
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/tornado/web.py", line 1590, in _execute
            result = method(*self.path_args, **self.path_kwargs)
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/tornado/web.py", line 3006, in wrapper
            return method(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_pet/handlers/study_handlers/base.py", line 28, in get
            study_info = study_get_req(study, self.current_user.id)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_pet/handlers/api_proxy/studies.py", line 120, in study_get_req
            study.artifacts(artifact_type='BIOM')) != 0
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/study.py", line 1108, in artifacts
            for aid in qdb.sql_connection.TRN.execute_fetchflatten()]
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 49, in wrapper
            return func(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 389, in execute_fetchflatten
            return list(chain.from_iterable(self.execute()[idx]))
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 49, in wrapper
            return func(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 313, in execute
            return self._execute()
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 260, in _execute
            self._raise_execution_error(sql, sql_args, e)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 205, in _raise_execution_error
            raise ValueError("Error running SQL query: %s" % str(error))
        ValueError: Error running SQL query: Error running SQL: SYNTAX_ERROR. MSG: trailing junk after numeric literal at or near "1A"
        LINE 6:                      WHERE study_id = 1AND artifact_type = '...
                                                      ^
        
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 256, in _execute
            cur.execute(sql, sql_args)
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/psycopg2/extras.py", line 146, in execute
            return super().execute(query, vars)
        psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pk_logging"
        DETAIL:  Key (logging_id)=(294) already exists.
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 199, in _raise_execution_error
            raise ValueError(
        ValueError: Error running SQL: UNIQUE_VIOLATION. MSG: duplicate key value violates unique constraint "pk_logging"
        DETAIL:  Key (logging_id)=(294) already exists.
        
        
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/homes/sjanssen/bcf_qiita/envs/qiita/lib/python3.9/site-packages/tornado/web.py", line 1112, in send_error
            self.write_error(status_code, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_pet/handlers/base_handlers.py", line 69, in write_error
            LogEntry.create(
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/logger.py", line 103, in create
            return cls(qdb.sql_connection.TRN.execute_fetchlast())
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 49, in wrapper
            return func(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 336, in execute_fetchlast
            return self.execute()[-1][0][0]
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 49, in wrapper
            return func(self, *args, **kwargs)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 313, in execute
            return self._execute()
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 260, in _execute
            self._raise_execution_error(sql, sql_args, e)
          File "/homes/sjanssen/bcf_qiita/qiita-spots/qiita/qiita_db/sql_connection.py", line 205, in _raise_execution_error
            raise ValueError("Error running SQL query: %s" % str(error))
        ValueError: Error running SQL query: Error running SQL: UNIQUE_VIOLATION. MSG: duplicate key value violates unique constraint "pk_logging"
        DETAIL:  Key (logging_id)=(294) already exists.
    ```
    
    ---------
    
    Co-authored-by: Antonio Gonzalez <[email protected]>
    sjanssen2 and antgonza authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    667a22a View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Config statsmap lat long (qiita-spots#3388)

    * Update CHANGELOG.md
    
    * let user configure the center point for the stats world map
    
    ---------
    
    Co-authored-by: Antonio Gonzalez <[email protected]>
    sjanssen2 and antgonza authored Apr 4, 2024
    Configuration menu
    Copy the full SHA
    83476d5 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. qiita.slurm_resource_allocations (qiita-spots#3391)

    * Update CHANGELOG.md
    
    * add db changes including fix qiita-spots#3368
    antgonza authored Apr 16, 2024
    Configuration menu
    Copy the full SHA
    8660043 View commit details
    Browse the repository at this point in the history
  2. Pac bio smrt new instruments (qiita-spots#3390)

    * Update CHANGELOG.md
    
    * PacBio_SMRT new instruments
    antgonza authored Apr 16, 2024
    Configuration menu
    Copy the full SHA
    fe50614 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Adding current human filtering flag to prep_template (qiita-spots#3395)

    * Update CHANGELOG.md
    
    * adding current_human_filtering to PrepTemplate
    antgonza authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    28d7191 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. Fix 3352 (qiita-spots#3397)

    * Update CHANGELOG.md
    
    * fix qiita-spots#3352
    antgonza authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    8b833d3 View commit details
    Browse the repository at this point in the history
  2. Fix 3387 (qiita-spots#3398)

    * Update CHANGELOG.md
    
    * fix qiita-spots#3387
    antgonza authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    b4a7caf View commit details
    Browse the repository at this point in the history
  3. Fix 3376 (qiita-spots#3399)

    * Update CHANGELOG.md
    
    * fix qiita-spots#3376
    antgonza authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    68fa3e2 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. Update qiita prep temp06182020 (qiita-spots#3400)

    * Update CHANGELOG.md
    
    * updating QiitaPrepTemp06182020.xlsx
    antgonza authored Apr 26, 2024
    Configuration menu
    Copy the full SHA
    6d27147 View commit details
    Browse the repository at this point in the history
  2. add reprocess_job_id to PrepTemplate (qiita-spots#3396)

    * Update CHANGELOG.md
    
    * add reprocess_job_id to PrepTemplate
    antgonza authored Apr 26, 2024
    Configuration menu
    Copy the full SHA
    748126a View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Clean plugins (qiita-spots#3403)

    * Update CHANGELOG.md
    
    * clean plugins
    
    * patch 54.sql
    
    * fix Internal Qiita jobs
    
    * sample_template.generate_files
    
    * rm extra filepath
    
    * qiita.filepath_filepath_id_seq
    
    * basedir_len
    
    * basedir_len * 2
    
    * basedir_len * 3
    
    * get_db_files_base_dir
    
    * address @charles-cowart comment
    antgonza authored May 7, 2024
    Configuration menu
    Copy the full SHA
    7b9cb33 View commit details
    Browse the repository at this point in the history
  2. adding test_db_sql (qiita-spots#3405)

    * Update CHANGELOG.md
    
    * clean plugins
    
    * patch 54.sql
    
    * fix Internal Qiita jobs
    
    * sample_template.generate_files
    
    * rm extra filepath
    
    * qiita.filepath_filepath_id_seq
    
    * basedir_len
    
    * basedir_len * 2
    
    * basedir_len * 3
    
    * get_db_files_base_dir
    
    * adding test_db_sql
    
    * missing `
    
    * echo $QIITA_CONFIG_FP
    
    * -p 32768
    
    * -l localhost
    
    * pgport
    
    * testing 1
    
    * testing 2
    
    * localhost
    
    * testing 3
    
    * -h localhost
    
    * -W
    
    * PGPASSWORD
    
    * doc
    
    * flake8
    
    * mods after chatting with @charles-cowart
    
    * exit 1
    
    * "$row_counts"
    
    * #
    
    * `echo $row_counts`
    
    * full tests
    antgonza authored May 7, 2024
    Configuration menu
    Copy the full SHA
    7c7600e View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. ext documentation nginx mod_zip (qiita-spots#3409)

    * Update CHANGELOG.md
    
    * Note about missing mod_zip
    
    As I wasted too much time in figuring out what's wrong with anonymous link downloads, I thought it would be handy to summarize my lessons learned for others
    
    * add git
    
    "secretly" adding git as an Ubuntu package to be installed in a fresh system. Git later referred to for obtaining the Qiita sources.
    
    ---------
    
    Co-authored-by: Antonio Gonzalez <[email protected]>
    sjanssen2 and antgonza authored May 16, 2024
    Configuration menu
    Copy the full SHA
    6ac8ee8 View commit details
    Browse the repository at this point in the history
  2. Fix 3381 (qiita-spots#3408)

    * Update CHANGELOG.md
    
    * fix qiita-spots#3381
    
    * fallback
    
    * rm qiimp from test
    antgonza authored May 16, 2024
    Configuration menu
    Copy the full SHA
    c0cdb4b View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Test util db (qiita-spots#3406)

    * Update to DB qiita.slurm_resource_allocations
    
    * connected tests to database
    
    * Update util.py
    
    * debugging changes to test
    
    * Update test_util.py
    
    * Update test_util.py
    
    * Tests update
    
    * Update test_meta_util.py
    
    * Updates to @antgonza comments
    
    * Updates to @charles-cowart comments
    Gossty authored May 21, 2024
    Configuration menu
    Copy the full SHA
    55e460e View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Fix msg admin none (qiita-spots#3410)

    * Update CHANGELOG.md
    
    * fix admin processing_job msg None
    
    * update keys
    antgonza authored Jun 4, 2024
    Configuration menu
    Copy the full SHA
    1ffd9a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffe1ec8 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Add social handles (qiita-spots#3412)

    * user profile can now also store social handles from google scholar, ORCID and ResearchGate
    
    * set DEFAULT NULL to new qiita.qiita_user columns
    
    * extending existing test
    
    * extending tests
    
    * add tests for validator functions for WTform StringFields
    
    * operate on str instead of field.data
    sjanssen2 authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    9de3f38 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. qiita.slurm_resource_allocations insertion (qiita-spots#3415)

    * Update to DB qiita.slurm_resource_allocations
    
    * connected tests to database
    
    * Update util.py
    
    * debugging changes to test
    
    * Update test_util.py
    
    * Update test_util.py
    
    * Tests update
    
    * Update test_meta_util.py
    
    * Updates to @antgonza comments
    
    * Updates to @charles-cowart comments
    
    * Resource Allocation Insertion into DB
    
    - Added functionality of updating resource allocation data into db in qiita_db/util.py
    - Added tests for the added functionality in qiita_db/test/test_util.py
    - Moved MaxRSS_helper function from qiita_core/util.py to qiita_db/util.py.
    - Moved MaxRSS_helper test from qiita_core/tests/test_util.py to qiita_db/test/test_util.py
    
    * Debug Memory Model
    
    * Update test_util.py
    
    * Added columns to slurm_resource_allocation table
    
    * Update test_processing_job.py
    
    * Update test_util.py
    
    * Automatic date adjustment in utill.py
    
    * Update util.py
    Gossty authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    cca6de7 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. log user creation timestamp (qiita-spots#3416)

    * use SQL's NOW() fct to log creation of a new user account (validated or not).
    
    * at -> on
    
    * add new col
    
    * use patch for DB changes
    
    * forgot to remove addition of comment here
    
    * moving changes to patch 92
    
    * move adding date from populate_test_db.sql to here
    
    * revert changes, see patch
    
    * adding table name :-/
    
    * order in DB changed due to UPDATE of creation_timestamp for user [email protected]
    
    * fix test
    sjanssen2 authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    8b3f717 View commit details
    Browse the repository at this point in the history
  2. Purge non-verified user (qiita-spots#3417)

    * use SQL's NOW() fct to log creation of a new user account (validated or not).
    
    * at -> on
    
    * add new col
    
    * adding a new page for admins to easily list all users not yet validated and offer means to delete those
    
    * flake8
    
    * fix tests
    
    * move DB changes to patch
    
    * revert file
    
    * no change here
    
    * execute merge manually
    
    * moving data insertion to test_db_sql patch
    
    * account for additional test users
    sjanssen2 authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    fd2d9b7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    751e559 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Configuration menu
    Copy the full SHA
    0f83916 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89d34b6 View commit details
    Browse the repository at this point in the history