Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
Browse files Browse the repository at this point in the history
…689_kafka_fallback
  • Loading branch information
RK206 committed Oct 18, 2023
2 parents de2d154 + 7884380 commit 313146f
Show file tree
Hide file tree
Showing 41 changed files with 330 additions and 111 deletions.
4 changes: 2 additions & 2 deletions cms/data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ entries:
secondary_mobile: true
route: doaj.support # ~~->Support:WebRoute~~
entries:
- label: Support DOAJ
- label: Institutions and libraries
route: doaj.support # ~~->Support:WebRoute~~
- label: Publisher supporters
- label: Publishers
route: doaj.publisher_supporters # ~~->PublisherSupporters:WebRoute~~
- label: Supporters
route: doaj.supporters # ~~->Supporters:WebRoute~~
Expand Down
35 changes: 31 additions & 4 deletions cms/pages/support/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: sidenav
sidenav_include: /includes/_sidenav_donation.html
include: /includes/contribution_rates.html
title: Support DOAJ
title: Institutional and library supporter model
section: Support
sticky_sidenav: true
featuremap:
Expand All @@ -11,10 +11,37 @@ featuremap:

---

Support of DOAJ by academic organisations is vital and we are proud to acknowledge that over 80% of our support comes to us this way. We are very grateful to all our supporting academic organisations from around the world.
Support of DOAJ by academic organisations is vital, and we are proud to acknowledge that over 80% of our support comes to us this way. We are very grateful to all our supporting academic organisations worldwide.

The suggested contributions for academic organisations are below. Use the table to find the most appropriate option for your organisation. [Send an email](mailto:[email protected]) to Joanna Ball, Managing Director, with the details of the support level you have chosen. Alternatively, you can use our invoice-free one-time donation button to send us an amount of your choosing.
### 2024 pricing

(Publishers interested in supporting us should read the [publisher supporters](/support/publisher-supporters/) page.)
For 2024, we have revised and simplified our supporter model to align with the levels recommended by SCOSS. This new model enables us to invest in the organisation's future and to continue to provide a high-quality service to our community.

| | Euros(€) | USDs($) | GBPs(£) |
|---------------------|----------|---------|---------|
| Large organisations | 4,000 | 4,400 | 3,440 |
| Small organisations | 2,000 | 2,200 | 1,720 |
| Organisations from [low- and middle-income countries](https://datatopics.worldbank.org/world-development-indicators/the-world-by-income-and-region.html) | 500 | 550 | 430 |

A 30% discount will be applied to institutions supporting via a billing consortium. Please contact [[email protected]](mailto:[email protected]) for further information.

We always have a wishlist of development projects for which we require additional funding. Please contact us if you would like to support us over and above our standard rates.

### Why you should support us

- We are community-led and -governed. Your support enables our commitment to being 100% independent.
- Supporting open infrastructure is a strategic choice for libraries and institutions, demonstrating your commitment to open research and sustaining open infrastructure.
- We are seeing a steady increase in demand: the number of applications we receive each year has increased by 60% since 2018, and our investigations into questionable publishing practices are becoming more complex.
- Help us deliver our role in driving standards and best practice in open access publishing, for example through the [Principles of transparency and best practice in scholarly publishing](/apply/transparency/) and the [OA Journals Toolkit](https://www.oajournals-toolkit.org/).
- You rely extensively on our metadata as a source of trusted journals, integrating it into discovery systems and open access services.

By supporting us, your organisation will join [a growing family of like-minded institutions](/support/supporters/) committed to ensuring quality content is available online for everyone. Supporting DOAJ is a statement of belief in equitable open knowledge and science.

### Benefits for institutional and library supporters

- We will add your institution’s name to [our Supporters page](/support/supporters/)
- you can include details of your DOAJ support in marketing activities
- you can use our logo on your institution’s websites and in other communications
- you can integrate into your services the DOAJ metadata via our OAI/PMH service, our API or the public data dump

---
4 changes: 2 additions & 2 deletions cms/pages/support/supporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ featuremap: ~~Supporters:Fragment~~

---

We are proud that over 80% of DOAJ's funding comes from academic organisations (libraries, library consortia, universities, research centres). Without this vital support, we wouldn't be able to continue the high levels of service that the research community expects of us. We are grateful for the trust shown in us by our supporters.
We are proud that over 80% of our funding comes from academic organisations (libraries, library consortia, universities, research centres). Without this vital support, we couldn't deliver the services the research community expects of us. We are grateful for the trust shown in us by our supporters.

Check [our support page](/support/) for more information on supporter levels and categories.
Check [our Institutions and libraries support page](/support/) for pricing and benefits.

---

Expand Down
3 changes: 3 additions & 0 deletions cms/sass/components/_accordion.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.accordion:focus-within {
border: $grapefruit solid;
}
7 changes: 7 additions & 0 deletions cms/sass/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,10 @@ button[type="submit"].button--secondary {
color: currentColor;
}
}

button.aria-button {
all: inherit;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
20 changes: 20 additions & 0 deletions cms/sass/components/_filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
margin-bottom: $spacing-04;
border: 0;
@include typescale-06;

input[type="checkbox"],
input[type="radio"] {
display: unset;
opacity: 0;
width: 0.8em;
height: 0.8em;

&:focus + label {
outline: dashed 2px lightgrey;
outline-offset: 1px;
}

&:focus:not(:focus-visible){
outline: none;
}
}

}

.filters__heading {
Expand Down Expand Up @@ -50,6 +68,8 @@
max-height: $spacing-07;
height: auto;
overflow-y: auto;
padding-top: $spacing-01;

@include unstyled-list;

li {
Expand Down
35 changes: 35 additions & 0 deletions cms/sass/components/_skip-to-main-content.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* Back to main content button */

.skip-to-main {
position: absolute;
z-index: 10000;
display: flex;
flex-direction: row;
align-items: center;
min-width: min-content;
padding: 5px;
top: 10px;
left: 10px;
background-color: $grapefruit;

svg {
display: block;
margin: 0 auto;
stroke: $warm-black;
margin-rigth: 10px;
}
&:hover, &:focus {
svg {
margin-right: 10px;
}
}
&:hover:after, &:focus:after {
content: " Skip to main content";
color: $warm-black;
vertical-align: bottom;
-webkit-font-feature-settings: 'liga' 1;
-moz-font-feature-settings: 'liga' 1;
font-feature-settings: 'liga' 1;
transition: 0.5 smooth;
}
}
2 changes: 2 additions & 0 deletions cms/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"layout/sidenav",

"components/alert",
"components/accordion",
"components/back-to-top",
"components/buttons",
"components/card",
Expand All @@ -52,6 +53,7 @@
"components/review-table",
"components/select2",
"components/search-results",
"components/skip-to-main-content",
"components/stat",
"components/stretch-list",
"components/tabs",
Expand Down
19 changes: 19 additions & 0 deletions doajtest/testbook/public_site/home_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,22 @@ tests:
bottom right-hand corner.
results:
- You are returned to the top of the home page
- title: Skip to main content button (Accessibility)
context:
role: anonymous
steps:
- step: Refresh the page
- step: Click tab key on the keyboard once
results:
- Skip to the main content button is unfolded and focused
- step: Click enter
results:
- Focus is moved to the main content
- step: Turn on screen reader
- step: With the keyboard navigate to Skip to main content button
results:
- Screen reader reads the button title
- step: Click enter
results:
- Focus is moved to the main content

22 changes: 22 additions & 0 deletions doajtest/testbook/public_site/public_search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,25 @@ tests:
results:
- You are taken to the full text of this article on the Web. It opens in a new
tab
- title: 'Test Public Search Results Display: Accessibility'
context:
role: anonymous
steps:
- step: Go to the DOAJ search page at /search/articles
- step: Turn on a screen reader
results:
- Extendable facets are focusable and focus is marked with an orange solid border
- The screenreader gives the header role ("button")
- The screenreader gives the state of the facet ("extended" or "folded")
- step: click spacebar to fold/unfold the facet
resuts:
- screenreader gives correct state of the facet ("extended" or "folded")
- step: click tab
results:
- focus is on the list of checkboxes
results:
- focus is clearly marked by the outline
- step: click spacebar to check the filter
results:
- filter is applied

31 changes: 24 additions & 7 deletions portality/bll/services/journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from portality import lock
from portality.bll.doaj import DOAJ
from portality.lib.dates import FMT_DATETIME_SHORT
from portality.store import StoreFactory, prune_container
from portality.store import StoreFactory, prune_container, StoreException
from portality.crosswalks.journal_questions import Journal2QuestionXwalk

from datetime import datetime
Expand Down Expand Up @@ -115,7 +115,7 @@ def journal(self, journal_id, lock_journal=False, lock_account=None, lock_timeou

return journal, the_lock

def csv(self, prune=True):
def csv(self, prune=True, logger=None):
"""
Generate the Journal CSV
Expand All @@ -127,39 +127,51 @@ def csv(self, prune=True):
"""
# first validate the incoming arguments to ensure that we've got the right thing
argvalidate("csv", [
{"arg": prune, "allow_none" : False, "arg_name" : "prune"}
{"arg": prune, "allow_none" : False, "arg_name" : "prune"},
{"arg": logger, "allow_none": True, "arg_name": "logger"}
], exceptions.ArgumentException)

# ~~->FileStoreTemp:Feature~~
filename = 'journalcsv__doaj_' + dates.now_str(FMT_DATETIME_SHORT) + '_utf8.csv'
container_id = app.config.get("STORE_CACHE_CONTAINER")
tmpStore = StoreFactory.tmp()
out = tmpStore.path(container_id, filename, create_container=True, must_exist=False)
try:
out = tmpStore.path(container_id, filename, create_container=True, must_exist=False)
logger("Temporary CSV will be written to {x}".format(x=out))
except StoreException as e:
logger("Could not create temporary CSV file: {x}".format(x=e))
raise e

with open(out, 'w', encoding='utf-8') as csvfile:
self._make_journals_csv(csvfile)
self._make_journals_csv(csvfile, logger=logger)
logger("Wrote CSV to output file {x}".format(x=out))

# ~~->FileStore:Feature~~
mainStore = StoreFactory.get("cache")
try:
mainStore.store(container_id, filename, source_path=out)
url = mainStore.url(container_id, filename)
logger("Stored CSV in main cache store at {x}".format(x=url))
finally:
tmpStore.delete_file(container_id, filename) # don't delete the container, just in case someone else is writing to it
logger("Deleted file from tmp store")

action_register = []
if prune:
logger("Pruning old CSVs from store")
def sort(filelist):
rx = "journalcsv__doaj_(.+?)_utf8.csv"
return sorted(filelist, key=lambda x: datetime.strptime(re.match(rx, x).groups(1)[0], FMT_DATETIME_SHORT), reverse=True)

def _filter(f_name):
return f_name.startswith("journalcsv__")
action_register = prune_container(mainStore, container_id, sort, filter=_filter, keep=2)
action_register = prune_container(mainStore, container_id, sort, filter=_filter, keep=2, logger=logger)
logger("Pruned old CSVs from store")

# update the ES record to point to the new file
# ~~-> Cache:Model~~
models.Cache.cache_csv(url)
logger("Stored CSV URL in ES Cache")
return url, action_register

def admin_csv(self, file_path, account_sub_length=8, obscure_accounts=True, add_sensitive_account_info=False):
Expand Down Expand Up @@ -207,11 +219,12 @@ def acc_email(j):
self._make_journals_csv(f, extra_cols)

@staticmethod
def _make_journals_csv(file_object, additional_columns=None):
def _make_journals_csv(file_object, additional_columns=None, logger=None):
"""
Make a CSV file of information for all journals.
:param file_object: a utf8 encoded file object.
"""
logger = logger if logger is not None else lambda x: x
YES_NO = {True: 'Yes', False: 'No', None: '', '': ''}

def _get_doaj_meta_kvs(journal):
Expand Down Expand Up @@ -243,6 +256,8 @@ def _get_article_kvs(journal):
# ~~!JournalCSV:Feature->Journal:Model~~
cols = {}
for j in models.Journal.all_in_doaj(page_size=1000): #Fixme: limited by ES, this may not be sufficient
logger("Exporting journal {x}".format(x=j.id))

bj = j.bibjson()
issn = bj.get_one_identifier(idtype=bj.P_ISSN)
if issn is None:
Expand All @@ -265,6 +280,7 @@ def _get_article_kvs(journal):
toc_kv = _get_doaj_toc_kv(j)
cols[issn].insert(2, toc_kv)

logger("All journals exported")
issns = cols.keys()

csvwriter = csv.writer(file_object)
Expand All @@ -275,4 +291,5 @@ def _get_article_kvs(journal):
csvwriter.writerow(qs)
vs = [v for _, v in cols[i]]
csvwriter.writerow(vs)
logger("CSV Written")

Loading

0 comments on commit 313146f

Please sign in to comment.