| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Before, we had an N+1 query, where each tag would be separately fetched
and updated. Instead, first delete any tags we no longer care about,
then perform an upsert of all fields except for `last_commit`, which we
want to keep from the existing tag.
This comes with one caveat: on the first update of the tags, the `tags`
list is no longer modified in-place, because mutation is bad, however,
the database state is updated accordingly.
|
| |
|
|
|
|
| |
Closes #963.
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes a problem where running the unit tests successively a lot
would result in 403 ratelimit exceeded errors being thrown due to the
GitHub API being called by the app.
Fixes #918
Co-authored-by: wookie184 <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a temporary directory to manage our resource tests instead of
reyling on pyfakefs to mock it away for us. This also makes the code
more portable: all we need now is a way to create a temporary directory.
`pathlib` mostly abstracts away the other parts for us. Since we're
well-behaved, we clean up the temporary directory at the end of the
Python interpreter's life using `atexit` and `shutil.rmtree`.
This PR was written and tested with Python 3.9 which required some hacks
in `pyproject.toml` to make it work, it may require re-locking if CI
throws up.
Closes #679.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
# Conflicts:
# poetry.lock
# pydis_site/settings.py
# pyproject.toml
|
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
Renames the tag model `author` field to `authors` to better indicate
what's contained in the field, and updates the documentation.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The URLs can be simply constructed using the other tag properties, so
they were removed from the database in favor of a property.
A group field was also added to support tags within groups.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|/
|
|
| |
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
|
|
|
|
| |
Fixes a test that fails on Windows due to differing path separators.
This is currently the only failing test.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
macOS uses `/var/...` as its temp directory, causing issues with the
hardcoded usage of `/tmp` as the temporary directory. Therefore,
relying on tmp is not portable.
Populating the true temporary directory is redundant and may cause more
problems because of nested directories. Move the fake content under a
subdirectory to avoid this issue.
Co-authored-by: MarkKoz <[email protected]>
|
|
|
|
|
|
| |
This allows us to keep filenames (thus URLs) as concise as possible,
while having a more descriptive entry in the Sub-Articles dropdown for
category pages.
|
|
|
|
|
| |
This was causing mysterious 404s because while migrating a feature to
dewikification, the same variable would be placed in the settings file.
|
|
|
|
|
| |
This only shows when the page is also a category, since regular pages
have no children and regular categories already list their children.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The tests uses pyfakefs to simulate a fake filesystem that is reused
over the content app tests.
Test coverage for the app is brought to 100%.
|
|
|
|
|
| |
Given that there is no "long description", just `description` conveys
the same information with brevity.
|
| |
|
|
|
|
|
|
| |
Articles was a good name, but we want an `articles` category in
the future. `/pages/guides/` and `/pages/articles/` are clearer in name
than `/articles/guides/` and `/articles/articles/`.
|
|
|
|
|
| |
This feature is still under implementation debate, so it will be further
discussed in another issue and implemeneted in a future PR.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
As this system will be used for more than just guides,
I had to do some refactoring to match this system with plans.
Basically now there isn't guides, but articles instead.
|