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

Improved documentation (undocumented features, docstrings, API documentation) #561

Open
plaa opened this issue Nov 28, 2024 · 2 comments · May be fixed by #565
Open

Improved documentation (undocumented features, docstrings, API documentation) #561

plaa opened this issue Nov 28, 2024 · 2 comments · May be fixed by #565

Comments

@plaa
Copy link

plaa commented Nov 28, 2024

I have a few suggestions to improve the documentation of freezegun:

1. Undocumented features: At least the real_asyncio parameter is undocumented. I accidentally found it when reading the code trying to figure out how to make asyncio.sleep work. When searching for it the only documentation is a comment inside the api.py code. There may be other undocumented features, I didn't check all of them.

2. Docstrings: It would be great to have docstrings so I could see documentation directly inside the IDE, instead of jumping to a website.

3. API documentation: While examples are great, I would appreciate also succinct API documentation with all options listed and documented. Examples are a bit hit-and-miss, you have to read through all examples to see whether a feature you're looking for is present or not. Though of the three, this is the lowest priority for me.

Thank you!

@bblommers
Copy link
Collaborator

Hi @plaa, that does sound like it would be an improvement. I don't think any maintainer currently has the time or energy to look into this though, so if you want to fix it yourself, PR's are always welcome!

joethesaint added a commit to joethesaint/freezegun that referenced this issue Jan 2, 2025
Fixes spulec#561

Add documentation for the `real_asyncio` parameter and improve API documentation.

* **README.rst**
  - Add documentation for the `real_asyncio` parameter in the "Usage" section.
  - Add succinct API documentation with all options listed in the "Usage" section.

* **freezegun/api.py**
  - Add docstrings to the `_freeze_time` class and its methods.
  - Add docstrings to the `freeze_time` function.

* **CHANGELOG**
  - Add an entry mentioning the `real_asyncio` parameter in the "1.4.0" section.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/spulec/freezegun/issues/561?shareId=XXXX-XXXX-XXXX-XXXX).
joethesaint added a commit to joethesaint/freezegun that referenced this issue Jan 2, 2025
Fixes spulec#561

Add documentation for the `real_asyncio` parameter and improve API documentation.

* README.rst
  - Add documentation for the `real_asyncio` parameter in the "Usage" section.
  - Add succinct API documentation with all options listed in the "Usage" section.

* freezegun/api.py
  - Add docstrings to the `_freeze_time` class and its methods.
  - Add docstrings to the `freeze_time` function.

* CHANGELOG
  - Add an entry mentioning the `real_asyncio` parameter in the "1.4.0" section.

---
@joethesaint
Copy link

I have tried fixing this one, as I am still learning to contribute to open source. Please bear with me and provide corrections as needed; it would be encouraging to read the codebase more and see what @plaa noted.

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 a pull request may close this issue.

3 participants