Skip to content

Commit 521b158

Browse files
committed
Move file path constants to top-level before function definitions
1 parent 2986e45 commit 521b158

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

scripts/1-fetch/doaj_fetch.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,24 @@
127127
"AF": "Afrikaans",
128128
}
129129

130+
# File Paths
131+
FILE_DOAJ_COUNT = shared.path_join(PATHS["data_1-fetch"], "doaj_1_count.csv")
132+
FILE_DOAJ_SUBJECT_REPORT = shared.path_join(
133+
PATHS["data_1-fetch"], "doaj_2_count_by_subject_report.csv"
134+
)
135+
FILE_DOAJ_LANGUAGE = shared.path_join(
136+
PATHS["data_1-fetch"], "doaj_3_count_by_language.csv"
137+
)
138+
FILE_DOAJ_YEAR = shared.path_join(
139+
PATHS["data_1-fetch"], "doaj_4_count_by_year.csv"
140+
)
141+
FILE_DOAJ_PUBLISHER = shared.path_join(
142+
PATHS["data_1-fetch"], "doaj_5_count_by_publisher.csv"
143+
)
144+
FILE_PROVENANCE = shared.path_join(
145+
PATHS["data_1-fetch"], "doaj_provenance.yaml"
146+
)
147+
130148

131149
# Load ISO 3166-1 alpha-2 country codes from YAML file
132150
def load_country_names():
@@ -173,24 +191,6 @@ def load_country_names():
173191
)
174192

175193

176-
# File Paths
177-
FILE_DOAJ_COUNT = shared.path_join(PATHS["data_1-fetch"], "doaj_1_count.csv")
178-
FILE_DOAJ_SUBJECT_REPORT = shared.path_join(
179-
PATHS["data_1-fetch"], "doaj_2_count_by_subject_report.csv"
180-
)
181-
FILE_DOAJ_LANGUAGE = shared.path_join(
182-
PATHS["data_1-fetch"], "doaj_3_count_by_language.csv"
183-
)
184-
FILE_DOAJ_YEAR = shared.path_join(
185-
PATHS["data_1-fetch"], "doaj_4_count_by_year.csv"
186-
)
187-
FILE_DOAJ_PUBLISHER = shared.path_join(
188-
PATHS["data_1-fetch"], "doaj_5_count_by_publisher.csv"
189-
)
190-
FILE_PROVENANCE = shared.path_join(
191-
PATHS["data_1-fetch"], "doaj_provenance.yaml"
192-
)
193-
194194
# Runtime variables
195195
QUARTER = os.path.basename(PATHS["data_quarter"])
196196

0 commit comments

Comments
 (0)