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

Release/v.1.0.0 #17

Merged
merged 105 commits into from
Jul 14, 2022
Merged

Release/v.1.0.0 #17

merged 105 commits into from
Jul 14, 2022

Conversation

FiniDG
Copy link
Collaborator

@FiniDG FiniDG commented May 3, 2022

Release first production version (V1.0.0)

Unverified commits:

  • ready for server deployment + readme update v.1.0.0
  • added except for fullgnomen upload error
  • small adjustments before release, mainly column ordering]

Verified commits:
Login functionality #6 + #8

  • Made the "data pages" only accessible to logged users and made Admin pages
  • added Logging

Cleanup layout #9

  • implemented the PEP8 rules
  • added and deleted some comments for clarity
  • removed the unused function get_all_fields()
  • reformatted HTML
  • removed unused navbar functions (with defaults that were inactivated)

Alissa connection instead of using importing Excels from "O-schijf" #10

  • adds a LastUpdatedOn in MongoDB with a default (for first time use script).
  • looks into Alissa based on LastUpdatedOn, to minimize the number of analyses to go trough and only update if necessary
  • checks if analysis is already in MongoDB and updates it if necessary
  • removed the old O-schijf (Excel) upload method
  • changed the logging to "INFO", because otherwise cluttered with Alissa HTTP attempts (and busy responses)
  • added config (empty in GitHub) for Alissa connection keys and login info

Layout changes to accommodate for the new Alissa method (replacing the Excel upload method) #13

  • changed layout of the variant, gene, all and patient pages.
  • changed the layout and information found on the "VUS" page.
  • added GnomAD link functionality. Now only available for SNP. Other SNVs will be added in the future after some Alissa updates.
  • removed "false" links that did not lead to a specific page or anything related to what was clicked on. At first everything was clickable, now only the functional.
  • formatting of code + removal of old commented code

Added restrictions for specific roles and updated account page #15

  • new roles ROLE_CLINIC and ROLE_DIAGGEN added
  • make restrictions for ROLE_CLINIC that they can never access the "Genes", "Variants" and "List All" pages
  • make restrictions for ROLE_CLINIC that they cannot link via another page to "Genes", "Variants" and "List All" pages
  • updated the "Account" page to let the user know about these new restrictions (you are always redirected to this page if access is denied)
  • restrictions also apply for users that are not ROLE_DIAGGEN or ROLE_ADMIN

Poof and others added 30 commits January 6, 2020 16:37
…every field has a value), patient_accession_no -> dn_no
updates progressbar to the new requirements.txt
- 1 place where patient_accession_no -> dn_no was missed
- 1 place where protein_(pnomen) -> pnomen was missed
- /aaa was changed to /all
- etc
add some explanation about datatables.js, as well as some more info about application structure
src/views/main.py Outdated Show resolved Hide resolved
Copy link

@ellendejong ellendejong left a comment

Choose a reason for hiding this comment

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

Happy to see this pull-request towards the first release of the VUSualizer, great!
I have a few general remarks.

external plugins to vendor

Robert explained to me that the vendor folder is often used for external software / plugins and should be ignored when reviewing the code.
He pointed out that src/static/js/jquery-3.4.1.min.js is also part of src/static/vendor/jquery/jquery-3.4.1.min.js.
It would help if all code developed by you/us/our team is part of static/js or static/css and all external code should go to static/vendor.

  • Could you have a look into the src/static/js and src/static/css folders and move files when it concerns external software?

import_data.py

Based on previous pull-requests, I get the idea that this script has grown over time quite a bit.

  • Personally, I would prefer to see more bite sized functions, and using return more often in import_data.py

For example:

  • retrieve_info_analysis_alissa
  • check_valid_analysis
  • retrieve_vus_gus_analysis
  • upload_to_mongodb

naming conventions

Some variables use a very generic and meaningless naming convention.

  • Maybe you could go over the code changes and consider if/where variable names can be improved?

CSS files

Some of the .css files are huge and I am worried about sustainability as well as readibility.
I would suggest to have a look into CSS coding style guides, for example https://google.github.io/styleguide/htmlcssguide.html
There are a few CSS lint extensions available. Please use these as well.
I know we discussed CSS previously and decided it was out of scope and to postpone it to next release.
I think it would improve a lot if you could add comments of the different sections/group of code in each .css file, for example src/static/css/sb-admin-2.css could have more comments.

  • Add comments to custom .css files describing code blocks.

Remaining notes

  • For each html in src/templates, I see a warning message: "No newline at end of file". Could you perform some HTML lint checking and see whether newline should be there?
  • I added a few comments related to flake8 output. Might be good to rerun flake8 just before merge to master branch.
  • [ ]

src/models.py Outdated Show resolved Hide resolved
src/models.py Outdated Show resolved Hide resolved
src/__init__.py Outdated Show resolved Hide resolved
src/views/auth.py Outdated Show resolved Hide resolved
src/views/admin_view.py Outdated Show resolved Hide resolved
src/views/main.py Outdated Show resolved Hide resolved
src/views/main.py Show resolved Hide resolved
@FiniDG FiniDG added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels May 30, 2022
@FiniDG FiniDG mentioned this pull request May 31, 2022
@FiniDG
Copy link
Collaborator Author

FiniDG commented May 31, 2022

I think I addressed most of your points. I await your next review and possible comments on my reply's
Things I did not address:

@FiniDG FiniDG requested a review from ellendejong May 31, 2022 16:13
extra/import_data.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/datatable.py Outdated Show resolved Hide resolved
@FiniDG FiniDG requested a review from ellendejong June 8, 2022 14:36
ellendejong
ellendejong previously approved these changes Jun 10, 2022
@FiniDG
Copy link
Collaborator Author

FiniDG commented Jun 19, 2022

We talked on teams about how to tackle these two functions in datatable.py. We agreed upon to make it one function.
After merging it into one function, we talked about how this could be further improved, because the initial code seems very similar.
After some research (added as comments to this function) the data imported in the function is quite different. The genes/variants/patients page mainly use the mongoDB collection index, while the other specifies specific columns and retrieve those entries from the mongoDB.

While trying to merge this (without having specific if field is "given" or "queried" loop), it became apparent that is would make the function more complicated and less "followable/unstandable". At least that is my opinion. you then have to loop based on specific mongo collection columns or else given columns, which desired a different way of looping.

Mongo entries require to query them using keys (and then appropriate extra quering if that key has multiple values in a dict or list)
Mongo collection entries are already queried.

Could you have another look at this proposed solution with extra comments and explanation? of course I would like to hear it if you see this differently.

@FiniDG FiniDG requested a review from ellendejong June 19, 2022 14:11
ellendejong
ellendejong previously approved these changes Jun 20, 2022
Copy link

@hwmvandeutekom hwmvandeutekom left a comment

Choose a reason for hiding this comment

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

Small changes, all approved

@FiniDG FiniDG merged commit 4e139bb into master Jul 14, 2022
@FiniDG FiniDG mentioned this pull request Jul 14, 2022
@FiniDG FiniDG deleted the release/v.1.0.0 branch July 14, 2022 10:08
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.

5 participants