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

2-metadata-importation-doc #3

Closed
wants to merge 19 commits into from
Closed

2-metadata-importation-doc #3

wants to merge 19 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 1, 2024

Add: Documentation about the metadata importation

@ghost ghost requested a review from rngadam February 1, 2024 18:33
@ghost ghost self-assigned this Feb 1, 2024
@ghost ghost linked an issue Feb 1, 2024 that may be closed by this pull request
5 tasks
@ghost ghost added the documentation Improvements or additions to documentation label Feb 1, 2024
Copy link
Contributor

@rngadam rngadam left a comment

Choose a reason for hiding this comment

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

We discussed in person to be more specific with actors.

Probably want to identify more clearly BEFORE processes and AFTER processes as the sequence diagrams you're presenting seems to be applicable to current situation.

instead of putting yaml embedded in the doc, create an example structure and a pydantic validator (with auto-generated doc)

@ghost
Copy link
Author

ghost commented Feb 6, 2024

We discussed in person.

The documentation needs to be reworked to offer a better understanding of the upcoming process within Nachet.

@rngadam
Copy link
Contributor

rngadam commented Feb 6, 2024

should also add the github workflow checks as I see a couple basic issues that are detected by the checks:

https://github.com/ai-cfia/github-workflows

@MaxenceGui MaxenceGui added this to the M2 (2024 March) milestone Feb 7, 2024
@ghost ghost mentioned this pull request Feb 8, 2024
@ghost
Copy link
Author

ghost commented Feb 8, 2024

I showed my doc to @JolanThomassin and took his feedback. I've then added small description to the graphs.

@JolanThomassin
Copy link

Very good graphs 👍

@rngadam
Copy link
Contributor

rngadam commented Feb 16, 2024

should also add the github workflow checks as I see a couple basic issues that are detected by the checks:

https://github.com/ai-cfia/github-workflows

@FrancoisWerbrouck-CFIA I see a thumbs up but what we need is a reference to a new issue describing the work to be done to ensure the work is properly scheduled.


def is_yaml_file(file_path):
_, file_extension = os.path.splitext(file_path)
return file_extension.lower() == '.yaml'
Copy link
Contributor

Choose a reason for hiding this comment

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

yml is also a very common extension

more reliable to look at headers than extension to determine file types:

https://github.com/ahupp/python-magic

# Ask Data (I dont have access to the data url atm)
clientEmail=input("clientEmail: ")
clientExpertise= input("Expertise: ")
clientData=ClientData(clientEmail=clientEmail,clientExpertise=clientExpertise)
Copy link
Contributor

Choose a reason for hiding this comment

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

you're inconsistent in how you write your code. here the whitespaces before adn after the = signs (the rule is spaces except for parameters to fucntions). ruff extension should be able to give you feedback here.

yaml_data = yaml.safe_load(file)
try: # Validate and parse YAML data using Pydantic model
data = Index(**yaml_data)
except Exception as error: # Errtor raised by Pydantic Validator
Copy link
Contributor

Choose a reason for hiding this comment

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

Catch the specific exception, not every type of exception. do not want to hide other type of exceptions.

try: # Validate and parse YAML data using Pydantic model
data = Index(**yaml_data)
except Exception as error: # Errtor raised by Pydantic Validator
print(error)
Copy link
Contributor

Choose a reason for hiding this comment

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

should the program really continues without failing? typically should re-raise your custom exception to ensure the caller handles failure here.

Copy link
Contributor

@rngadam rngadam left a comment

Choose a reason for hiding this comment

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

Why have two different PR open?

nachetDb-1.0.0/db-creation.py Outdated Show resolved Hide resolved
nachetDb-1.0.0/db-creation.py Outdated Show resolved Hide resolved
nachetDb-1.0.0/deployment-mass-import.py Outdated Show resolved Hide resolved
@Francois-Werbrouck
Copy link
Contributor

The basics of all the documentation on the current metadata and the database is completed. There also is in place a basic structure to perform queries on the database and the setup of said database.

This encapsulate the core of the issue #2

@Francois-Werbrouck Francois-Werbrouck marked this pull request as ready for review March 14, 2024 14:41
metadata-doc.md Show resolved Hide resolved
@MaxenceGui MaxenceGui removed this from the M2 (2024 March) milestone Mar 22, 2024
@Francois-Werbrouck Francois-Werbrouck force-pushed the 2-metadata-importation-doc branch from cc5b5ba to d221bab Compare March 25, 2024 18:13
@rngadam
Copy link
Contributor

rngadam commented Mar 28, 2024

@Francois-Werbrouck my previous opened conversations are not acknowledged or commented?

@Francois-Werbrouck
Copy link
Contributor

Francois-Werbrouck commented Mar 28, 2024

@Francois-Werbrouck my previous opened conversations are not acknowledged or commented?

@rngadam The changes have already been made in other versions and then improved upon. (Index -> Session -> picture_set)

By having old PRs waiting for review with already alot of increment and changes upon the structure, I've applied the latest changes to the latest version now being: #13

Copy link
Contributor

@rngadam rngadam left a comment

Choose a reason for hiding this comment

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

I'll follow up in your newer PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Metadata Importation workflow
4 participants