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

Update and replace packages #78

Merged
merged 5 commits into from
Jan 20, 2025
Merged

Conversation

gmmajal
Copy link
Contributor

@gmmajal gmmajal commented Jan 16, 2025

Relevant issue: #77

Background info: # any relevant background info for additional context, references to documentations etc.

  • We are using pytest v7.4.4. A new major release is available now and we should update the package.
  • ruff as a linting package is reported to be faster than flake8 and it provides similar functionality. We should replace flake8 with ruff. More info here: https://docs.astral.sh/ruff/

Changes introduced: # list changes to the code repo made in this pull request

  • Bump version of pytest to v8.3.4 inside the pyproject.toml file.
  • Replace flake8 with ruff inside the pyproject.toml file and the .github/workflows/ci.yml file.
  • Bumped version of sphinx plugin: sphinx-autodoc-typehints to v3 inside the docs/requirements.txt file.
  • Updated poetry.lock file.
  • As a consequence of the updated poetry.lock file the package rdflib was bumped to patch release v7.1.2. Unfortunately, this release had some unintended changes on the slicing operator in the package. More info here: Graph.__getitem__ runtime type checking for slices breaks working code RDFLib/rdflib#3037. Therefore, the method extract_relation_by_uri inside the script stwfsapy/thesaurus.py was modified slightly to ensure that the unit tests do not break. Instead of g[:uri:], we use g.subject_objects(uri) The modification can be hopefully reverted once the patch release rdflib v7.1.3 is available.

Added later see below for further changes introduced.

@gmmajal gmmajal requested a review from annakasprzik January 16, 2025 11:20
@gmmajal gmmajal self-assigned this Jan 16, 2025
@gmmajal gmmajal linked an issue Jan 16, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f2d6b1a) to head (6f5391e).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #78   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines          922       922           
=========================================
  Hits           922       922           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gmmajal
Copy link
Contributor Author

gmmajal commented Jan 16, 2025

Further Changes introduced:

  • In the linting task inside github workflows, the check sub-command was required in order to properly perform linting with ruff. This modification was made inside the file .github/workflows/ci.yml

Copy link
Contributor

@annakasprzik annakasprzik left a comment

Choose a reason for hiding this comment

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

Went through the checks, only found the deprecation warning for safety -- okay.

@gmmajal
Copy link
Contributor Author

gmmajal commented Jan 20, 2025

Further changes introduced:

  • The poetry.lock file has been refreshed once again. ruff is now at v0.9.2. rdflib is now at v7.1.3.
  • The change made in the thesaurus.py script has been reverted. All tests are cleared locally and in the ci pipeline.

@gmmajal
Copy link
Contributor Author

gmmajal commented Jan 20, 2025

Further changes introduced:

  • The date released and version number inside the CITATION.cff file has been updated.
  • The version number given inside the pyproject.toml file has been updated.

@gmmajal gmmajal merged commit 22e6d42 into master Jan 20, 2025
6 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.

Update and replace packages
2 participants