You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visit the URL - http://127.0.0.1:8000/articles/links/
235
240
241
+
### Harvest Publications from Real Journals
242
+
243
+
The `harvest_journals` management command allows you to harvest publications from real OAI-PMH journal sources directly into your database. This is useful for:
244
+
245
+
- Populating your database with real data for testing and development
246
+
- Testing harvesting functionality against live endpoints
247
+
- Initial data loading for production deployment
248
+
249
+
**List available journals**:
250
+
251
+
```bash
252
+
python manage.py harvest_journals --list
253
+
```
254
+
255
+
**Harvest all configured journals** (with record limit):
-`scientific-data` - Scientific Data (RSS/Atom) ([Issue #58](https://github.com/GeoinformationSystems/optimap/issues/58))
289
+
290
+
The command supports both OAI-PMH and RSS/Atom feeds, automatically detecting the feed type for each journal.
291
+
292
+
The command provides detailed progress reporting including:
293
+
294
+
- Number of publications harvested
295
+
- Harvesting duration
296
+
- Spatial and temporal metadata statistics
297
+
- Success/failure status for each journal
298
+
299
+
When the command runs mutiple times, it will only add new publications that are not already in the database as part of the regular harvesting process.
300
+
236
301
### Create Superusers/Admin
237
302
238
303
Superusers or administrators can be created using the `createsuperuser` command. This user will have access to the Django admin interface.
@@ -265,6 +330,10 @@ UI tests are based on [Helium](https://github.com/mherrmann/selenium-python-heli
265
330
pip install -r requirements-dev.txt
266
331
```
267
332
333
+
#### Unit Tests
334
+
335
+
Run all unit tests:
336
+
268
337
```bash
269
338
python manage.py test tests
270
339
@@ -275,6 +344,41 @@ python -Wa manage.py test
275
344
OPTIMAP_LOGGING_LEVEL=WARNING python manage.py test tests
276
345
```
277
346
347
+
#### Integration Tests (Real Harvesting)
348
+
349
+
Integration tests that harvest from live OAI-PMH endpoints are disabled by default to avoid network dependencies and slow test execution. These tests verify harvesting from real journal sources.
350
+
351
+
Run all integration tests:
352
+
353
+
```bash
354
+
# Enable real harvesting tests
355
+
SKIP_REAL_HARVESTING=0 python manage.py test tests.test_real_harvesting
356
+
```
357
+
358
+
Run a specific journal test:
359
+
360
+
```bash
361
+
# Test ESSD harvesting
362
+
SKIP_REAL_HARVESTING=0 python manage.py test tests.test_real_harvesting.RealHarvestingTest.test_harvest_essd
363
+
364
+
# Test GEO-LEO harvesting
365
+
SKIP_REAL_HARVESTING=0 python manage.py test tests.test_real_harvesting.RealHarvestingTest.test_harvest_geo_leo
366
+
```
367
+
368
+
Show skipped tests (these are skipped by default):
369
+
370
+
```bash
371
+
# Run with verbose output to see skip reasons
372
+
python manage.py test tests.test_real_harvesting -v 2
373
+
```
374
+
375
+
**Supported journals**:
376
+
377
+
- Earth System Science Data (ESSD) - [Issue #59](https://github.com/GeoinformationSystems/optimap/issues/59)
0 commit comments