-
Notifications
You must be signed in to change notification settings - Fork 0
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
update predict endpoint #21
Conversation
This reverts commit 888640c.
…/aodn/data-discovery-ai into update-predict-endpoint-refactor
remove unused python files and update readme
from data_discovery_ai.pipeline import pipeline | ||
|
||
|
||
def test(): | ||
item_description = """ | ||
Ecological and taxonomic surveys of hermatypic scleractinian corals were carried out at approximately 100 sites around Lord Howe Island. Sixty-six of these sites were located on reefs in the lagoon, which extends for two-thirds of the length of the island on the western side. Each survey site consisted of a section of reef surface, which appeared to be topographically and faunistically homogeneous. The dimensions of the sites surveyed were generally of the order of 20m by 20m. Where possible, sites were arranged contiguously along a band up the reef slope and across the flat. The cover of each species was graded on a five-point scale of percentage relative cover. Other site attributes recorded were depth (minimum and maximum corrected to datum), slope (estimated), substrate type, total estimated cover of soft coral and algae (macroscopic and encrusting coralline). Coral data from the lagoon and its reef (66 sites) were used to define a small number of site groups which characterize most of this area.Throughout the survey, corals of taxonomic interest or difficulty were collected, and an extensive photographic record was made to augment survey data. A collection of the full range of form of all coral species was made during the survey and an identified reference series was deposited in the Australian Museum.In addition, less detailed descriptive data pertaining to coral communities and topography were recorded on 12 reconnaissance transects, the authors recording changes seen while being towed behind a boat. | ||
The purpose of this study was to describe the corals of Lord Howe Island (the southernmost Indo-Pacific reef) at species and community level using methods that would allow differentiation of community types and allow comparisons with coral communities in other geographic locations. | ||
""" | ||
|
||
pipeline( | ||
isDataChanged=False, | ||
usePretrainedModel=False, | ||
description=item_description, | ||
selected_model="development", | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
test() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test doesn't have expectation? as this is assumed to be automated test, the test should have 3 stages: 1. prepare for what needs to be tested,2. executing 3. check for actual vs expected values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shaunahu as you created PR into development branch I created, I cannot hit the "request for change" button, can you please make this test a proper unit test case? Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you check the test, the proper command to do is poetry run pytest
you should resist the attention to do as with vanilla python where you normally try python somefile.py
@shaunahu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I am not start on unit tests for functions. So I simply made a test
function to try if the pipeline logic works. Can I remove this file from tests folder and work on the unit tests later? @vietnguyengit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @shaunahu you can simply add # TODO: .....
at the begining of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vietnguyengit Thank you. The TODO comment is added. I will work on the unit test from another branch (based on the main branch)
No description provided.