Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/3717 s2o label #2430

Merged
merged 26 commits into from
Mar 4, 2025
Merged

Feature/3717 s2o label #2430

merged 26 commits into from
Mar 4, 2025

Conversation

richard-jones
Copy link
Contributor

@richard-jones richard-jones commented Nov 1, 2024


Add Subscribe to Open label in admin forms and public views

Add the s2o data model and form field, and display the value in all the appropriate downstream interfaces

This PR...

  • has scripts to run
  • has migrations to run
  • adds new infrastructure
  • changes the CI pipeline
  • affects the public site
  • affects the editorial area
  • affects the publisher area
  • affects the monitoring

Developer Checklist

Developers should review and confirm each of these items before requesting review

  • Code meets acceptance criteria from issue
  • Unit tests are written and all pass
  • User Test Scripts (if required) are written and have been run through
  • Project's coding standards are met
    • No deprecated methods are used
    • No magic strings/numbers - all strings are in constants or messages files
    • ES queries are wrapped in a Query object rather than inlined in the code
    • Where possible our common library functions have been used (e.g. dates manipulated via dates)
    • Cleaned up commented out code, etc
    • Urls are constructed with url_for not hard-coded
  • Code documentation and related non-code documentation has all been updated
  • Migation has been created and tested
  • There is a recent merge from develop (2024-11-15)

Reviewer Checklist

Reviewers should review and confirm each of these items before approval
If there are multiple reviewers, this section should be duplicated for each reviewer

  • Code meets acceptance criteria from issue
  • Unit tests are written and all pass
  • User Test Scripts (if required) are written and have been run through
  • Project's coding standards are met
    • No deprecated methods are used
    • No magic strings/numbers - all strings are in constants or messages files
    • ES queries are wrapped in a Query object rather than inlined in the code
    • Where possible our common library functions have been used (e.g. dates manipulated via dates)
    • Cleaned up commented out code, etc
    • Urls are constructed with url_for not hard-coded
  • Code documentation and related non-code documentation has all been updated
  • Migation has been created and tested
  • There is a recent merge from develop

Testing

Feature testing:

Regression testing:

Deployment

What deployment considerations are there? (delete any sections you don't need)

Migrations

The following migration script needs to be run immediately after deploy, before any users modify any applications or journals. For that reason it may be best to go to read-only mode for 10 minutes during deployment.

python portality/migrate/20241031_3717_s2o_label/migrate.py

See:
portality/migrate/20241031_3717_s2o_label/README.md for introduction to migration

@richard-jones richard-jones marked this pull request as ready for review November 15, 2024 15:54
@RK206
Copy link
Contributor

RK206 commented Feb 10, 2025

@richard-jones a test case is failing. Following is the error. Is something missed to commit?
test case doajtest.unit.test_models.TestModels.test_14_journal_like_bibjson

Error

Error
Traceback (most recent call last):
  File "/Users/rama/CottageLabs/DOAJ/review-code/doajtest/unit/test_models.py", line 691, in test_14_journal_like_bibjson
    bj.labels = ["diamond"]
  File "/Users/rama/CottageLabs/DOAJ/review-code/portality/lib/seamless.py", line 281, in __setattr__
    return object.__setattr__(self, name, value)
  File "/Users/rama/CottageLabs/DOAJ/review-code/portality/models/v2/bibjson.py", line 612, in labels
    self.__seamless__.set_with_struct("labels", val)
  File "/Users/rama/CottageLabs/DOAJ/review-code/portality/lib/seamless.py", line 586, in set_with_struct
    self.set_list(path, val, coerce=coerce_fn, **kwargs)
  File "/Users/rama/CottageLabs/DOAJ/review-code/portality/lib/seamless.py", line 449, in set_list
    raise SeamlessException("Value '{x}' is not permitted at '{y}'".format(x=val, y=context + "." + path))
portality.lib.seamless.SeamlessException: Value '['diamond']' is not permitted at '.labels'

@Steven-Eardley Steven-Eardley merged commit 897eba5 into develop Mar 4, 2025
1 of 2 checks passed
@Steven-Eardley Steven-Eardley deleted the feature/3717_s2o_label branch March 4, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants