Skip to content

I have created the clear_images.py file in the Scripts folder in the … #1237

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

Merged
merged 6 commits into from
Apr 29, 2025

Conversation

Joshua-Tihabwangye
Copy link
Contributor

…backend app and then added the command in the docker compose file to run the file under the container of django_backend

Contributor checklist


Description

I've run the docker containers and it displayed the logs

Related issue

  • #ISSUE_NUMBER

…backend app and then added the command in the docker compose file to run the file under the container of django_backend
Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for activist-org canceled.

Name Link
🔨 Latest commit ca70566
🔍 Latest deploy log https://app.netlify.com/sites/activist-org/deploys/6810ff83a95b89000821fccd

Copy link
Contributor

Thank you for the pull request! ❤️

The activist team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Development rooms once you're in. Also consider attending our bi-weekly Saturday developer syncs! It'd be great to meet you 😊

Copy link
Contributor

github-actions bot commented Apr 28, 2025

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

First PR Commit Check

  • The commit messages for the remote branch of a new contributor should be checked to make sure their email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo (can be set with git config --global user.email "GITHUB_EMAIL")

@Joshua-Tihabwangye
Copy link
Contributor Author

Hello @andrewtavis am requesting that you review my contribution

@andrewtavis andrewtavis self-requested a review April 28, 2025 13:18
@andrewtavis
Copy link
Member

Can you add a license header as the first line to your Python file as is done in the other ones, @Joshua-Tihabwangye? 😊

@andrewtavis
Copy link
Member

And you have a ruff error as well for an import you're not using, @Joshua-Tihabwangye :) You can see that here. There are a few more thing I'd do to finalize this like resetting some of the Docker settings, but if you wanted to send along the license header and remove the import then we should be good for a final review :)

@Joshua-Tihabwangye
Copy link
Contributor Author

Yes, I am going to correct the ruff error and also the other license thing

@andrewtavis
Copy link
Member

4fda00e Sends along some minor adjustments to the process so the "development" environment variable is in the .env.dev file. I've also added tests for this.

Hmmm in writing it I'm seeing that the tests aren't being picked up 🤔 I'll take another look :)

Ping @mattburnett-repo: Would be good to get your feedback here :)

@mattburnett-repo
Copy link
Member

4fda00e Sends along some minor adjustments to the process so the "development" environment variable is in the .env.dev file. I've also added tests for this.

Hmmm in writing it I'm seeing that the tests aren't being picked up 🤔 I'll take another look :)

Ping @mattburnett-repo: Would be good to get your feedback here :)

Hey @andrewtavis I'll take a look during the next work session in the morning.

@andrewtavis
Copy link
Member

andrewtavis commented Apr 28, 2025

Thanks @mattburnett-repo! Tests are passing now :) Those are:

  • I have an assertion at the top of the test file for the exact name of the directory where files should be deleted from
  • Mock deletion of png, jpg and jpeg
  • We have an env variable that's ENVIRONMENT='development' within .env.dev, and we check that this hasn't been changed (so malicious changes need to happen across multiple files and if we get a PR we'll be like "Why are the env variables being changed???")
  • Test that there will be an error if that directory isn't there

Let me know what you think! Thanks for the efforts here as well, @Joshua-Tihabwangye! Just wanting to make sure we're doing this as safe as possible 😊

Copy link
Member

@mattburnett-repo mattburnett-repo left a comment

Choose a reason for hiding this comment

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

Mostly LGTM.

Minor suggestion to use existing settings.MEDIA_ROOT var instead of duplicate IMAGE_DIR.

@andrewtavis
Copy link
Member

ca70566 does some final edits here. I wasn't able to import the route from settings. Really not sure why, but it was giving me an import error and saying that core isn't a module (???). We can fix this later if we have time/interest, or maybe we can make an issue for it. Another minor good first issue could also be making the test uploaded image an orange square that's the same color as the CTA color on light mode, just to have some attention to detail, but these are not major things at all 😊

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Only other changes here would be super minor, so I'll approve and bring it in :) Thanks for the great first contribution, @Joshua-Tihabwangye, and also for the review, @mattburnett-repo! 😊

@andrewtavis andrewtavis merged commit 5e78235 into activist-org:main Apr 29, 2025
10 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.

3 participants