Skip to content

Commit

Permalink
Rename folder to match external query name #3239
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgiosironi committed May 15, 2024
1 parent 8da6244 commit 3bf0964
Show file tree
Hide file tree
Showing 35 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Logger } from '../../shared-ports';
import { ExternalQueries } from '../external-queries';
import { QueryExternalService } from '../query-external-service';

export const createFetchEvaluation = (queryExternalService: QueryExternalService, logger: Logger): ExternalQueries['fetchEvaluationDigest'] => pipe(
export const createFetchEvaluationDigest = (queryExternalService: QueryExternalService, logger: Logger): ExternalQueries['fetchEvaluationDigest'] => pipe(
{
doi: fetchDoiEvaluationByPublisher(
{
Expand Down
6 changes: 6 additions & 0 deletions src/third-parties/fetch-evaluation-digest/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Knows how to:
// - determine which service an evaluation is hosted on
// - fetch a machine-readable digest of the evaluation from that service
// - translate the evaluation digest to our domain model

export { createFetchEvaluationDigest } from './create-fetch-evaluation-digest';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { URL } from 'url';
import * as TE from 'fp-ts/TaskEither';
import { pipe } from 'fp-ts/function';
import { fetchNcrcHumanReadableOriginalUrl } from './fetch-evaluation/ncrc/fetch-ncrc-review';
import { fetchNcrcHumanReadableOriginalUrl } from './fetch-evaluation-digest/ncrc/fetch-ncrc-review';
import { Logger } from '../shared-ports';
import * as DE from '../types/data-error';
import {
Expand Down
6 changes: 0 additions & 6 deletions src/third-parties/fetch-evaluation/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/third-parties/instantiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CachingFetcherOptions, createCachingFetcher } from './cache';
import { fetchExpressionFrontMatter, crossrefResponseBodyCachePredicate } from './crossref';
import { searchEuropePmc } from './europe-pmc';
import { ExternalQueries } from './external-queries';
import { createFetchEvaluation } from './fetch-evaluation';
import { createFetchEvaluationDigest } from './fetch-evaluation-digest';
import { fetchEvaluationHumanReadableOriginalUrl } from './fetch-evaluation-human-readable-original-url';
import { fetchPublishingHistory } from './fetch-publishing-history';
import { createFetchRecommendedPapers } from './fetch-recommended-papers';
Expand Down Expand Up @@ -45,7 +45,7 @@ export const instantiate = (
);

return {
fetchEvaluationDigest: createFetchEvaluation(queryExternalService, logger),
fetchEvaluationDigest: createFetchEvaluationDigest(queryExternalService, logger),
fetchEvaluationHumanReadableOriginalUrl: fetchEvaluationHumanReadableOriginalUrl(logger),
fetchExpressionFrontMatter: fetchExpressionFrontMatter(
queryCrossrefService,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as E from 'fp-ts/Either';
import { pipe } from 'fp-ts/function';
import { deriveFullTextsOfEvaluations } from '../../../../src/third-parties/fetch-evaluation/access-microbiology/derive-full-texts-of-evaluations';
import { deriveFullTextsOfEvaluations } from '../../../../src/third-parties/fetch-evaluation-digest/access-microbiology/derive-full-texts-of-evaluations';
import { SanitisedHtmlFragment } from '../../../../src/types/sanitised-html-fragment';
import { dummyLogger } from '../../../dummy-logger';
import { abortTest } from '../../../framework/abort-test';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as TE from 'fp-ts/TaskEither';
import { pipe } from 'fp-ts/function';
import { fetchAccessMicrobiologyEvaluation } from '../../../../src/third-parties/fetch-evaluation/access-microbiology/fetch-access-microbiology-evaluation';
import { fetchAccessMicrobiologyEvaluation } from '../../../../src/third-parties/fetch-evaluation-digest/access-microbiology/fetch-access-microbiology-evaluation';
import { QueryExternalService } from '../../../../src/third-parties/query-external-service';
import { SanitisedHtmlFragment } from '../../../../src/types/sanitised-html-fragment';
import { dummyLogger } from '../../../dummy-logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as O from 'fp-ts/Option';
import { toJatsXmlUrlOfPublisher } from '../../../../src/third-parties/fetch-evaluation/access-microbiology/to-jats-xml-url-of-publisher';
import { toJatsXmlUrlOfPublisher } from '../../../../src/third-parties/fetch-evaluation-digest/access-microbiology/to-jats-xml-url-of-publisher';
import { arbitraryWord } from '../../../helpers';

describe('to-jats-xml-url-of-publisher', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as E from 'fp-ts/Either';
import * as TE from 'fp-ts/TaskEither';
import { fetchDoiEvaluationByPublisher } from '../../../src/third-parties/fetch-evaluation/fetch-doi-evaluation-by-publisher';
import { fetchDoiEvaluationByPublisher } from '../../../src/third-parties/fetch-evaluation-digest/fetch-doi-evaluation-by-publisher';
import * as DE from '../../../src/types/data-error';
import { SanitisedHtmlFragment } from '../../../src/types/sanitised-html-fragment';
import { dummyLogger } from '../../dummy-logger';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as E from 'fp-ts/Either';
import * as T from 'fp-ts/Task';
import * as TE from 'fp-ts/TaskEither';
import { flow, identity, pipe } from 'fp-ts/function';
import { fetchEvaluationFromAppropriateService } from '../../../src/third-parties/fetch-evaluation/fetch-evaluation-from-appropriate-service';
import { fetchEvaluationFromAppropriateService } from '../../../src/third-parties/fetch-evaluation-digest/fetch-evaluation-from-appropriate-service';
import * as DE from '../../../src/types/data-error';
import * as RI from '../../../src/types/evaluation-locator';
import { arbitrarySanitisedHtmlFragment } from '../../helpers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as E from 'fp-ts/Either';
import * as TE from 'fp-ts/TaskEither';
import { pipe } from 'fp-ts/function';
import { HypothesisAnnotation } from '../../../../src/third-parties/fetch-evaluation/hypothesis/HypothesisAnnotation';
import { fetchHypothesisAnnotation, insertSelectedText } from '../../../../src/third-parties/fetch-evaluation/hypothesis/fetch-hypothesis-annotation';
import { HypothesisAnnotation } from '../../../../src/third-parties/fetch-evaluation-digest/hypothesis/HypothesisAnnotation';
import { fetchHypothesisAnnotation, insertSelectedText } from '../../../../src/third-parties/fetch-evaluation-digest/hypothesis/fetch-hypothesis-annotation';
import { dummyLogger } from '../../../dummy-logger';
import { arbitraryWord } from '../../../helpers';
import { shouldNotBeCalled } from '../../../should-not-be-called';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as E from 'fp-ts/Either';
import * as T from 'fp-ts/Task';
import * as TE from 'fp-ts/TaskEither';
import { flow, identity, pipe } from 'fp-ts/function';
import { fetchPrelightsHighlight } from '../../../../src/third-parties/fetch-evaluation/prelights/fetch-prelights-highlight';
import { fetchPrelightsHighlight } from '../../../../src/third-parties/fetch-evaluation-digest/prelights/fetch-prelights-highlight';
import * as DE from '../../../../src/types/data-error';
import { dummyLogger } from '../../../dummy-logger';
import { arbitraryString, arbitraryUrl } from '../../../helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as E from 'fp-ts/Either';
import * as T from 'fp-ts/Task';
import * as TE from 'fp-ts/TaskEither';
import { flow, identity, pipe } from 'fp-ts/function';
import { fetchRapidReview } from '../../../../src/third-parties/fetch-evaluation/rapid-reviews/fetch-rapid-review';
import { fetchRapidReview } from '../../../../src/third-parties/fetch-evaluation-digest/rapid-reviews/fetch-rapid-review';
import * as DE from '../../../../src/types/data-error';
import { HtmlFragment } from '../../../../src/types/html-fragment';
import { dummyLogger } from '../../../dummy-logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as E from 'fp-ts/Either';
import * as TE from 'fp-ts/TaskEither';
import { fetchZenodoRecord } from '../../../../src/third-parties/fetch-evaluation/zenodo/fetch-zenodo-record';
import { fetchZenodoRecord } from '../../../../src/third-parties/fetch-evaluation-digest/zenodo/fetch-zenodo-record';
import * as DE from '../../../../src/types/data-error';
import { dummyLogger } from '../../../dummy-logger';
import { arbitraryHtmlFragment } from '../../../helpers';
Expand Down

0 comments on commit 3bf0964

Please sign in to comment.