Skip to content

Add URL validation script - #57

Open
nee1k wants to merge 13 commits into
mainfrom
feature/url-validation-script
Open

Add URL validation script#57
nee1k wants to merge 13 commits into
mainfrom
feature/url-validation-script

Conversation

@nee1k

@nee1k nee1k commented Aug 17, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

nee1k added 13 commits August 17, 2025 10:05
- Add device existence check in database.py
- Add check_device_exists method in neo4j_ingester.py
- Implement POST /register_device endpoint in server.py
- Add comprehensive tests for device registration
- Update README.md with new endpoint documentation
- Create GitHub issue template for the feature

The endpoint allows devices to register with a unique device_id
and returns success response. Handles validation and duplicate
device_id conflicts appropriately.
- Add user existence check in database.py
- Add insert_user method in database.py
- Add check_user_exists and add_user methods in neo4j_ingester.py
- Implement POST /register_user endpoint in server.py
- Add comprehensive tests for user registration
- Update README.md with new endpoint documentation

The endpoint allows users to register with a unique user_id
and returns success response. Handles validation and duplicate
user_id conflicts appropriately. Supports optional fields like
email, full_name, organization, department, location, and orcid.
Resolved conflicts by keeping both /register_device and /register_user endpoints:
- README.md: Added both endpoints to API table
- database.py: Kept both device and user methods
- neo4j_ingester.py: Kept both device and user methods
- server.py: Kept both device and user endpoints
- tests: Kept both device and user test cases

Both endpoints now work together seamlessly.
- Add get_all_models_with_locations() method to retrieve models with URLs
- Add update_model_card_orphan_status() method to update is_orphan field
- Create validate_urls.py script with URL validation logic
- Add comprehensive tests for URL validation functionality
- Update MCIngester with wrapper methods for URL validation
- Script validates URLs and marks invalid models as orphan (is_orphan=true)
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.

1 participant