Skip to content

Feat/myfiles imports collections#95

Merged
bea777515 merged 53 commits intomasterfrom
feat/myfiles_imports_collections
Feb 26, 2025
Merged

Feat/myfiles imports collections#95
bea777515 merged 53 commits intomasterfrom
feat/myfiles_imports_collections

Conversation

@bea777515
Copy link
Contributor

new : user "my files" with import addition ( import from user directory, recursive import )
collections : many chnages and projectset functionality (mapping , aggregated fields)
guests : create/update / rights to do necessary for collections

Copy link
Member

@grololo06 grololo06 left a comment

Choose a reason for hiding this comment

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

Au vu du volume de code, c'est principalement des remarques esthétiques.

Copy link
Member

Choose a reason for hiding this comment

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

Il faut changer la version de l'API non?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok fait

assert rsp.json() != ref_json
assert rsp.json()["comments"] == "New comment"
assert rsp.json()["visible"] is False
assert rsp.json()["access"]==AccessLevelEnum.PRIVATE.value
Copy link
Member

Choose a reason for hiding this comment

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

J'ai l'impression que le code n'est pas formatté avec black ici.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

black plante de temps en temps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

corrigé , j'ai enlevé les options

COMMIT;

BEGIN;
------------Running upgrade a9dd3c62b7b0->647290b6c4fc
Copy link
Member

Choose a reason for hiding this comment

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

C'est un upgrade dans le passé?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

la aussi : Running upgrade 565015aa8282 -> dac2d438e6b5

UPDATE projects SET access='2' WHERE visible=true AND license!='' AND LOWER(license) NOT LIKE 'copyright';

-- private when copyright or visible=False
UPDATE projects SET access='0' WHERE visible=false OR LOWER(license) LIKE 'copyright';
Copy link
Member

Choose a reason for hiding this comment

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

Un like sans "%" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oui mais pas utile ici

from tests.credentials import ADMIN_AUTH, USER_AUTH, ORDINARY_GUEST_GUEST_ID


# noinspection PyPackageRequirements
Copy link
Member

Choose a reason for hiding this comment

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

On peut virer cette ligne?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oui

py/DB/Project.py Outdated
rf_models_used = Column(VARCHAR)
cnn_network_id = Column(VARCHAR(50))

# to calculate concentration
Copy link
Member

Choose a reason for hiding this comment

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

Un petit mot sur le format en DB? C'est des lignes de texte?

def get_account_request_url(self) -> Optional[str]:
# TODO find a way to have multi request url ( list of identified url ???)
url = self.parser.get("SERVERURL").strip()
url = self.parser.get("SERVERURL" or "").strip()
Copy link
Member

Choose a reason for hiding this comment

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

Un "or" de 2 str je ne comprends pas. C'est pour rendre une default value? get("SERVERURL","") ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oui default value

- An administrator or user administrator or logged project manager can create a guest.
- An ordinary logged user cannot create another guest.

If back-end configuration for self-creation check is Google reCAPTCHA,
Copy link
Member

Choose a reason for hiding this comment

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

Pas de no_bot dans les paramètres?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

les guests ne peuvent s'inscrire que par un manager de projet ou un admin

py/main.py Outdated
"""
**Search for collections.**

Note: Only manageable collections are returned.
Copy link
Member

Choose a reason for hiding this comment

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

Un peu + d'explication sur 'manageable' serait bien. Par le user courant?

fields: Optional[str] = Query(
default="*default",
title="Fields",
description="Return the default fields (typically used in conjunction with an additional field list). For users list display purpose.",
Copy link
Member

Choose a reason for hiding this comment

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

C'est les mêmes champs que ceux pour trier un peu + haut?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

je devrais l'enlever pour l'instant , c'est pour ?fields=

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[?fields=**default ou ?fields=**summary ou fields=**all ou ?fields=**default,short_title ] (https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_fields.htm)

@bea777515 bea777515 merged commit 7ff284a into master Feb 26, 2025
2 checks passed
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.

2 participants