Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codespellrc
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature/improvement proposal
about: Propose a new feauture or improvement for Read the Docs
about: Propose a new feature or improvement for Read the Docs
---

## What's the problem this feature will solve?
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Read the Docs developement guide for AI agents
# Read the Docs development guide for AI agents

Follow the instructions from https://github.com/readthedocs/common/blob/main/.github/copilot-instructions.md.
2 changes: 1 addition & 1 deletion common
2 changes: 1 addition & 1 deletion docs/user/custom-script.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ then subscribe to the event for future updates (for example, when the URL change
}

// After that, we subscribe to the Read the Docs Addons event to access data
// on future dispatchs (e.g. when a URL changes on a SPA)
// on future dispatches (e.g. when a URL changes on a SPA)
document.addEventListener("readthedocs-addons-data-ready", function (event) {
handleReadTheDocsData(event.detail.data());
});
2 changes: 1 addition & 1 deletion docs/user/img/screenshots/business.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
output: business-project-manual-team-select.png

# Project manual creation form, have to submit with a team first. The JS looks
# funny becuase Playwright needs to wait for the page to load before submitting.
# funny because Playwright needs to wait for the page to load before submitting.
- url: https://app.readthedocs.com/dashboard/import/manual/
javascript: |-
const _submit = () => {
Expand Down
6 changes: 3 additions & 3 deletions readthedocs/api/v2/views/model_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def get_queryset(self):
If an API key is present, we filter by the project associated with the key.
Otherwise, we filter using our API manager method.

With this we check if the user/api key is authorized to acccess the object.
With this we check if the user/api key is authorized to access the object.
"""
api_key = getattr(self.request, "build_api_key", None)
if api_key:
Expand Down Expand Up @@ -263,7 +263,7 @@ def get_serializer_class(self):
"""
Return the proper serializer for UI and Admin.

This ViewSet has a sligtly different pattern since we want to
This ViewSet has a slightly different pattern since we want to
pre-process the `command` field before returning it to the user, and we
also want to have a specific serializer for admins.
"""
Expand Down Expand Up @@ -455,7 +455,7 @@ class NotificationViewSet(DisableListEndpoint, CreateModelMixin, UserSelectViewS

This endpoint is currently used only internally by the builder.
Notifications are attached to `Build` objects only when using this endpoint.
This limitation will change in the future when re-implementing this on APIv3 if neeed.
This limitation will change in the future when re-implementing this on APIv3 if needed.
"""

parser_classes = [JSONParser, MultiPartParser]
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/api/v3/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class HasEmbedAPIAccess(BasePermission):
"""
Check if the project being accessed has access to the Embed API.

The embedded API V3 allows getting content from external sites tha
The embedded API V3 allows getting content from external sites that
aren't attached to a project. Those sites are restricted to the ones
from ``RTD_EMBED_API_EXTERNAL_DOMAINS``, so we just allow that.
"""
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/api/v3/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def _validate_remote_repository(self, data):
Validate connection between `Project` and `RemoteRepository`.

We don't do anything in community, but we do ensure this relationship
is posible before creating the `Project` on commercial when the
is possible before creating the `Project` on commercial when the
organization has VCS SSO enabled.

If we cannot ensure the relationship here, this method should raise a
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/builds/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def send_build_status(build_pk, commit, status):
:param status: build status failed, pending, or success to be sent.
"""
build = Build.objects.filter(pk=build_pk).select_related("version").first()
# Bulds without a verion shouldn't send status, it can happen when
# Builds without a version shouldn't send status, it can happen when
# a build from a deleted version is being processed (race condition).
if not build or not build.version:
return
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/builds/version_slug.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def generate_version_slug(source):
ok=ok_chars,
space_replacement="-",
)
# Remove first character wile it's an invalid character for the beginning of the slug.
# Remove first character while it's an invalid character for the beginning of the slug.
slugified = slugified.lstrip(ok_chars)
return slugified

Expand Down
2 changes: 1 addition & 1 deletion readthedocs/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def validate_doc_types(self):
Validates that the user only have one type of documentation.

This should be called before validating ``sphinx`` or ``mkdocs`` to
avoid innecessary validations.
avoid unnecessary validations.
"""
with self.catch_validation_error("."):
if "sphinx" in self._raw_config and "mkdocs" in self._raw_config:
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/config/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
body=_(
textwrap.dedent(
"""
The name of the package <code>{{pacakge}}</code> is invalid.
The name of the package <code>{{package}}</code> is invalid.
Comment thread
humitos marked this conversation as resolved.
"""
).strip(),
),
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ def clear_cache():
"""
# Code run before each test
yield
# Code run afer each test
# Code run after each test
cache.clear()
2 changes: 1 addition & 1 deletion readthedocs/core/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def get_filterset(self, **kwargs):
:param kwargs: Arguments to pass to ``FilterSet.__init__``
"""
# This method overrides the method from FilterMixin with differing
# arguments. We can switch this later if we ever resturcture the view
# arguments. We can switch this later if we ever restructure the view
# pylint: disable=arguments-differ
if not getattr(self, "filterset", None):
filterset_class = self.get_filterset_class()
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NullCharactersMiddleware:
when trying to save the content containing a NULL character into the
database, producing a 500 and creating an event in Sentry.

NULL characters are also used as an explotation technique, known as "Null Byte Injection".
NULL characters are also used as an exploitation technique, known as "Null Byte Injection".
"""

def __init__(self, get_response):
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def extract_valid_attributes_for_model(model, attributes):
attributes = attributes.copy()
valid_field_names = {field.name for field in model._meta.get_fields()}
valid_attributes = {}
# We can't change a dictionary while interating over its keys,
# We can't change a dictionary while iterating over its keys,
# so we make a copy of its keys.
keys = list(attributes.keys())
for key in keys:
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/utils/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def safe_rmtree(path, *args, **kwargs):
"""
Wrapper around shutil.rmtree to check for symlinks.

shutil.rmtree doens't follow symlinks by default,
shutil.rmtree doesn't follow symlinks by default,
this function just logs in case users are trying to use symlinks.
https://docs.python.org/3/library/shutil.html#shutil.rmtree

Expand Down
8 changes: 4 additions & 4 deletions readthedocs/doc_builder/backends/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, *args, **kwargs):
# `absolute_host_output_dir` because it's not defined in the host. So,
# we have to re-calculate its value. We will remove this limitation
# when we execute the whole building from inside the Docker container
# (instead behing a hybrid as it is now)
# (instead being a hybrid as it is now)
#
# We need to have two different paths that point to the exact same
# directory. How is that? The directory is mounted into a different
Expand Down Expand Up @@ -96,7 +96,7 @@ def __init__(self, *args, **kwargs):
#
# IMO, if there are multiple config files,
# the build should fail immediately communicating this to the user.
# This can be achived by unhandle the exception here
# This can be achieved by unhandle the exception here
# and leaving `on_failure` Celery handle to deal with it.
#
# In case there is no config file, we should continue the build
Expand Down Expand Up @@ -157,7 +157,7 @@ def build(self):
f"language={language}",
# Sphinx's source directory (SOURCEDIR).
# We are executing this command at the location of the `conf.py` file (CWD).
# TODO: ideally we should execute it from where the repository was clonned,
# TODO: ideally we should execute it from where the repository was cloned,
# but that could lead unexpected behavior to some users:
# https://github.com/readthedocs/readthedocs.org/pull/9888#issuecomment-1384649346
".",
Expand Down Expand Up @@ -326,7 +326,7 @@ def build(self):
f"language={language}",
# Sphinx's source directory (SOURCEDIR).
# We are executing this command at the location of the `conf.py` file (CWD).
# TODO: ideally we should execute it from where the repository was clonned,
# TODO: ideally we should execute it from where the repository was cloned,
# but that could lead unexpected behavior to some users:
# https://github.com/readthedocs/readthedocs.org/pull/9888#issuecomment-1384649346
".",
Expand Down
8 changes: 4 additions & 4 deletions readthedocs/doc_builder/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def create_environment(self):
return

# If the builder is generic, we have nothing to do here,
# as the commnads are provided by the user.
# as the commands are provided by the user.
if self.data.config.doctype == GENERIC:
return

Expand All @@ -369,7 +369,7 @@ def install(self):
return

# If the builder is generic, we have nothing to do here,
# as the commnads are provided by the user.
# as the commands are provided by the user.
if self.data.config.doctype == GENERIC:
return

Expand Down Expand Up @@ -675,7 +675,7 @@ def install_build_tools(self):
]
):
# We cap setuptools to avoid breakage of projects
# relying on setup.py invokations,
# relying on setup.py invocations,
# see https://github.com/readthedocs/readthedocs.org/issues/8659
setuptools_version = (
"setuptools<58.3.0"
Expand Down Expand Up @@ -708,7 +708,7 @@ def build_docs_class(self, builder_class):
process.
"""
# If the builder is generic, we have nothing to do here,
# as the commnads are provided by the user.
# as the commands are provided by the user.
if builder_class == GENERIC:
return

Expand Down
4 changes: 2 additions & 2 deletions readthedocs/doc_builder/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def save(self, api_client):
# TODO don't do this, address builds restarting instead.
# We try to post the buildcommand again as a temporary fix
# for projects that restart the build process. There seems to be
# something that causes a 404 during `patch()` in some biulds,
# something that causes a 404 during `patch()` in some builds,
# so we assume retrying `post()` for the build command is okay.
log.exception("Build command has an id but doesn't exist in the database.")
resp = api_client.command.post(data)
Expand Down Expand Up @@ -457,7 +457,7 @@ class BaseBuildEnvironment:
:param version: Project version that is being built
:param build: Build instance
:param environment: shell environment variables
:param record: whether or not record a build commands in the databse via
:param record: whether or not record a build commands in the database via
the API. The only case where we want this to be `False` is when
instantiating this class from `sync_repository_task` because it's a
background task that does not expose commands to the user.
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/integrations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def get_absolute_url(self) -> str | None:
projects we show a link in the UI to the GHA installation page for the
installation used by the project.
"""
# If the GHA is disconnected we'll disonnect the remote repository and
# If the GHA is disconnected we'll disconnect the remote repository and
# so we won't have a URL to the installation page the project should be
# using. We might want to store this on the model later so a repository
# that is removed from the installation can still link to the
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/notifications/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def get_rendered_body(self):
),
Message(
id=BuildUserError.BUILD_OUTPUT_OLD_DIRECTORY_USED,
header=_("Your project is outputing files in an old directory"),
header=_("Your project is outputting files in an old directory"),
body=_(
textwrap.dedent(
"""
Expand Down
4 changes: 2 additions & 2 deletions readthedocs/notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Notification(TimeStampedModel):
message_id = models.CharField(max_length=128)

# UNREAD: the notification was not shown to the user
# READ: the notifiation was shown
# READ: the notification was shown
# DISMISSED: the notification was shown and the user dismissed it
# CANCELLED: removed automatically because the user has done the action required (e.g. paid the subscription)
state = models.CharField(
Expand All @@ -37,7 +37,7 @@ class Notification(TimeStampedModel):
db_index=True,
)

# Makes the notification imposible to dismiss (useful for Build notifications)
# Makes the notification impossible to dismiss (useful for Build notifications)
dismissable = models.BooleanField(default=False)

# Show the notification under the bell icon for the user
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/organizations/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def test_filtered_queryset_team_invalid_choice(self, user, organization):
indirect=True,
)
def test_team_filter_choices(self, user, organization, teams):
"""Team filter choices limited to organization teams with permisisons."""
"""Team filter choices limited to organization teams with permissions."""
filter = self.get_filterset_for_user(
user,
organization=organization,
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/organizations/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_add_fresh_member_by_email(self):
def test_add_duplicate_invite_by_email(self):
"""Add duplicate invite by email."""
self.assertEqual(self.organization.teams.count(), 1)
email = "non-existant@example.com"
email = "non-existent@example.com"

self.assertEqual(Invitation.objects.all().count(), 0)

Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ def _check_for_suspicious_cname(self, domain):

# If the domain has a CNAME pointing to the APEX domain, that's not good.
# This check isn't perfect, but it's a good enoug heuristic
# to dectect CNAMES like www.example.com -> example.com.
# to detect CNAMES like www.example.com -> example.com.
if f"{domain}.".endswith(f".{cname}"):
raise forms.ValidationError(
_(
Expand Down
4 changes: 2 additions & 2 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def get_downloads(self, resolver=None):

@property
def clean_repo(self):
# NOTE: this method is used only when the project is going to be clonned.
# NOTE: this method is used only when the project is going to be cloned.
# It probably makes sense to do a data migrations and force "Import Project"
# form to validate it's an HTTPS URL when importing new ones
if self.repo.startswith("http://github.com"):
Expand Down Expand Up @@ -1279,7 +1279,7 @@ def update_latest_version(self):
# default_branch can be a tag or a branch name!
default_version_name = self.get_default_branch(fallback_to_vcs=False)
# If the default_branch is not set, it means that the user
# wants to use the default branch of the respository, but
# wants to use the default branch of the repository, but
# we don't know what that is here, `latest` will be updated
# on the next build.
if not default_version_name:
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/tasks/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _get_indexers(
indexers = []
# NOTE: The search indexer must be before the index file indexer.
# This is because saving the objects in the DB will give them an id,
# and we neeed this id to be `None` when indexing the objects in ES.
# and we need this id to be `None` when indexing the objects in ES.
# ES will generate a unique id for each document.
# NOTE: We don't create a search indexer for:
# - External versions
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/version_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def sort_versions(version_list):

:returns: sorted list in descending order (latest version first) of versions

:rtype: list(tupe(readthedocs.builds.models.Version,
:rtype: list(tuple(readthedocs.builds.models.Version,
packaging.version.Version))
"""
versions = []
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ProjectSpamMixin:

def is_show_dashboard_denied_wrapper(self, project):
"""
Determine if the project has reached dashboard denied treshold.
Determine if the project has reached dashboard denied threshold.

This function is wrapped just for testing purposes,
so we are able to mock it from outside.
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/proxito/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def add_cors_headers(self, request, response):
"""
# TODO: se should add these headers to files from docs only,
# proxied APIs and other endpoints should not have CORS headers.
# These attributes aren't currently set for proxied APIs, but we shuold
# These attributes aren't currently set for proxied APIs, but we should
# find a better way to do this.
project_slug = getattr(request, "path_project_slug", "")
version_slug = getattr(request, "path_version_slug", "")
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/proxito/tests/test_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_external_version_serving_old_slugs(self):
"""
Test external version serving with projects with `--` in their slug.

Some old projects may have been created with a slug containg `--`,
Some old projects may have been created with a slug containing `--`,
our current code doesn't allow these type of slugs.
"""
fixture.get(
Expand Down
Loading