-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add an initial version for the README. #2
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds comprehensive documentation to the README.md, transforming it from a minimal placeholder into a detailed project guide. The README provides project description, installation instructions, usage guidelines, configuration options, and sections for examples, contributing, license, and contact information.
Key changes:
- Added detailed project description explaining cache-manager's purpose and core features
- Included installation instructions for both pip and Poetry workflows
- Added structured sections with table of contents for improved navigation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```python | ||
|
|
||
| ``` | ||
|
|
||
| 2) TODO: Add another minimal example. | ||
|
|
||
| ```python | ||
|
|
||
| ``` | ||
|
|
||
| 1) TODO: Add a more complete example. | ||
|
|
||
| ```python | ||
|
|
||
| ``` | ||
|
|
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code block for this example is empty. Consider either adding the example code or removing this empty code block until the example is ready to be added.
| ```python | |
| ``` | |
| 2) TODO: Add another minimal example. | |
| ```python | |
| ``` | |
| 1) TODO: Add a more complete example. | |
| ```python | |
| ``` | |
| 2) TODO: Add another minimal example. | |
| 1) TODO: Add a more complete example. |
| Run the included example script which downloads a real dataset and caches it: | ||
|
|
||
| ```bash | ||
| python scripts/hello_cache_manager.py | ||
| ``` | ||
|
|
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The referenced script scripts/hello_cache_manager.py does not exist in the repository. Either create this script or remove this reference until the example script is available.
| Run the included example script which downloads a real dataset and caches it: | |
| ```bash | |
| python scripts/hello_cache_manager.py | |
| ``` | |
| <!-- Example script reference removed: scripts/hello_cache_manager.py does not exist. --> |
README.md
Outdated
| git clone https://github.com/saezlab/cache-manager.git | ||
| cd cache-manager | ||
| python -m venv .venv && source .venv/bin/activate | ||
| pip install -e .[dev] |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command pip install -e .[dev] may not work correctly for this Poetry project. The project defines dependencies in [tool.poetry.dev-dependencies] but doesn't define a [dev] extras group. Consider using poetry install instead, or add a [tool.poetry.extras] section with a dev group that references the dev dependencies.
| pip install -e .[dev] | |
| poetry install |
README.md
Outdated
| # cache-manager | ||
|
|
||
| ## Description | ||
| cache-manager is a lightweight, Pythonic cache for files with a SQLite registry. It lets you: |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The article should be "an" instead of "a" before "SQLite" since "SQLite" is pronounced starting with a vowel sound ("ess-cue-lite").
| cache-manager is a lightweight, Pythonic cache for files with a SQLite registry. It lets you: | |
| cache-manager is a lightweight, Pythonic cache for files with an SQLite registry. It lets you: |
README.md
Outdated
|
|
||
| ``` | ||
|
|
||
| 1) TODO: Add a more complete example. |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example numbering is inconsistent. The sequence shows "1) TODO", "2) TODO", then "1) TODO" again. The third example should be numbered "3)" instead of repeating "1)".
| 1) TODO: Add a more complete example. | |
| 3) TODO: Add a more complete example. |
| ```python | ||
|
|
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code block for the minimal example is empty. Consider either adding a minimal code example or removing this empty code block until the example is ready to be added.
| ```python | |
| ```python | |
| from cache_manager import Cache | |
| # Create a cache in the default location | |
| cache = Cache(pkg="myapp") | |
| # Create or get a cache item for a given key | |
| item = cache.get_or_create("myfile.txt") | |
| # Write some data to the file | |
| with item.open("w") as f: | |
| f.write("hello world") | |
| # Mark the item as ready | |
| item.mark_ready() |
| ```python | ||
|
|
||
| ``` |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code block for this example is empty. Consider either adding the example code or removing this empty code block until the example is ready to be added.
| ```python | ||
|
|
||
| ``` | ||
|
|
||
| 2) TODO: Add another minimal example. | ||
|
|
||
| ```python | ||
|
|
||
| ``` | ||
|
|
||
| 1) TODO: Add a more complete example. | ||
|
|
||
| ```python | ||
|
|
||
| ``` |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code block for this example is empty. Consider either adding the example code or removing this empty code block until the example is ready to be added.
| ```python | |
| ``` | |
| 2) TODO: Add another minimal example. | |
| ```python | |
| ``` | |
| 1) TODO: Add a more complete example. | |
| ```python | |
| ``` | |
| 2) TODO: Add another minimal example. | |
| 1) TODO: Add a more complete example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rows = [] | ||
| for i, row in enumerate(reader): | ||
| rows.append(row) | ||
| if i >= 5: # header + 5 |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment "# header + 5" is misleading. The condition if i >= 5 will break after reading 6 rows (indices 0-5), which includes the header plus 5 data rows. However, the comment at line 76 says "header + 5 rows", which correctly describes the intent. Consider updating this comment to "# indices 0-5, i.e., 6 rows total" for clarity.
| if i >= 5: # header + 5 | |
| if i >= 5: # indices 0-5, i.e., 6 rows total (header + 5 data rows) |
|
|
||
| ## Contributing | ||
| Contributions are welcome! A typical flow: | ||
|
|
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Contributing section mentions "A typical flow:" but doesn't provide the flow steps. Either remove this introductory phrase or add the actual workflow steps (e.g., fork the repo, create a branch, make changes, submit PR).
| 1. Fork the repository on GitHub. | |
| 2. Clone your fork locally. | |
| 3. Create a new branch for your feature or fix. | |
| 4. Make your changes and commit them with clear messages. | |
| 5. Push your branch to your fork on GitHub. | |
| 6. Open a pull request against the main repository. |
| try: | ||
| if os.path.exists(item.path): | ||
| os.remove(item.path) | ||
| except Exception: |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except Exception: | |
| except Exception: | |
| # Ignore errors during cleanup; file may not exist or be locked. |
Documentation enhancements:
cache-manager.Note: @deeenes, @npalacioescat. Could you please complete the README?.