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

update predict endpoint #21

Merged
merged 19 commits into from
Nov 11, 2024
Merged

update predict endpoint #21

merged 19 commits into from
Nov 11, 2024

Conversation

vietnguyengit
Copy link
Collaborator

No description provided.

Comment on lines +1 to +19
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()
Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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

Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

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)

@shaunahu shaunahu merged commit d0a5939 into main Nov 11, 2024
1 check passed
@shaunahu shaunahu deleted the update-predict-endpoint branch November 11, 2024 04:10
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