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

Closes #95: Add attachment support #96

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Frank995
Copy link

@Frank995 Frank995 commented Nov 12, 2023

Summary of changes

Add functions for attachments retrieval from posts

Checklist

  • Changes represent a discrete update
  • Commit messages are meaningful and descriptive
  • Changeset does not include any extraneous changes unrelated to the discrete change

@Frank995
Copy link
Author

I'm open to critics regarding code standards and if you have some posts with attachments in the test discourse please share id and slug so that I can add tests

@goetzk
Copy link
Collaborator

goetzk commented Nov 15, 2023

Also please add a "Closes #95" to your commit message

src/pydiscourse/client.py Outdated Show resolved Hide resolved
src/pydiscourse/client.py Show resolved Hide resolved
src/pydiscourse/client.py Show resolved Hide resolved
src/pydiscourse/client.py Show resolved Hide resolved
src/pydiscourse/client.py Show resolved Hide resolved
@goetzk
Copy link
Collaborator

goetzk commented Nov 15, 2023

Can I confirm the behaviour topic_attachments? (sorry to bounce this to you as a question).

Have I got that right?

Thanks for the contribution - most of my feedback is questions or requests for short non functional changes but they'd be nice to have.

thanks,
kk

@Frank995
Copy link
Author

Can I confirm the behaviour topic_attachments? (sorry to bounce this to you as a question).

* takes a topic, eg https://meta.discourse.org/t/understanding-uploads-images-and-attachments/275735

* uses the other methods to extract attachment urls, eg https://d11a6trkgmumsb.cloudfront.net/original/4X/b/5/d/b5d483135cb1405290f07bfe4a9f5bd6dd9b6a1b.png

* Checks the extension is in the permitted list

Have I got that right?

Thanks for the contribution - most of my feedback is questions or requests for short non functional changes but they'd be nice to have.

thanks, kk

Hi sorry for the big delay, I've been very busy. Yes that would be the intended behaviour. I also addressed your comments, let me know if they make more sense to you know

@Frank995 Frank995 changed the title Add attachment support Closes #95: Add attachment support Nov 29, 2023
@Frank995
Copy link
Author

Hi, any news on this?

@goetzk goetzk added this to the v1.7 milestone Dec 28, 2023
@goetzk
Copy link
Collaborator

goetzk commented Dec 28, 2023

Hi, any news on this?

Hi Frank,
Import logging looks like its the only extraneous move now (https://github.com/pydiscourse/pydiscourse/pull/96/files#diff-6cd9d84a11416e5456653817c28de5b33224ec63dfc5776b3e1b567454df0c75) so I'm hitting the button run the testsuite and we'll check our status after that runs.

@goetzk
Copy link
Collaborator

goetzk commented Dec 30, 2023

@Frank995 it looks like the linter has a few complaints about whitespace issues

https://github.com/pydiscourse/pydiscourse/actions/runs/7030837244/job/20000450106?pr=96

Could you please resolve them?

thanks,
Karl.

@Frank995
Copy link
Author

Frank995 commented Jan 2, 2024

@Frank995 it looks like the linter has a few complaints about whitespace issues

https://github.com/pydiscourse/pydiscourse/actions/runs/7030837244/job/20000450106?pr=96

Could you please resolve them?

thanks, Karl.

Hi, I should have fixed the above mentioned problems. Let me know

@goetzk
Copy link
Collaborator

goetzk commented Jan 18, 2024

@Frank995 it looks like the linter has a few complaints about whitespace issues
https://github.com/pydiscourse/pydiscourse/actions/runs/7030837244/job/20000450106?pr=96
Could you please resolve them?
thanks, Karl.

Hi, I should have fixed the above mentioned problems. Let me know

Sorry about the long turn arounds on this.

I can't merge yet because coverage is in client.py < 46% while the current coverage is 45% (yes really, 1% :/).

I will look at pushing that up a bit in the coming days.

thanks,
Karl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants