beat.web issueshttps://gitlab.idiap.ch/beat/beat.web/-/issues2021-01-18T15:00:52Zhttps://gitlab.idiap.ch/beat/beat.web/-/issues/585Add expiration date and alternative procedure for email accounts holding temp...2021-01-18T15:00:52ZFlavio TARSETTIAdd expiration date and alternative procedure for email accounts holding temporary URLsOn specific emails that target users accounts, temporary URLs were used to simplify the a user action.
However the expiration date of the temporay URL is not mentioned and an alternative procedure is not present to help the user realize...On specific emails that target users accounts, temporary URLs were used to simplify the a user action.
However the expiration date of the temporay URL is not mentioned and an alternative procedure is not present to help the user realize manually the required operation.Flavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.web/-/issues/577Cleanup yearly supervision command2022-03-04T09:39:15ZFlavio TARSETTICleanup yearly supervision commandThe yearly supervison command needs a rewrite to improve clarityThe yearly supervison command needs a rewrite to improve clarityCode cleanuphttps://gitlab.idiap.ch/beat/beat.web/-/issues/570Fix url prefix usage in yearly account revalidation command2020-09-28T13:36:45ZFlavio TARSETTIFix url prefix usage in yearly account revalidation commandThe command and message needs to be updated to fix the url prefix usage.The command and message needs to be updated to fix the url prefix usage.Django 3 migrationFlavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.web/-/issues/569Deletion of migration patch for current users to the supervision system2020-09-28T13:36:52ZFlavio TARSETTIDeletion of migration patch for current users to the supervision systemThe migration patch ecosystem that was used to warn current users of the new supervision system needs to be removed as it unused and it no longer makes sense to keep it in the repository.
The following migrations need to be adjusted to ...The migration patch ecosystem that was used to warn current users of the new supervision system needs to be removed as it unused and it no longer makes sense to keep it in the repository.
The following migrations need to be adjusted to accommodate with this.
The email generated for this need to be removed too.Django 3 migrationFlavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.web/-/issues/567Dead code removal2020-09-28T09:20:24ZSamuel GAISTDead code removalSome code in this repository is no longer used.
For example scripts/scheduler.py. It has been replaced with Django management commands to take advantage of the ZMQ communication system.
Therefore, everything that is unused should be re...Some code in this repository is no longer used.
For example scripts/scheduler.py. It has been replaced with Django management commands to take advantage of the ZMQ communication system.
Therefore, everything that is unused should be removed.Code cleanuphttps://gitlab.idiap.ch/beat/beat.web/-/issues/565Admin: Environments are not clearly shown2020-09-28T13:36:52ZFlavio TARSETTIAdmin: Environments are not clearly shownFor Environments: The environment languages displayed for each environment is unclear:
We have like
```
Language:
Python
Python
Python
Python
That's very confusing.
```For Environments: The environment languages displayed for each environment is unclear:
We have like
```
Language:
Python
Python
Python
Python
That's very confusing.
```Code cleanuphttps://gitlab.idiap.ch/beat/beat.web/-/issues/563Code deduplication2020-09-09T09:41:33ZSamuel GAISTCode deduplicationThere are several places in beat/beat.web> where there is code duplication.
For example all interactive management commands follow the same structure and re-implement the `get_input_data`. This is typically a case where there should be ...There are several places in beat/beat.web> where there is code duplication.
For example all interactive management commands follow the same structure and re-implement the `get_input_data`. This is typically a case where there should be a base class for that.
This would have avoided a mix of raw_input and input usage because of Python 2 VS Python 3 implementations.Code cleanuphttps://gitlab.idiap.ch/beat/beat.web/-/issues/562Pre-commit cleanup2020-09-11T15:54:25ZSamuel GAISTPre-commit cleanupThe current code base is pretty old and contains code that requires some cleanup.
The cleanup includes:
- Unused import
- Ordering of imports
- Unused code
- Possible coding issue
This list is not exhaustive.
The cleanup shall be done...The current code base is pretty old and contains code that requires some cleanup.
The cleanup includes:
- Unused import
- Ordering of imports
- Unused code
- Possible coding issue
This list is not exhaustive.
The cleanup shall be done using pre-commit hooks that include:
- black
- isort
- bandit
- flake8
And possibly others if relevant tools are found in the process.Code cleanupSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.web/-/issues/561Update dependencies to Django 32020-09-28T13:36:49ZSamuel GAISTUpdate dependencies to Django 3The version of Django currently used by the platform is outdated.
This issue tracks the update of the Django as well as its dependencies to a current and maintained version.The version of Django currently used by the platform is outdated.
This issue tracks the update of the Django as well as its dependencies to a current and maintained version.Django 3 migrationSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.web/-/issues/497Move to conda package2018-10-30T15:28:49ZSamuel GAISTMove to conda packageCurrently all beat.something dependencies are being refactored to become conda packages. It has already been done for [beat.backend.python](https://gitlab.idiap.ch/beat/beat.backend.python/), [beat.core](https://gitlab.idiap.ch/beat/beat...Currently all beat.something dependencies are being refactored to become conda packages. It has already been done for [beat.backend.python](https://gitlab.idiap.ch/beat/beat.backend.python/), [beat.core](https://gitlab.idiap.ch/beat/beat.core/) and [beat.cmdline](https://gitlab.idiap.ch/beat/beat.cmdline/). The only one missing is [beat.examples](https://gitlab.idiap.ch/beat/beat.examples/).
beat.web poses a different challenge has it requires several dependencies that are not directly available through conda's default channel or Idiaps software channel for bob. The main challenge comes from the fact that `conda build` doesn't support dependencies from PyPI directly. The current recommend practice is to use `conda skeleton` to create recipes for PyPI packages and use them to feed `conda build`
Here is a list of the dependencies that can be found in several places in `beat.web` like `setup.py` and `buildout.cfg` with their requirements and conda channel they can be found in if any:
| package name | requirements | channel | remarques |
|--------------|--------------|---------|-----------|
|beat.core||idiap|
|alabaster||pkgs/main,pkgs/free|
|babel||pkgs/main,pkgs/free|
|backports.shutil-get-terminal-size||ODSP-TEST|
|colorlog||software/bob/conda|
|coverage||pkgs/main,pkgs/free|
|cycler||pkgs/main,pkgs/free|
|decorator||pkgs/main,pkgs/free|
|django|>=1.11,<2.0|defaults|
|django-activity-stream|>=0.6.5||too old|
|django-rest-swagger|>2.1||too old|
|django-guardian|>=1.3|conda-forge|
|djangorestframework|>3.7|conda-forge|
|django-jsonfield|>=1.0.1||too old|
|django-jsonfield-compat||None|
|docopt||pkgs/free|
|docutils||pkgs/free|
|funcsigs||pkgs/main,pkgs/free|
|functools32||pkgs/main,pkgs/free|
|graphviz||pkgs/main,pkgs/free|
|ipdb||software/bob/conda|
|ipython||pkgs/main,pkgs/free|
|ipython-genutils||GlaxoSmithKline|linux only|
|imagesize||pkgs/main,pkgs/free|
|Jinja2||pkgs/main,pkgs/free|
|jsonschema||pkgs/main,pkgs/free|
|MarkupSafe||pkgs/main,pkgs/free|
|matplotlib||pkgs/main,pkgs/free|
|mock||pkgs/main,pkgs/free|
|nose||pkgs/main,pkgs/free|
|numpy||pkgs/main,pkgs/free|
|oset||software/bob/conda|
|pathlib2||pkgs/main,pkgs/free|
|pbr||pkgs/main,pkgs/free|
|pexpect||pkgs/main,pkgs/free|
|pickleshare||pkgs/main,pkgs/free|
|pillow||pkgs/main,pkgs/free|
|pip||pkgs/main,pkgs/free|
|psutil||pkgs/main,pkgs/free|
|ptyprocess||pkgs/main,pkgs/free|
|psycopg2||pkgs/main,pkgs/free|
|Pygments||pkgs/main,pkgs/free|
|pyparsing||pkgs/main,pkgs/free|
|python-archive||auto|linux-only|
|python-dateutil||pkgs/main,pkgs/free|
|pytz||pkgs/main,pkgs/free|
|PyYAML||pkgs/main,pkgs/free|
|pyzmq||pkgs/main,pkgs/free|
|simplegeneric||pkgs/main,pkgs/free|
|simplejson||pkgs/main,pkgs/free|
|six||pkgs/main,pkgs/free|
|snowballstemmer||pkgs/main,pkgs/free|
|sphinx||pkgs/main,pkgs/free|
|sphinxcontrib-ansi|||None|
|sphinxcontrib-httpdomain||agoodman|
|sphinxcontrib-mscgen|||None|
|sphinxcontrib-programoutput||software/bob/conda|
|sphinx-rtd-theme|||None|
|termcolor||pkgs/main,pkgs/free|
|traitlets||pkgs/main,pkgs/free|
|uwsgi||conda-forge|
One question that can be asked here is: do we still need all of them ?
This will also fix #462 Gitlab CI IntegrationSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.web/-/issues/469Upgrade angular dependency (and possibly others as well)2018-10-31T08:20:05ZJaden DIEFENBAUGHUpgrade angular dependency (and possibly others as well)Beyond maintainence (see Angular's [changelog](https://github.com/angular/angular.js/blob/master/CHANGELOG.md) which has hundreds of bug fixes since 1.4.5), there's a few reasons I'd like to upgrade (in order of concreteness):
1. Custom ...Beyond maintainence (see Angular's [changelog](https://github.com/angular/angular.js/blob/master/CHANGELOG.md) which has hundreds of bug fixes since 1.4.5), there's a few reasons I'd like to upgrade (in order of concreteness):
1. Custom comparators for ordering elements (e.g. multi-column sorting, see jdiefenbaugh/beat.web#22)
2. Performance improvements which would help smooth the UX
3. Lets us upgrade jQuery to v3
4. (ties in with 3) lets us track the current development/maintenance of Angular 1 & its ecosystem
As far as breaking changes go - there's not much, since we're just using standard Angular features:
1. There might be an issue with [`$sce`](https://docs.angularjs.org/api/ng/service/$sce), Angular's utility for sanitizing strings before using them in things like resource URLs or dynamically-compiled HTML. Angular may require using `$sce` more often in our code, if we use complex `$compile` calls or use dynamic resource `href`s in our templates.
2. Angular's custom `success` and `error` methods for calls to `$http` have been deprecated and then removed. They now recommend using the official JS solution, `then` and `catch`, which have huge browser support & more features. There aren't many instances we need to change, either. A quick grep shows:
```
beat/web/ui/static/ui/js/reportdialog.js
153: .success(function (reportData)
160: .error(function (error)
250: .success(function (reportData)
257: .error(function (error)
273: .success(function (reportData)
280: .error(function (error)
394: .success(function (reportData)
401: .error(function (error)
beat/web/plotters/static/plotters/app/controllers/plotterparameterController.js
64: .success(function (plottersData)
72: .error(function (error)
83: .success(function (plotterparameterData)
124: .error(function (error)
beat/web/plotters/static/plotters/app/directives/plotterparameterItemView.js
201: .success(function (returnedData)
207: .error(function (error)
252: .success(function (returnedData)
257: .error(function (error)
314: .success(function (returnedData)
319: .error(function (error)
381: .success(function (returnedData)
386: .error(function (error)
beat/web/reports/static/reports/app/directives/saveReportItems.js
35: .error(function (error){
```2017-05-19https://gitlab.idiap.ch/beat/beat.web/-/issues/464Chrome headless for more stable & CI-supported E2E testing2017-08-06T16:44:50ZJaden DIEFENBAUGHChrome headless for more stable & CI-supported E2E testingE2E testing currently uses a locally-installed browser and cannot be ran on a headless CI. Using a locally-installed browser is:
1. annoying
2. resource-intensive
3. not feasible on CI
Chrome has recently started to support running the ...E2E testing currently uses a locally-installed browser and cannot be ran on a headless CI. Using a locally-installed browser is:
1. annoying
2. resource-intensive
3. not feasible on CI
Chrome has recently started to support running the browser headlessly, which will fix these issues. However, it's not very well supported yet (still Alpha~Beta stage). This is a tracking issue for widespread support.
See:
- https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
- https://www.chromestatus.com/feature/5678767817097216https://gitlab.idiap.ch/beat/beat.web/-/issues/462setuptools' `ez_setup.py` is deprecated2019-01-10T09:07:04ZJaden DIEFENBAUGHsetuptools' `ez_setup.py` is deprecatedThe warning message upon running buildout:
```
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/...The warning message upon running buildout:
```
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
```https://gitlab.idiap.ch/beat/beat.web/-/issues/458Refactor server communication & request state handling to be DRY2017-08-06T16:44:51ZJaden DIEFENBAUGHRefactor server communication & request state handling to be DRYThere are at least several hundred different AJAX code blocks in the JS. Sometimes, Angular Factories help abstract the actual AJAX handling (see: report app). Sometimes, every request is handwritten (see: experiments app). Many requests...There are at least several hundred different AJAX code blocks in the JS. Sometimes, Angular Factories help abstract the actual AJAX handling (see: report app). Sometimes, every request is handwritten (see: experiments app). Many requests need to be set up beforehand. One common setting is sending the CSRF token:
```js
$.ajaxSetup({
beforeSend: function(xhr, settings) {
var csrftoken = $.cookie('csrftoken');
xhr.setRequestHeader('X-CSRFToken', csrftoken);
}
});
```
Requests may also handle certain error codes:
```js
$.ajax({
//....
statusCode: {
404: function(data, status, message) {
container.textContent = message + ' (' + data.status + ')';
$(container).addClass('error');
$(container).removeClass('progress');
},
500: function(data, status, message) {
container.textContent = message + ' (' + data.status + ')';
$(container).addClass('error');
$(container).removeClass('progress');
},
}
//....
```
Since many requests most likely have similar settings/error handling, refactoring the actual requesting functionality (into it's own Angular Service) would make requests more consistent and DRY. It would also help separate the actual AJAX from the handling of a successful request.https://gitlab.idiap.ch/beat/beat.web/-/issues/457Refactor heavy manual DOM manipulation into directives/templates/controllers2017-08-06T16:44:51ZJaden DIEFENBAUGHRefactor heavy manual DOM manipulation into directives/templates/controllersMany apps have JS files that generate & manage complex DOM elements (such as popups/dialogs, settings, and button handling) that aren't plugged in to the Angular system. For example, all of the [Experiments app's JS files](https://gitlab...Many apps have JS files that generate & manage complex DOM elements (such as popups/dialogs, settings, and button handling) that aren't plugged in to the Angular system. For example, all of the [Experiments app's JS files](https://gitlab.idiap.ch/beat/beat.web/tree/master/beat/web/experiments/static/experiments/js) manipulate the DOM.
A few issues that suggest we refactor this:
- No separation between the HTML & JS
- No separation between background processing/AJAX & DOM manipulation
- No clear patterns for extending/changing/reusing these DOM manipulations (no modularity)
- Very little comments/documentation
Angular Directives [were designed to manage these heavy DOM manipulations](https://code.angularjs.org/1.4.5/docs/guide/directive).https://gitlab.idiap.ch/beat/beat.web/-/issues/456Refactor globals/"namespaces" in JS to Angular entities2017-08-06T16:44:51ZJaden DIEFENBAUGHRefactor globals/"namespaces" in JS to Angular entitiesFor reasons why global variables are bad, people commonly reference the ["GlobalVariablesAreBad" article](http://wiki.c2.com/?GlobalVariablesAreBad). Additionally, Angular already provides solutions to homebrew namespaces, so they don't ...For reasons why global variables are bad, people commonly reference the ["GlobalVariablesAreBad" article](http://wiki.c2.com/?GlobalVariablesAreBad). Additionally, Angular already provides solutions to homebrew namespaces, so they don't have to be used.
I was going to add example files, but it's so widespread, just look in any of the JS for the experiments/toolchains/etc. apps. A common manifestation of the globals:
```js
// Declaration of our namespaces
if (beat === undefined)
var beat = {}
if (beat.toolchains === undefined)
beat.toolchains = {}
if (beat.toolchains.dialogs === undefined)
beat.toolchains.dialogs = {}
```
And later in the file, fields are assigned to these globals.
A better approach may be to instead use Angular [Services](https://code.angularjs.org/1.4.5/docs/guide/services) which support DI (dependency injection) and are designed to support heavy processing/data functionality.https://gitlab.idiap.ch/beat/beat.web/-/issues/455Documentation/comments of the frontend2017-08-06T16:44:51ZJaden DIEFENBAUGHDocumentation/comments of the frontendThere is basically no documentation (either in-line or in separate documents) of the nearly **20,000LOC** of JS.
This leads to developers having to go as far as reverse-engineering the application whenever they are not familiar with a c...There is basically no documentation (either in-line or in separate documents) of the nearly **20,000LOC** of JS.
This leads to developers having to go as far as reverse-engineering the application whenever they are not familiar with a certain piece of functionality, which increases the overhead of starting work on new code and slows onboarding new developers.https://gitlab.idiap.ch/beat/beat.web/-/issues/453Migrate from deprecated `replace: true` in directives2017-08-06T16:44:51ZJaden DIEFENBAUGHMigrate from deprecated `replace: true` in directivesAs of [Angular 1.3.0](https://code.angularjs.org/1.3.0/docs/api/ng/service/$compile) the `replace` attribute in directive definitions is deprecated. We are using it in at least the directives `tableDynamic` & `myReportInfo` in the report...As of [Angular 1.3.0](https://code.angularjs.org/1.3.0/docs/api/ng/service/$compile) the `replace` attribute in directive definitions is deprecated. We are using it in at least the directives `tableDynamic` & `myReportInfo` in the reports app.https://gitlab.idiap.ch/beat/beat.web/-/issues/452Migrate from deprecated `$http .success` & `$http .error` to `$http .then`2017-08-06T16:44:51ZJaden DIEFENBAUGHMigrate from deprecated `$http .success` & `$http .error` to `$http .then`While it's officially deprecated in [v1.5.0](https://code.angularjs.org/1.5.0/docs/api/ng/service/$http#deprecation-notice), the alternative is already implemented in v1.4.5.
`.success` & `.error` don't allow chaining as normal Promise ...While it's officially deprecated in [v1.5.0](https://code.angularjs.org/1.5.0/docs/api/ng/service/$http#deprecation-notice), the alternative is already implemented in v1.4.5.
`.success` & `.error` don't allow chaining as normal Promise handling (`.then`) do.https://gitlab.idiap.ch/beat/beat.web/-/issues/451More descriptive names for Angular entities2017-08-06T16:44:51ZJaden DIEFENBAUGHMore descriptive names for Angular entitiesA couple targets off the top of my head (more to be added):
- [ ] [`theColumn` directive](https://gitlab.idiap.ch/beat/beat.web/blob/67ca8af8e123d03debc1d6b89cf4b0751ddbb4b5/beat/web/reports/static/reports/app/directives/reportItemView.j...A couple targets off the top of my head (more to be added):
- [ ] [`theColumn` directive](https://gitlab.idiap.ch/beat/beat.web/blob/67ca8af8e123d03debc1d6b89cf4b0751ddbb4b5/beat/web/reports/static/reports/app/directives/reportItemView.js#L1117)
- [ ] [`item` directive](https://gitlab.idiap.ch/beat/beat.web/blob/67ca8af8e123d03debc1d6b89cf4b0751ddbb4b5/beat/web/reports/static/reports/app/directives/reportItemView.js#L1072)