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 article image heights + failing tests #400

Merged
merged 7 commits into from
Jan 7, 2022
Merged

Conversation

ddabble
Copy link
Member

@ddabble ddabble commented Jan 7, 2022

  • 🚑 Fixed article images having 0 height (d8b0ce8)
  • Improved some code related to the robots.txt files (f43c679, 590e183, 1e01ca4)
  • Fixed failing tests by replacing >= with == in requirements.txt (fb9332c)
  • Updated some requirements (25ade25)

This was caused by using the images' `naturalHeight` property without making sure that the images were completely loaded,
which caused `naturalHeight` to be 0.
Also renamed it to the standard `robots.txt`.
This was mainly for preventing the CI server (GitHub Actions) from testing with too new versions of the required packages,
which caused the testing to fail.

In the case that prompted this change, it was `django-hosts` that hadn't yet added support for the newest version
of Django (which was released yesterday), which caused the following error:
`ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'`
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #400 (28ddb1e) into dev (ce32627) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #400      +/-   ##
==========================================
- Coverage   82.77%   82.74%   -0.03%     
==========================================
  Files         117      117              
  Lines        4150     4150              
==========================================
- Hits         3435     3434       -1     
- Misses        715      716       +1     
Impacted Files Coverage Δ
web/admin_urls.py 88.88% <ø> (ø)
internal/util.py 71.42% <0.00%> (-14.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00e9ce5...28ddb1e. Read the comment docs.

Copy link
Member

@Maisergodt Maisergodt left a comment

Choose a reason for hiding this comment

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

Just a general question regarding disallowing web crawlers to crawl on certain URLs, other than that it looks good to me :)

# Conflicts:
#	requirements.txt
@ddabble ddabble mentioned this pull request Jan 7, 2022
@ddabble ddabble merged commit 630d737 into dev Jan 7, 2022
@ddabble ddabble deleted the bug/article-image-heights branch January 7, 2022 19:23
@ddabble ddabble mentioned this pull request Jan 8, 2022
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.

2 participants