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

Fix Pip Install Issues #468

Merged
merged 3 commits into from
Jan 4, 2024
Merged

Fix Pip Install Issues #468

merged 3 commits into from
Jan 4, 2024

Conversation

MRichards99
Copy link
Collaborator

This PR will close #467

Description

These changes allow DataGateway API to be installed using pip install - the fix is simply just to explicitly state which version of Flask should be used instead of the installation process trying to figure that out. Normally that wouldn't be an issue, but we're having to use quite an old version of Flask that still supports Python 3.6. There's also some updates to poetry.lock as a result - a lot of that is just upgrading other dependencies as the file hasn't changed in a little while.

I've added a job to the CI to keep track of this - you can see in this run (before Flask was pinned), that new job fails on Python 3.8+, giving the same error that was originally found but the CI now passes.

When the PR is merged, it will create v9.0.2 so you'll be able to use this new version with SciGateway Ansible.

Testing Instructions

Take a look at the CI and check you're happy with it and try to pip install the API on your own machine.

  • Review code
  • Check GitHub Actions build
  • If icatdb Generator Script Consistency Test CI job fails, is this because of a deliberate change made to the script to change generated data (which isn't actually a problem) or is here an underlying issue with the changes made?
  • Review changes to test coverage
  • Does this change mean a new patch, minor or major version should be made? If so, does one of the commit messages feature fix:, feat: or BREAKING CHANGE: so a release is automatically made via GitHub Actions upon merge?

Agile Board Tracking

Connect to #467

- This will ensure this version is used when the API is installed via Pip
- As normal, we can't upgrade because all patched versions have dropped support for Python 3.6
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4a29dd5) 96.66% compared to head (05b3e13) 96.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #468   +/-   ##
=======================================
  Coverage   96.66%   96.66%           
=======================================
  Files          39       39           
  Lines        3242     3242           
  Branches      317      317           
=======================================
  Hits         3134     3134           
  Misses         80       80           
  Partials       28       28           

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

Copy link
Member

@louise-davies louise-davies left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for fixing this! It will be helpful for future machine migrations

@MRichards99 MRichards99 merged commit 2d7736f into main Jan 4, 2024
20 checks passed
@MRichards99 MRichards99 deleted the pip-install-#467 branch January 4, 2024 07:39
@MRichards99 MRichards99 mentioned this pull request Jan 4, 2024
1 task
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.

Add CI job to test pip install
2 participants