Skip to content

Commit

Permalink
OA: constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestaP committed Apr 24, 2024
1 parent 453d75d commit 916e6e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions dags/open_access/constants.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
CLOSED_ACCESS = r"not+540__a:'CC+BY'+not+540__a:'CC-BY'+"
+r"not+540__f:Bronze+not+540__3:preprint"
CLOSED_ACCESS = (
r"not+540__a:'CC+BY'+not+540__a:'CC-BY'+" + r"not+540__f:Bronze+not+540__3:preprint"
)
BRONZE_ACCESS = r"540__f:'Bronze'"
GREEN_ACCESS = r"not+540__a:'CC+BY'+not+540__a:'CC-BY'+not+540__a:"
+r"'arXiv+nonexclusive-distrib'+not+540__f:'Bronze'"
GREEN_ACCESS = (
r"not+540__a:'CC+BY'+not+540__a:'CC-BY'+not+540__a:"
+ r"'arXiv+nonexclusive-distrib'+not+540__f:'Bronze'"
)
GOLD_ACCESS = r"540__3:'publication'+and+" + r"(540__a:'CC-BY'+OR++540__a:'CC+BY')"

CERN_READ_AND_PUBLISH = r"540__f:'CERN-RP"
Expand Down
9 changes: 5 additions & 4 deletions dags/open_access/gold_open_access_mechanisms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from functools import reduce

import open_access.constants as constants
import open_access.utils as utils
import pendulum
from airflow.decorators import dag, task
Expand Down Expand Up @@ -35,10 +36,10 @@ def join(values, **kwargs):

results = fetch_data_task.expand(
query=[
{"cern_read_and_publish": utils.cern_read_and_publish},
{"cern_individual_apcs": utils.cern_individual_apcs},
{"scoap3": utils.scoap3},
{"other": utils.other},
{"cern_read_and_publish": constants.CERN_READ_AND_PUBLISH},
{"cern_individual_apcs": constants.CERN_INDIVIDUAL_APCS},
{"scoap3": constants.SCOAP3},
{"other": constants.OTHER},
{"other_collective_models": utils.other_collective_models},
],
)
Expand Down

0 comments on commit 916e6e9

Please sign in to comment.