Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rework Repository to src Layout #4798

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 9 commits into from
May 25, 2025
Merged

Rework Repository to src Layout #4798

merged 9 commits into from
May 25, 2025

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-Joshi Bibo-Joshi commented May 22, 2025

When ready closes #4797

Needs manual verification that

  • wheels are build correctly
  • mypy & code coverage are working as expected

I totally just let GH Copilot Agent run for 10 minutes and just manually fixed a few obvious things in the diff 😅

@Bibo-Joshi Bibo-Joshi added the 🛠 code-quality change type: code-quality label May 22, 2025
@github-actions github-actions bot removed the 🛠 code-quality change type: code-quality label May 22, 2025
@Bibo-Joshi Bibo-Joshi changed the title Change to src Layout Rework Repository to src Layout May 23, 2025
@Bibo-Joshi
Copy link
Member Author

Bibo-Joshi commented May 23, 2025

About 6c7cf83: I've done this now like I did for chango. I'm not sure though if that's the best way. Note that the source distribution now includes many more files than before. If anyone has suggsetions on best practices, I'm happy for input.

Installing from these distributions works, though, I've tested that

@Bibo-Joshi Bibo-Joshi marked this pull request as ready for review May 23, 2025 21:48
@Bibo-Joshi Bibo-Joshi requested review from Copilot, harshil21 and Poolitzer and removed request for harshil21 May 23, 2025 21:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reworks the repository layout to use a src-based structure, moving package code from telegram to src/telegram.

  • Update configuration in pyproject.toml for versioning, builds, linting, testing, and type checking.
  • Adjust CI workflows to use the new src/telegram path.
  • Update contribution documentation to reflect the new layout.

Reviewed Changes

Copilot reviewed 232 out of 232 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Updated package paths and build configurations
changes/unreleased/4798.g7G3jRf2ns4ath9LRFEcit.toml Added changelog entry for the repository rework
.github/workflows/unit_tests.yml Updated test path to src/telegram
.github/workflows/type_completeness.yml Updated test path to src/telegram
.github/workflows/test_official.yml Updated test path to src/telegram
.github/workflows/docs-admonitions.yml Updated test path to src/telegram
.github/CONTRIBUTING.rst Extended instructions to reflect the new src layout

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

If anyone has suggsetions on best practices

I couldn't find any document outlining what files should be in a sdist, this document mentions that a pyproject.toml and PKG-INFO file must be present, but otherwise makes no recommendations. I think we can keep pretty much everything then.

I didn't see any updates to docs related files, and the builds are passing, so I assume that works fine and sphinx can see the files.

@Bibo-Joshi Bibo-Joshi requested a review from harshil21 May 24, 2025 07:56
@Bibo-Joshi Bibo-Joshi merged commit 828eda7 into master May 25, 2025
57 of 59 checks passed
@Bibo-Joshi Bibo-Joshi deleted the src-layout branch May 25, 2025 11:50
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a src layout instead of a flat layout
2 participants