Skip to content

Commit 8b1aa35

Browse files
committed
Address PR review comments for examples README
Changes based on review feedback: 1. Fix setup requirements - make sync mandatory, config optional (displays config, doesn't configure) 2. Add sync step to download backend data before running examples 3. Update expected outputs to indicate they may vary based on enabled backends 4. Fix configuration section to correctly describe precedence (local .aletheia-probe first) 5. Remove Support section as requested 6. Add reference to main configuration documentation All review comments addressed and replied to on GitHub. [AI-assisted]
1 parent ae5de3e commit 8b1aa35

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

examples/README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ Before running the examples, ensure you have:
1111
pip install aletheia-probe
1212
```
1313

14-
2. **Configured the tool:**
14+
2. **Synced backend data:**
15+
```bash
16+
aletheia-probe sync
17+
```
18+
This downloads the predatory journal lists and other data sources needed for assessment.
19+
20+
3. **(Optional) View configuration:**
1521
```bash
1622
aletheia-probe config
1723
```
18-
Follow the prompts to set up your data sources and preferences.
24+
This displays the current configuration. The tool works with default settings, but you can customize backends and other options.
1925

2026
## Examples
2127

@@ -32,20 +38,22 @@ Demonstrates core journal assessment functionality:
3238
python basic_assessment.py
3339
```
3440

35-
**Expected Output:**
41+
**Expected Output (similar to):**
3642
```
3743
=== Single Journal Assessment ===
3844
Journal: Nature Communications
3945
Assessment: legitimate
40-
Confidence: 95%
41-
Backend Results: 3 sources checked
46+
Confidence: 98%
47+
Backend Results: 13 sources checked
4248
4349
=== Batch Assessment ===
4450
Science: legitimate (98% confidence)
45-
PLOS ONE: legitimate (92% confidence)
46-
Journal of Biomedicine: predatory (87% confidence)
51+
PLOS ONE: legitimate (100% confidence)
52+
Journal of Biomedicine: legitimate (83% confidence)
4753
```
4854

55+
*Note: Results may vary based on enabled backends and available data.*
56+
4957
### bibtex_processing.py
5058

5159
Shows how to process BibTeX bibliography files:
@@ -59,24 +67,26 @@ Shows how to process BibTeX bibliography files:
5967
python bibtex_processing.py
6068
```
6169

62-
**Expected Output:**
70+
**Expected Output (similar to):**
6371
```
6472
=== BibTeX File Processing ===
65-
Created sample BibTeX file: /tmp/sample.bib
73+
Created sample BibTeX file: /tmp/tmplbecdqnw.bib
6674
6775
=== Assessment Summary ===
6876
Total entries processed: 3
6977
Legitimate journals: 2
7078
Predatory journals: 1
71-
Unknown/unclear: 0
79+
Insufficient data: 0
7280
7381
=== Detailed Results ===
7482
Journal: Nature Communications
7583
Assessment: legitimate
76-
Confidence: 95%
84+
Confidence: 93%
7785
Risk Level: LOW - Safe to publish
7886
```
7987

88+
*Note: Results may vary based on enabled backends and available data.*
89+
8090
## Integration Tips
8191

8292
### Error Handling
@@ -93,15 +103,12 @@ except Exception as e:
93103

94104
### Configuration
95105

96-
The API uses your configured settings from `aletheia-probe config`. For programmatic configuration:
106+
The API uses configuration in this order of precedence:
107+
1. Local `.aletheia-probe/` directory (project-specific settings)
108+
2. User configuration directory (`~/.config/aletheia-probe/` or platform equivalent)
109+
3. Default settings
97110

98-
```python
99-
from aletheia_probe.config_manager import get_config_manager
100-
101-
config_manager = get_config_manager()
102-
config = config_manager.load_config()
103-
# Access configuration settings...
104-
```
111+
For more details, see the [Configuration documentation](https://github.com/sustainet-guardian/aletheia-probe#configuration).
105112

106113
### Async/Await
107114

@@ -116,11 +123,4 @@ async def main():
116123

117124
# Run the async function
118125
result = asyncio.run(main())
119-
```
120-
121-
## Support
122-
123-
For questions or issues:
124-
- Check the main documentation
125-
- Review the source code examples in the docstrings
126-
- Report bugs via the project issue tracker
126+
```

0 commit comments

Comments
 (0)