-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from readthedocs/migrate-embedding
Remove embedding code from public repo
- Loading branch information
Showing
18 changed files
with
249 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
"""Backends for analyzing URLs for keywords and topics.""" | ||
from .eatopics import EthicalAdsTopicsBackend # noqa | ||
from .naive import NaiveKeywordAnalyzerBackend # noqa | ||
from .st import SentenceTransformerAnalyzerBackend # noqa | ||
from .textacynlp import TextacyAnalyzerBackend # noqa |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ | |
"utm_label", | ||
"utm_keyword", | ||
"utm_content", | ||
"utm_term", | ||
"ref", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# Generated by Django 4.2.11 on 2024-03-20 20:25 | ||
import django.db.models.deletion | ||
import django_extensions.db.fields | ||
import jsonfield.fields | ||
import pgvector.django | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
import adserver.analyzer.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("adserver", "0093_publisher_ignore_mobile_traffic"), | ||
("adserver_analyzer", "0004_add_embeddings"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="AnalyzedAdvertiserUrl", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"created", | ||
django_extensions.db.fields.CreationDateTimeField( | ||
auto_now_add=True, verbose_name="created" | ||
), | ||
), | ||
( | ||
"modified", | ||
django_extensions.db.fields.ModificationDateTimeField( | ||
auto_now=True, verbose_name="modified" | ||
), | ||
), | ||
( | ||
"url", | ||
models.URLField( | ||
db_index=True, | ||
help_text="URL of the page being analyzed after certain query parameters are stripped away", | ||
max_length=1024, | ||
), | ||
), | ||
( | ||
"keywords", | ||
jsonfield.fields.JSONField( | ||
blank=True, | ||
null=True, | ||
validators=[adserver.analyzer.validators.KeywordsValidator()], | ||
verbose_name="Keywords for this URL", | ||
), | ||
), | ||
( | ||
"last_analyzed_date", | ||
models.DateTimeField( | ||
blank=True, | ||
db_index=True, | ||
default=None, | ||
help_text="Last time the ad server analyzed this URL", | ||
null=True, | ||
), | ||
), | ||
( | ||
"title", | ||
models.TextField( | ||
blank=True, | ||
default=None, | ||
null=True, | ||
verbose_name="Title of the page", | ||
), | ||
), | ||
( | ||
"description", | ||
models.TextField( | ||
blank=True, | ||
default=None, | ||
null=True, | ||
verbose_name="Description of the page", | ||
), | ||
), | ||
( | ||
"embedding", | ||
pgvector.django.VectorField( | ||
blank=True, default=None, dimensions=384, null=True | ||
), | ||
), | ||
( | ||
"advertiser", | ||
models.ForeignKey( | ||
help_text="Advertiser with the URL", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="adserver.advertiser", | ||
), | ||
), | ||
], | ||
options={ | ||
"unique_together": {("url", "advertiser")}, | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name="analyzedurl", | ||
name="description", | ||
field=models.TextField( | ||
blank=True, | ||
default=None, | ||
null=True, | ||
verbose_name="Description of the page", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="analyzedurl", | ||
name="title", | ||
field=models.TextField( | ||
blank=True, default=None, null=True, verbose_name="Title of the page" | ||
), | ||
), | ||
migrations.DeleteModel( | ||
name="HistoricalAnalyzedUrl", | ||
), | ||
] |
Oops, something went wrong.