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

add AMPS #585

Merged
merged 3 commits into from
Nov 29, 2024
Merged

add AMPS #585

merged 3 commits into from
Nov 29, 2024

Conversation

zsomborfoldi
Copy link
Contributor

@zsomborfoldi zsomborfoldi commented Nov 28, 2024

Summary by Sourcery

Add the 'AMPS' project to the research projects and update related test cases to ensure proper integration.

New Features:

  • Introduce the 'AMPS' project to the list of research projects in the codebase.

Tests:

  • Update test cases to include the 'AMPS' project in various test scenarios, ensuring its integration is verified.

Copy link
Contributor

sourcery-ai bot commented Nov 28, 2024

Reviewer's Guide by Sourcery

This PR adds support for the AMPS (Ancient Mesopotamian Priestly Scholasticism) research project by adding it as a new enum value in ResearchProject and updating related test files to include AMPS in their test cases.

Class diagram for ResearchProject enum update

classDiagram
    class ResearchProject {
        +CAIC: ("Cuneiform Artefacts of Iraq in Context", "CAIC", None)
        +ALU_GENEVA: ("Edition of the Omen Series Summa Alu", "aluGeneva", None)
        +AMPS: ("Ancient Mesopotamian Priestly Scholasticism", "AMPS", None)
    }
    note for ResearchProject "Added AMPS as a new enum value"
Loading

File-Level Changes

Change Details Files
Added AMPS as a new research project option
  • Added AMPS enum value with full name 'Ancient Mesopotamian Priestly Scholasticism' and abbreviation 'AMPS'
  • Updated test cases to include AMPS in project queries
  • Modified fragment factory to include AMPS in default projects
  • Updated DTO tests to include AMPS in project abbreviations
ebl/common/domain/project.py
ebl/tests/fragmentarium/test_fragment_repository.py
ebl/tests/factories/fragment.py
ebl/tests/fragmentarium/test_dtos.py
ebl/tests/fragmentarium/test_fragments_search_route.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @zsomborfoldi - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • Invalid syntax in ResearchProject access (link)

Overall Comments:

  • In test_dtos.py, the syntax ResearchProject["CAIC", "aluGeneva", "AMPS"].abbreviation is incorrect. Each project's abbreviation should be accessed separately.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🔴 Testing: 1 blocking issue, 1 other issue
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -1084,11 +1084,12 @@ def test_query_genres(fragment_repository, query, expected):
[
("CAIC", [0]),
("aluGeneva", [1]),
("AMPS", [2]),
(None, [0, 1]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (testing): Test case for 'None' query should include all project indices

The test case for query=None should return [0, 1, 2] since we now have three projects in the test data. Currently, it's not testing the AMPS project in the null query case.

@@ -113,7 +113,7 @@ def expected_dto(lemmatized_fragment, has_photo):
"externalNumbers": ExternalNumbersSchema().dump(
lemmatized_fragment.external_numbers
),
"projects": [ResearchProject["CAIC"].abbreviation],
"projects": [ResearchProject["CAIC", "aluGeneva", "AMPS"].abbreviation],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (testing): Invalid syntax in ResearchProject access

The syntax for accessing ResearchProject enums is incorrect. It should be separate entries in a list like [ResearchProject.CAIC.abbreviation, ResearchProject.ALU_GENEVA.abbreviation, ResearchProject.AMPS.abbreviation]

Copy link

codeclimate bot commented Nov 29, 2024

Code Climate has analyzed commit 0a50558 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (75% is the threshold).

This pull request will bring the total coverage in the repository to 91.4% (0.0% change).

View more on Code Climate.

@zsomborfoldi zsomborfoldi merged commit 86d160a into master Nov 29, 2024
12 checks passed
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.

1 participant