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

'validlink' metric source #41

Open
lunarserge opened this issue Jul 29, 2024 · 0 comments
Open

'validlink' metric source #41

lunarserge opened this issue Jul 29, 2024 · 0 comments
Assignees

Comments

@lunarserge
Copy link
Owner

Implement a new metric source with 'validlink' name serving the purpose of tracking web page links for validity. This source shall be using a required field 'URL' that would provide a URL of a web page to track.

Both raw and normalized 'validlink' metric scores shall be computed as '0' if accessing the web page with this URL produces a 404 error, '1' otherwise.

Must produce the code for 'validlink' metric source, a usage example, a unit test and documentation update.

dbabokin added a commit that referenced this issue Jul 29, 2024
Related to #41

Implement the 'validlink' metric source to track web page link validity.

* **New Metric Source:**
  - Add `src/facere_sensum/connectors/validlink.py` to implement the 'validlink' metric source.
  - Implement `get_raw(metric)` to return 0 if URL produces a 404 error, 1 otherwise.
  - Implement `get_normalized(metric, raw)` to return the same value as `raw`.

* **Documentation:**
  - Update `doc/sources.rst` to include documentation for 'validlink' metric source.
  - Describe the raw and normalized score computation.
  - Include details about the required 'URL' field.

* **Usage Example:**
  - Add `examples/config_validlink.json` to provide a usage example for 'validlink' metric source.
  - Include a sample URL to track.

* **Unit Tests:**
  - Add `test/t_connectors/t_validlink.py` to include unit tests for 'validlink' metric source.
  - Test `get_raw(metric)` for both 404 and non-404 URLs.
  - Test `get_normalized(metric, raw)` for both 0 and 1 raw scores.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/lunarserge/facere-sensum/issues/41?shareId=XXXX-XXXX-XXXX-XXXX).

PS creating it as a draft PR to be able to run workflows. I also don't really understand that changes yet.
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

No branches or pull requests

2 participants