Instruction
stringlengths
13
145k
input_code
stringlengths
35
390k
output_code
stringlengths
35
390k
Set `nomad_job_id` for compendia jobs ### Context I was trying to look for a compendia processor job where I only had the `nomad_job_id` ### Problem or idea Looks like we don't set the `nomad_job_id` for the compendia processor jobs ```sql $ select * from processor_jobs where pipeline_applied='COMPENDIA' a...
common/data_refinery_common/utils.py <|code_start|>import csv import hashlib import io import os import re from functools import partial from itertools import groupby from typing import Dict, Set from urllib.parse import urlparse import nomad import requests from django.conf import settings from django.core.exceptions ...
common/data_refinery_common/utils.py <|code_start|>import csv import hashlib import io import os import re from functools import partial from itertools import groupby from typing import Dict, Set from urllib.parse import urlparse import nomad import requests from django.conf import settings from django.core.exceptions ...
[HOTFIX] Prevent compendia jobs from getting cleaned up and fix QN jobs ## Issue Number #1728 #1726 #1727
foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py <|code_start|>import sys from django.core.management.base import BaseCommand from data_refinery_common.job_lookup import ProcessorPipeline from data_refinery_common.logging import get_and_configure_logger from data_refinery_common.message_q...
foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py <|code_start|>import sys from django.core.management.base import BaseCommand from data_refinery_common.job_lookup import ProcessorPipeline from data_refinery_common.logging import get_and_configure_logger from data_refinery_common.message_q...
API Stats include timestamp of last broken cache ### Context Our database has a 10 minute cache. ### Problem or idea It'd be nifty to be able to look at the stats endpoint response and figure out when it was last busted. ### Solution or next step Include that timestamp.
api/data_refinery_api/views.py <|code_start|>from datetime import timedelta, datetime import requests import nomad from typing import Dict from itertools import groupby from re import match from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, Prefetch...
api/data_refinery_api/views.py <|code_start|>from datetime import timedelta, datetime import requests import nomad from typing import Dict from itertools import groupby from re import match from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, Prefetch...
Improve docs and make deploy.sh easier to invoke correctly ## Issue Number I don't think there's one that's quite specific to the types of documentation improvements this introduces. ## Purpose/Implementation Notes Our README was getting behind. This brings it up to date and makes the deploy process easier to ...
api/data_refinery_api/views.py <|code_start|>from datetime import timedelta, datetime import requests import nomad from typing import Dict from itertools import groupby from re import match from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, Prefetch...
api/data_refinery_api/views.py <|code_start|>from datetime import timedelta, datetime import requests import nomad from typing import Dict from itertools import groupby from re import match from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, Prefetch...
Create command to delete invalid compendias ### Context https://github.com/AlexsLemonade/refinebio/pull/1734 Compendia need a QN target so they can be quantile normalized. We need 100 samples on the sample platform to create a QN target. Therefore any organisms without 100 samples on the same platform should be i...
common/data_refinery_common/models/models.py <|code_start|>import hashlib import io import os import shutil import pytz import uuid import boto3 from botocore.client import Config from datetime import datetime from functools import partial from typing import Dict, Set from django.db.models import Count, Prefetch, Da...
common/data_refinery_common/models/models.py <|code_start|>import hashlib import io import os import shutil import pytz import uuid import boto3 from botocore.client import Config from datetime import datetime from functools import partial from typing import Dict, Set from django.db.models import Count, Prefetch, Da...
Quantpendia doesn't seem to run ### Context Just triggered the quantpendia job for Danio ### Problem or idea It doesn't seem to have started: ``` ubuntu@ip-10-0-80-121:~$ ./run_management_command.sh create_compendia --organisms=DANIO_RERIO --quant-sf-only=True --svd-algorithm=None fd6293be1671e7c5ebf63a96...
common/data_refinery_common/message_queue.py <|code_start|>"""Provides an interface to send messages to the Message Queue.""" from __future__ import absolute_import, unicode_literals import nomad from django.conf import settings from enum import Enum from nomad.api.exceptions import URLNotFoundNomadException from da...
common/data_refinery_common/message_queue.py <|code_start|>"""Provides an interface to send messages to the Message Queue.""" from __future__ import absolute_import, unicode_literals import nomad from django.conf import settings from enum import Enum from nomad.api.exceptions import URLNotFoundNomadException from da...
Quantpendia failed to upload to S3 ### Context We kicked off quantpendia jobs for all organisms but they weren't succeeding because they couldn't upload to S3. ### Problem or idea This is probably just because the worker instances don't have access to the compendia S3 bucket. The smasher probably has those per...
workers/data_refinery_workers/processors/create_quantpendia.py <|code_start|>import os import logging import shutil import time from django.utils import timezone from typing import Dict, List, Tuple import psutil from data_refinery_common.job_lookup import PipelineEnum from data_refinery_common.logging import get_and_...
workers/data_refinery_workers/processors/create_quantpendia.py <|code_start|>import os import logging import shutil import time from django.utils import timezone from django.conf import settings from typing import Dict, List, Tuple import psutil from data_refinery_common.job_lookup import PipelineEnum from data_refine...
Extend processor exception classes to include additional arbitrary context ### Context #1843 is dope. However right now those exceptions can only be used to log the job id. If we wanted to log a sample accession or what have you, we couldn't do it as it is. ### Problem or idea We've created some new exception ...
workers/data_refinery_workers/processors/utils.py <|code_start|>import os import random import shutil import signal import string import subprocess import sys import yaml from django.conf import settings from django.utils import timezone from typing import List, Dict, Callable from data_refinery_common.job_lookup imp...
workers/data_refinery_workers/processors/utils.py <|code_start|>import os import random import shutil import signal import string import subprocess import sys import yaml from django.conf import settings from django.utils import timezone from typing import List, Dict, Callable from data_refinery_common.job_lookup imp...
Quantpendia command timmed out for MUS_MUSCULUS Error: ``` ubuntu@ip-10-0-127-71:~$ docker logs inspiring_goldberg 2019-11-11 22:18:45,252 i-04bb28b499152d24f [volume: -1] data_refinery_foreman.foreman.management.commands.create_quantpendia INFO [organism: HOMO_SAPIENS] [job_id: 29380081]: Sending compendia job fo...
foreman/data_refinery_foreman/foreman/management/commands/create_quantpendia.py <|code_start|>import sys from django.core.management.base import BaseCommand from data_refinery_common.job_lookup import ProcessorPipeline from data_refinery_common.logging import get_and_configure_logger from data_refinery_common.message...
foreman/data_refinery_foreman/foreman/management/commands/create_quantpendia.py <|code_start|>import sys import time from django.core.management.base import BaseCommand from data_refinery_common.job_lookup import ProcessorPipeline from data_refinery_common.logging import get_and_configure_logger from data_refinery_co...
Add the biggest `failure_reason` to the dashboard? ### Context I have been debugging some sample processing errors. ### Problem or idea I think it would be useful to have a list of the top failure reasons and the number of samples that they affect. I'm not sure if the dashboard is a good place for this. ```...
api/data_refinery_api/urls.py <|code_start|>from rest_framework.routers import DefaultRouter from django.conf.urls import url, include from django.conf import settings from django.contrib import admin from django.urls import include, path from rest_framework.views import APIView from rest_framework.response import Resp...
api/data_refinery_api/urls.py <|code_start|>from rest_framework.routers import DefaultRouter from django.conf.urls import url, include from django.conf import settings from django.contrib import admin from django.urls import include, path from rest_framework.views import APIView from rest_framework.response import Resp...
Compendium Missing Generated File ### Context `RATTUS_NORVEGICUS/rattus_norvegicus.tsv` is missing. <img width="832" alt="Screen Shot 2019-11-27 at 10 29 50 PM" src="https://user-images.githubusercontent.com/1075609/69775087-ae306e00-1165-11ea-9a64-1035c56ea079.png"> ### Problem or idea This should be inclu...
workers/data_refinery_workers/processors/create_compendia.py <|code_start|>import logging import os import shutil import time import itertools from typing import Dict from django.utils import timezone from django.db.models import Q, Count from fancyimpute import IterativeSVD import numpy as np import pandas as pd impo...
workers/data_refinery_workers/processors/create_compendia.py <|code_start|>import logging import os import shutil import time import itertools from typing import Dict from django.utils import timezone from django.db.models import Q, Count from fancyimpute import IterativeSVD import numpy as np import pandas as pd impo...
Record which samples end up making it into a compendia ### Context As we build compendia we drop some samples that aren't suitable for various reasons. However the only record in our database that tracks what samples are in it is the dataset object which has every sample including those that get dropped. ### Prob...
workers/data_refinery_workers/processors/create_compendia.py <|code_start|>import logging import os import shutil import time import itertools from typing import Dict from django.utils import timezone from django.db.models import Q, Count from fancyimpute import IterativeSVD import numpy as np import pandas as pd impo...
workers/data_refinery_workers/processors/create_compendia.py <|code_start|>import logging import os import shutil import time import itertools from typing import Dict from django.utils import timezone from django.db.models import Q, Count from fancyimpute import IterativeSVD import numpy as np import pandas as pd impo...
Smasher jobs don't mark datasets as failures when they fail ### Context There's a couple places in the smasher code where we delay failing the job so that the job can make it to the `_notify()` function so it can let the user know that their dataset failed to process. ### Problem or idea The job eventually get...
workers/data_refinery_workers/processors/smasher.py <|code_start|># -*- coding: utf-8 -*- import boto3 import csv import os import rpy2 import rpy2.robjects as ro import shutil import simplejson as json import string import warnings import requests import psutil import logging import time from botocore.exceptions imp...
workers/data_refinery_workers/processors/smasher.py <|code_start|># -*- coding: utf-8 -*- import boto3 import csv import os import rpy2 import rpy2.robjects as ro import shutil import simplejson as json import string import warnings import requests import psutil import logging import time from botocore.exceptions imp...
Too many emails when dataset fails to smash ### Context I tried to download a dataset from refine.bio which failed. (Nov 19, 20) ### Problem or idea I received 5 emails that day and 4 of them in a span of 20 minutes, all with the same failure reason. For another one, I tried to download I got 3 emails in a span...
workers/data_refinery_workers/processors/smasher.py <|code_start|># -*- coding: utf-8 -*- import boto3 import csv import os import rpy2 import rpy2.robjects as ro import shutil import simplejson as json import string import warnings import requests import psutil import logging import time from botocore.exceptions imp...
workers/data_refinery_workers/processors/smasher.py <|code_start|># -*- coding: utf-8 -*- import boto3 import csv import os import rpy2 import rpy2.robjects as ro import shutil import simplejson as json import string import warnings import requests import psutil import logging import time from botocore.exceptions imp...
Transcriptome indices won't make both long and short versions ### Context I'm pretty sure this is an issue that should affect prod. I saw it locally as part of #2035. While I did get transcriptome indices made successfully, I didn't look hard enough and it appears that only one of the two jobs succeeded because afte...
foreman/data_refinery_foreman/surveyor/transcriptome_index.py <|code_start|>import re import urllib from abc import ABC from django.utils import timezone from typing import List, Dict from data_refinery_common.job_lookup import ProcessorPipeline, Downloaders from data_refinery_common.logging import get_and_configure_...
foreman/data_refinery_foreman/surveyor/transcriptome_index.py <|code_start|>import csv import re import shutil import urllib from abc import ABC from typing import List, Dict from data_refinery_common.job_lookup import Downloaders from data_refinery_common.logging import get_and_configure_logger from data_refinery_co...
Engagement bot has gone away ### Problem or idea Engagement bot hasn't been posting since 27th Dec ### Solution or next step Fix the engagement bot
api/data_refinery_api/views.py <|code_start|>from datetime import timedelta, datetime import requests import nomad from typing import Dict from itertools import groupby from re import match from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, Prefetch...
api/data_refinery_api/views.py <|code_start|>from datetime import timedelta, datetime import requests import nomad from typing import Dict from itertools import groupby from re import match from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, Prefetch...
Processing info: Sample is not available but only tximport is run on it Ex: https://www.refine.bio/experiments/SRP074593/gene-expression-profiling-of-drosophila-s2r-cells-following-rnai-mediated-knockdown-of-transcription-factors ![Screen Shot 2020-01-03 at 2 58 39 PM](https://user-images.githubusercontent.com/1531...
common/data_refinery_common/models/models.py <|code_start|>import os import shutil import uuid from typing import Set from django.conf import settings from django.contrib.postgres.fields import ArrayField, JSONField from django.db import models, transaction from django.db.models import Count, DateTimeField, Prefetch f...
common/data_refinery_common/models/models.py <|code_start|>import hashlib import io import os import shutil import uuid from datetime import datetime from functools import partial from typing import Dict, Set from django.conf import settings from django.contrib.postgres.fields import ArrayField, JSONField from django....
Processing info: Sample is not available but only tximport is run on it Ex: https://www.refine.bio/experiments/SRP074593/gene-expression-profiling-of-drosophila-s2r-cells-following-rnai-mediated-knockdown-of-transcription-factors ![Screen Shot 2020-01-03 at 2 58 39 PM](https://user-images.githubusercontent.com/1531...
common/data_refinery_common/migrations/0052_remove_invalid_tximport_associations.py <|code_start|><|code_end|>
common/data_refinery_common/migrations/0052_remove_invalid_tximport_associations.py <|code_start|>from django.db import migrations def remove_tximport_invalid_associations(apps, schema_editor): """ We were associating tximport with all samples in an experiment even though some of them were unprocessed. Re...
Engagement bot summary doesn't seem to be working ### Context https://github.com/AlexsLemonade/refinebio/issues/2140 ### Problem or idea Tested today and reported no downloads in the last 7 days. > **EngagementBot** > There were no downloads in the last 7 days. However there were a few that should have ...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import requests from data_refinery_common.models import DatasetAnnotation class Command(BaseComman...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import requests from data_refinery_common.models import DatasetAnnotation class Command(BaseComman...
Engagement bot thinks every user is a returning user ### Context https://alexslemonade.slack.com/archives/CRK42AL1Y/p1587988808265500 ### Problem or idea @dvenprasad says 6 of those are new users. There must be a bug in the queries it uses or something. ### Solution or next step Fix the engagement bot so...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import requests from data_refinery_common.models import DatasetAnnotation class Command(BaseComman...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import requests from data_refinery_common.models import DatasetAnnotation class Command(BaseComman...
Store locations from where our users download data ### Context https://github.com/AlexsLemonade/refinebio/pull/2216#discussion_r401233850 ### Problem or idea Our engagement bot only stores IPs from the users, but we are also interested in their locations which can change over the years. ### Solution or next...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import requests from data_refinery_common.models import DatasetAnnotation class Command(BaseComman...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import requests from data_refinery_common.models import DatasetAnnotation class Command(BaseComman...
There are two Illumina HiSeq 2000 platforms <img width="259" alt="Screen_Shot_2020-05-05_at_3_37_37_PM" src="https://user-images.githubusercontent.com/15315514/81108350-93b5aa00-8ee6-11ea-98b1-8c572d59cb4d.png"> Are they the same thing? It's confusing.
common/data_refinery_common/migrations/0057_fix_platform_accessions_spaces.py <|code_start|><|code_end|>
common/data_refinery_common/migrations/0057_fix_platform_accessions_spaces.py <|code_start|>from django.db import migrations from django.utils import timezone from data_refinery_common.utils import get_supported_rnaseq_platforms def remove_spaces_from_platform_accessions(apps, schema_editor): Sample = apps.get_m...
We should be able to detect more than one p-value column in our Illumina pipeline ### Context #2275 ### Problem or idea It looks like right now we only detect one p-value column for each Illumina sample (under certain conditions), which causes some samples to fail processing. ### Solution or next step M...
foreman/data_refinery_foreman/foreman/main.py <|code_start|>import datetime import random import socket import sys import time import traceback from typing import List from django.conf import settings from django.db.models.expressions import Q from django.utils import timezone import nomad from nomad import Nomad fro...
foreman/data_refinery_foreman/foreman/main.py <|code_start|>import datetime import random import socket import sys import time import traceback from typing import List from django.conf import settings from django.db.models.expressions import Q from django.utils import timezone import nomad from nomad import Nomad fro...
Validate that samples added to the dataset are downloadable ### Context We allow datasets like [this](https://www.refine.bio/dataset/98e449b3-b485-4786-8529-79dc50e4cd5b) to be created. ### Problem or idea This dataset has *at least one experiment* and it also has *at least one sample per experiment*, but it s...
api/data_refinery_api/serializers.py <|code_start|>from collections import defaultdict from django.db.models import Count, Q from rest_framework import serializers import boto3 from django_elasticsearch_dsl_drf.serializers import DocumentSerializer from data_refinery_common.models import ( APIToken, Compendi...
api/data_refinery_api/serializers.py <|code_start|>from collections import defaultdict from django.db.models import Count, Q from rest_framework import serializers import boto3 from django_elasticsearch_dsl_drf.serializers import DocumentSerializer from data_refinery_common.models import ( APIToken, Compendi...
Make the dataset API simpler to use ### Context Pairing with @kurtwheeler on the email validation code for the dataset endpoint this morning ### Problem or idea @kurtwheeler pointed out that there is no good reason why we have to start the datset using a PUT request, except that is how we do it on the frontend...
api/data_refinery_api/urls.py <|code_start|>from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.urls import include, path from django.views.generic import RedirectView from rest_framework import permissions from drf_yasg import openapi from drf_yasg.views impo...
api/data_refinery_api/urls.py <|code_start|>from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.urls import include, path from django.views.generic import RedirectView from rest_framework import permissions from drf_yasg import openapi from drf_yasg.views impo...
Make the response for non-downloadable samples more programmer-friendly ### Context Right now the message is a string with an error message and accession codes inside of it. ### Problem or idea We don't want users to have to parse the error message to get the accessions they need to remove from their dataset. ### S...
api/data_refinery_api/views/dataset.py <|code_start|>## # Contains CreateDatasetView and DatasetView ## from collections import defaultdict from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from rest_framework import filters, generics, serializers from drf_yasg impor...
api/data_refinery_api/views/dataset.py <|code_start|>## # Contains CreateDatasetView and DatasetView ## from collections import defaultdict from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from rest_framework import filters, generics, serializers from drf_yasg impor...
Make the token endpoint more programmer-friendly ### Context I was writing up an example of how to create a dataset using the API ### Problem or idea Just like it should only take one request to create a dataset if you have everything ready, I don't see a good reason why we need two requests to create an API t...
api/data_refinery_api/urls.py <|code_start|>from re import match from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.http import JsonResponse from django.urls import include, path from django.views.generic import RedirectView from rest_framework import permiss...
api/data_refinery_api/urls.py <|code_start|>from re import match from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.http import JsonResponse from django.urls import include, path from django.views.generic import RedirectView from rest_framework import permiss...
Dataset validation seems to be broken. ### Context I saw a couple slackbot messages about no smashable files.1 ### Problem or idea Dataset ids: * a71c681e-7dab-4d99-93c7-c43382ef0c72 * 1fd5bca4-c322-4433-ac65-d5d8f616d679 I only looked into 1fd5bca4-c322-4433-ac65-d5d8f616d679 but it had no email address ...
api/data_refinery_api/views/dataset.py <|code_start|>## # Contains DatasetView ## from collections import defaultdict from django.core.exceptions import ValidationError from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from rest_framework import mixins, serializers, v...
api/data_refinery_api/views/dataset.py <|code_start|>## # Contains DatasetView ## from collections import defaultdict from django.core.exceptions import ValidationError from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from rest_framework import filters, generics, mix...
Find a way to assign volume IDs to instances without EBS ### Context https://github.com/AlexsLemonade/refinebio/issues/2254 ### Problem or idea We stopped creating EBS volumes now that we do all of the processing on the SSDs, but now we can only run one instance at once because instances are always assigned vo...
common/data_refinery_common/migrations/0059_auto_20200803_1719.py <|code_start|><|code_end|> common/data_refinery_common/models/jobs/downloader_job.py <|code_start|>from typing import Set from django.db import models from django.utils import timezone from nomad import Nomad from data_refinery_common.models.jobs.job_...
common/data_refinery_common/migrations/0059_auto_20200803_1719.py <|code_start|># Generated by Django 2.2.13 on 2020-08-03 17:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("data_refinery_common", "0058_auto_20200625_1402"), ] operations = [...
Don't fail when detecting column header for illumina sample ### Context We have `4287` samples that failed because we weren't able to find an id column in their headers. For example for sample [GSM2677584](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM2677584) we failed with the error: `Could not find any...
foreman/data_refinery_foreman/surveyor/geo.py <|code_start|>import shutil from re import sub from typing import Dict, List import dateutil.parser import GEOparse from data_refinery_common.enums import Downloaders from data_refinery_common.logging import get_and_configure_logger from data_refinery_common.models import...
foreman/data_refinery_foreman/surveyor/geo.py <|code_start|>import shutil from re import sub from typing import Dict, List import dateutil.parser import GEOparse from data_refinery_common.enums import Downloaders from data_refinery_common.logging import get_and_configure_logger from data_refinery_common.models import...
`/search/` responses contain incorrect information ### Context I found what was causing https://github.com/AlexsLemonade/refinebio-frontend/issues/955 ### Problem or idea Sometimes results returned from `/search/` contain incorrect information, which causes incorrect information like `No Species` to be display...
api/data_refinery_api/views/experiment_document.py <|code_start|>## # Experiment document views ## from django.http import QueryDict from django.utils.decorators import method_decorator from rest_framework import serializers from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer from django_elasticse...
api/data_refinery_api/views/experiment_document.py <|code_start|>## # Experiment document views ## from django.http import QueryDict from django.utils.decorators import method_decorator from rest_framework import serializers from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer from django_elasticse...
Intialize automatic_survey.py command ### Context In the foreman as a sibling next to other accession surveying commands (ie feed_the_beast) we should add a new command called `automatic_survey.py`. This command will be run via cron job should be executed daily. This management command should: - Determine how many s...
foreman/data_refinery_foreman/foreman/management/commands/automatic_survey.py <|code_start|><|code_end|> foreman/data_refinery_foreman/gatherer/agents/base.py <|code_start|>"""Abstract base class for accession gathering automation agents.""" from abc import ABC, abstractmethod from datetime import datetime from http.c...
foreman/data_refinery_foreman/foreman/management/commands/automatic_survey.py <|code_start|>""" Automatic survey command. """ from django.core.management.base import BaseCommand from django.template.defaultfilters import pluralize from django.utils import timezone from dateutil.relativedelta import relativedelta fro...
Add indices to new models for automatic accession gathering ### Context We want to start adding indices to new models that we create. ### Problem or idea _The context should lead to something, an idea or a problem that you’re facing. Put that here._ ### Solution or next step _You can tag others or simply leave i...
common/data_refinery_common/migrations/0072_auto_20220927_2235.py <|code_start|><|code_end|> common/data_refinery_common/models/gathered_accession.py <|code_start|>from datetime import datetime from django.db import models from django.utils import timezone class GatheredAccession(models.Model): """Gathered acces...
common/data_refinery_common/migrations/0072_auto_20220927_2235.py <|code_start|># Generated by Django 3.2.7 on 2022-09-27 22:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("data_refinery_common", "0071_gatheredaccession"), ] operations = [ ...
Duplicate Sample Accessions Breaks Dataset State ### Context @jashapiro was adding some samples to a dataset recently when he noticed on the client side he was no longer able to modify his dataset. After some investigation I noticed that the issue occurred when samples with the same accessions codes are present in m...
api/data_refinery_api/views/dataset.py <|code_start|>## # Contains DatasetView ## from collections import defaultdict from django.core.exceptions import ValidationError from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from rest_framework import mixins, serializers, v...
api/data_refinery_api/views/dataset.py <|code_start|>## # Contains DatasetView ## from collections import defaultdict from django.core.exceptions import ValidationError from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from rest_framework import mixins, serializers, v...
Cache Docker Images by Branch ### Context We want to be able to cache docker image layers that are created locally as testing artfacts locally to be used by github actions. The current prepare_images.sh does this but there was an issue with the definition for branch_name. We also don't want to remove support non-c...
common/setup.py <|code_start|>import os from setuptools import find_packages, setup # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) VERSION_FILE = "version" try: with open(VERSION_FILE, "rt") as version_file: version_string = version...
common/setup.py <|code_start|>import os import re from datetime import datetime from setuptools import find_packages, setup # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) VERSION_FILE = "version" try: with open(VERSION_FILE, "rt") as versio...
Rename 'Refine.bio Mail Robot' to something descriptive ### Context 'Refine.bio Mail Robot' isn't super descriptive of what we use that email for. We use it to provide information about the datasets - processed or failed and the name should reflect that. Also am a little concerned of the word robot getting it fla...
workers/data_refinery_workers/processors/smasher.py <|code_start|># -*- coding: utf-8 -*- import logging import os import shutil import time from datetime import timedelta from pathlib import Path from typing import Dict, List from urllib.parse import quote from django.conf import settings from django.utils import ti...
workers/data_refinery_workers/processors/smasher.py <|code_start|># -*- coding: utf-8 -*- import logging import os import shutil import time from datetime import timedelta from pathlib import Path from typing import Dict, List from urllib.parse import quote from django.conf import settings from django.utils import ti...
Clean up AWS Batch job definition list ### Problem or idea The Batch job definition section contains 100+ pages of jobs (~2500 items). They haven't been cleaned up properly during deploy process for a while. ### Solution or next step Clean up stale items, make sure job deregistering script takes care of old ...
infrastructure/delete_batch_job_queue.py <|code_start|>import os from time import sleep import boto3 AWS_REGION = os.environ["AWS_REGION"] AWS_BATCH_QUEUE_ALL_NAMES = os.environ["REFINEBIO_JOB_QUEUE_ALL_NAMES"].split(",") batch = boto3.client("batch", region_name=AWS_REGION) # First disable each job queue. for batc...
infrastructure/delete_batch_job_queue.py <|code_start|>import os from time import sleep import boto3 from botocore.exceptions import ClientError AWS_BATCH_QUEUE_ALL_NAMES = os.environ["REFINEBIO_JOB_QUEUE_ALL_NAMES"].split(",") batch = boto3.client("batch", region_name=os.environ["AWS_REGION"]) # First disable each...
Weekly stats shows 0 downloads for some users ### Context A lot of changes has gone into prod recently. One of them is the EngagementBot weekly stats updates. ### Problem or idea The most recent summary contains lines like "0 downloads from " indicating some (potential) stats inaccuracy. ### Solution or nex...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from collections import Counter from django.conf import settings from django.core.management.base import BaseCommand from django.template.defaultfilters import pluralize from django.utils import timezone import requests ...
api/data_refinery_api/management/commands/post_downloads_summary.py <|code_start|>import datetime from collections import Counter from django.conf import settings from django.core.management.base import BaseCommand from django.template.defaultfilters import pluralize from django.utils import timezone import requests ...
Support filtering on status in EPR couldnt really find a nice place in WMS metadata spec to document the supported values for custom query parameters so i crammed it into the wms abstract...
gen_ziektenplagenexotengroen.py <|code_start|><|code_end|>
gen_ziektenplagenexotengroen.py <|code_start|>#!/usr/bin/env python # Generates the ziektenplagenexotengroen mapfile. # TODO rewrite using mappyfile, generalize. from contextlib import contextmanager indent: int = 0 def p(*strs: list[str]): print(" " * indent, end="") print(strs[0], end="") if len(str...
SPF support could be confusing I note that the SPF RR type was discontinued in RFC 7208 (see https://tools.ietf.org/html/rfc7208#section-3.1). I tried searching for my own SPF records with the SPF type, but of course they were not found (they do show up as TXT records, which they are). This could lead to confusion as t...
lexicon/__main__.py <|code_start|>#!/usr/bin/env python import argparse import os import importlib import sys from client import Client import pkg_resources #based off https://docs.python.org/2/howto/argparse.html def BaseProviderParser(): parser = argparse.ArgumentParser(add_help=False) parser.add_argument("...
lexicon/__main__.py <|code_start|>#!/usr/bin/env python import argparse import os import importlib import sys from client import Client import pkg_resources #based off https://docs.python.org/2/howto/argparse.html def BaseProviderParser(): parser = argparse.ArgumentParser(add_help=False) parser.add_argument("...
DNSPod Provider DNSPod is one of the biggest DNS provider in China. Here I wrote a DNSPod adapter. and, I found lexicon can't work now. I did some fix in parsing environment variables. notice, there is a --auth-id that not "standardize". DNSPod API auth with an id and Token. this id is given one per token, it's not l...
lexicon/providers/dnspod.py <|code_start|><|code_end|>
lexicon/providers/dnspod.py <|code_start|># -*- coding: utf-8 -*- from base import Provider as BaseProvider import requests import json def ProviderParser(subparser): subparser.add_argument("--auth-username", help="specify api id used to authenticate") subparser.add_argument("--auth-token", help="specify token...
Case should be ignored when filtering records from digitalocean API I noticed that digitalocean's HTTP API always returns `data` field of TXT records in lowercase, see [example](https://gist.github.com/jokester/e1152fd90ace2f71d767af1d96d802dc). This can cause [lexicon](https://github.com/AnalogJ/lexicon/blob/b278cebf...
lexicon/providers/digitalocean.py <|code_start|>from base import Provider as BaseProvider import requests import json def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify token used authenticate to DNS provider") class Provider(BaseProvider): def __init__(self, options, provide...
lexicon/providers/digitalocean.py <|code_start|>from base import Provider as BaseProvider import requests import json def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify token used authenticate to DNS provider") class Provider(BaseProvider): def __init__(self, options, provide...
CloudXNS Support yet another big DNS service in China.
lexicon/providers/cloudxns.py <|code_start|><|code_end|>
lexicon/providers/cloudxns.py <|code_start|># -*- coding: utf-8 -*- from base import Provider as BaseProvider import requests import json import time import hashlib import urllib def ProviderParser(subparser): subparser.add_argument("--auth-username", help="specify API-KEY used authenticate to DNS provider") s...
route53 provider and tests AWS Route 53 provider for lexicon Notes: - haven't (yet?) added any command line args for auth - I always use env vars or credentials files, and the provider uses boto under the hood, so follows the same [credential lookup approach](http://boto3.readthedocs.io/en/latest/guide/configuration.h...
lexicon/providers/route53.py <|code_start|><|code_end|> setup.py <|code_start|>"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a co...
lexicon/providers/route53.py <|code_start|>"""Provide support to Lexicon for AWS Route 53 DNS changes.""" from base import Provider as BaseProvider import boto3 import botocore def ProviderParser(subparser): """Specify arguments for AWS Route 53 Lexicon Provider.""" subparser.add_argument("--auth-access-key",...
Gandi Records not picking up TTL I'm trying to renew Lets Encrypt Certs using dehydrated, using lexicon to handle DNS modifications on a Gandi domain. New challenge TXT records are being created with a TTL of 3 hours. I have tried setting --ttl manually but they're always created with the default 3 hour TTL: `lexi...
lexicon/providers/gandi.py <|code_start|>"""Provide support to Lexicon for Gandi DNS changes. Lexicon provides a common interface for querying and managing DNS services through those services' APIs. This module implements the Lexicon interface against the Gandi API. The Gandi API is different from typical DNS APIs in...
lexicon/providers/gandi.py <|code_start|>"""Provide support to Lexicon for Gandi DNS changes. Lexicon provides a common interface for querying and managing DNS services through those services' APIs. This module implements the Lexicon interface against the Gandi API. The Gandi API is different from typical DNS APIs in...
Gandi Records not picking up TTL I'm trying to renew Lets Encrypt Certs using dehydrated, using lexicon to handle DNS modifications on a Gandi domain. New challenge TXT records are being created with a TTL of 3 hours. I have tried setting --ttl manually but they're always created with the default 3 hour TTL: `lexi...
lexicon/providers/gandi.py <|code_start|>"""Provide support to Lexicon for Gandi DNS changes. Lexicon provides a common interface for querying and managing DNS services through those services' APIs. This module implements the Lexicon interface against the Gandi API. The Gandi API is different from typical DNS APIs in...
lexicon/providers/gandi.py <|code_start|>"""Provide support to Lexicon for Gandi DNS changes. Lexicon provides a common interface for querying and managing DNS services through those services' APIs. This module implements the Lexicon interface against the Gandi API. The Gandi API is different from typical DNS APIs in...
Yandex PDD provider Hi I create support Yandex PDD as a DNS provider. But, I skip test because I haven't ideas to implementation it. @AnalogJ please merge if it possible.
lexicon/providers/yandex.py <|code_start|><|code_end|>
lexicon/providers/yandex.py <|code_start|>from __future__ import print_function from __future__ import absolute_import from .base import Provider as BaseProvider import requests import json __author__ = 'Aliaksandr Kharkevich' __license__ = 'MIT' __contact__ = 'https://github.com/kharkevich' def ProviderParser(subpars...
change transip provider to use transip-api I noticed the transip provider was gone, and that there was a [new project](https://github.com/benkonrath/transip-api) providing a transip api. I'm not sure how to specify the dependency from github, might be useful to put transip-api on pypi. Otherwise, command line usage ...
lexicon/providers/transip.py <|code_start|><|code_end|> setup.py <|code_start|>"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a co...
lexicon/providers/transip.py <|code_start|>from __future__ import print_function from __future__ import absolute_import from .base import Provider as BaseProvider try: from transip.service.dns import DnsEntry from transip.service.domain import DomainService except ImportError: pass def ProviderParser(sub...
function update_record() in namesilo.py has wrong query parameter origin: data['rdata'] = content modified: data['rrvalue'] = content
lexicon/providers/namesilo.py <|code_start|>from __future__ import print_function from __future__ import absolute_import from .base import Provider as BaseProvider import requests from xml.etree import ElementTree def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify key used authenti...
lexicon/providers/namesilo.py <|code_start|>from __future__ import print_function from __future__ import absolute_import from .base import Provider as BaseProvider import requests from xml.etree import ElementTree def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify key used authenti...
unable to install transip dependencies or use transip plugin Output: pip install dns-lexicon[transip] ``` Requirement already satisfied: dns-lexicon[transip] in ./lib/python2.7/site-packages Requirement already satisfied: requests in ./lib/python2.7/site-packages (from dns-lexicon[transip]) Requirement already sati...
setup.py <|code_start|>"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import...
setup.py <|code_start|>"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import...
Fix logging TypeError (digitalocean.py) [This same issue](https://github.com/AnalogJ/lexicon/pull/128/commits/903af58378ab9942d817c57e0330b5f7ac26b4e9) exists in `lexicon/providers/digitalocean.py` line 111. The same edit is needed to fix it. The error generated is: ``` Traceback (most recent call last): File ...
lexicon/providers/digitalocean.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-...
lexicon/providers/digitalocean.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-...
Route53: Public and Private Zones can't be distinguished. I've been testing out lexicon for updating DNS records via Route53, and I have a Public and Private Zone with the same domain name. I noticed that lexicon is only searching for the domain name by name, so in my case, my internal zone was the first created and s...
lexicon/providers/route53.py <|code_start|>"""Provide support to Lexicon for AWS Route 53 DNS changes.""" from __future__ import absolute_import from __future__ import print_function import logging from .base import Provider as BaseProvider try: import boto3 #optional dep import botocore #optional dep except...
lexicon/providers/route53.py <|code_start|>"""Provide support to Lexicon for AWS Route 53 DNS changes.""" from __future__ import absolute_import from __future__ import print_function import logging from .base import Provider as BaseProvider try: import boto3 #optional dep import botocore #optional dep except...
Namecheap support not optional Unlike route53 or softlayer and unlike what setup.py suggests, the namecheap provider is not optional in 2.1.17.
lexicon/providers/namecheap.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import logging import namecheap from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument( '--auth-token...
lexicon/providers/namecheap.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import logging from .base import Provider as BaseProvider try: import namecheap #optional dep except ImportError: pass logger = logging.getLogger(__name__) def ProviderParser(subparse...
Support multiple records of the same type on an identifier In [certbot](https://github.com/certbot/certbot), we use lexicon to create TXT records for a domain to prove to a SSL/TLS certificate authority that the user has control over that domain so the CA will give you a certificate which you can use to set up HTTPS. D...
lexicon/providers/onapp.py <|code_start|><|code_end|>
lexicon/providers/onapp.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import json import logging import requests from requests.auth import HTTPBasicAuth from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): ...
Return value for list? I very well might be looking at this wrong, but it appears that out of the box the "executable" that gets installed for linux can't actually get the list results as a return variable, only as a stdout debug message?
lexicon/__main__.py <|code_start|>#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import argparse import importlib import logging import os import sys import pkg_resources from .client import Client #based off https://docs.python.org/2/howto/argparse.html logger =...
lexicon/__main__.py <|code_start|>#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import argparse import importlib import logging import os import sys import json import pkg_resources from .client import Client #based off https://docs.python.org/2/howto/argparse.ht...
[Regression on #PR-203] CloudNS authentication broken when `auth-id` supplied Provider CloudNS fails to authenticate when using auth-id for authentication, rather than auth-subid or auth-subuser. Line 146 in lexicon/providers/cloudns.py reads `if self.is_given_option(self.options['auth_id']):`. It should instead sh...
lexicon/providers/cloudns.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): identity_group = subparser.add_mutually_exclusive...
lexicon/providers/cloudns.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): identity_group = subparser.add_mutually_exclusive...
api change of online.net broke lexicon plugin Hi, Blame them ! i'm working on it...
lexicon/providers/online.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-token"...
lexicon/providers/online.py <|code_start|>from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-token"...
test_hetzner tests mostly fail (without internet access?) When running builds of packages for openSUSE, we have all builds in the isolated environment without a network connection. Perhaps it is the reason, why most ``test_hetzner`` tests fail (all other pass). ``` [ 6s] + py.test3 tests -v -k test_hetzner [ 6...
lexicon/providers/hetzner.py <|code_start|>from __future__ import absolute_import from __future__ import unicode_literals from contextlib import contextmanager import hashlib import logging import re import time import requests from six import string_types from urllib3.util.retry import Retry # Due to optional requir...
lexicon/providers/hetzner.py <|code_start|>from __future__ import absolute_import from __future__ import unicode_literals from contextlib import contextmanager import hashlib import logging import re import time import requests from six import string_types from urllib3.util.retry import Retry # Due to optional requir...
Memset provider: TypeError: string indices must be integers Hi, When using the Memset provider with the default table formatting I get this error: ```bash $ lexicon memset create example.com TXT --name _acme-challenge.example.com --content BLAH --ttl 300 Traceback (most recent call last): File "/usr/local/bi...
lexicon/cli.py <|code_start|>#!/usr/bin/env python """Module for Lexicon command-line interface""" from __future__ import absolute_import, print_function import json import logging import os import sys from lexicon.client import Client from lexicon.config import ConfigResolver from lexicon.parser import generate_cli_m...
lexicon/cli.py <|code_start|>#!/usr/bin/env python """Module for Lexicon command-line interface""" from __future__ import absolute_import, print_function import json import logging import os import sys from lexicon.client import Client from lexicon.config import ConfigResolver from lexicon.parser import generate_cli_m...
Add Hover Provider Opening issue just to say I'm working on adding Hover to lexicon. I'm working on my fork here: https://github.com/bkanuka/lexicon I'm working on the tests/recordings and then I'll open a PR
lexicon/providers/hover.py <|code_start|><|code_end|>
lexicon/providers/hover.py <|code_start|>"""Module provider for Hover""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['hover.com'] def provider_parser(subpars...
Rackspace provider not getting token from the identity API _Update: solved! See my comment below._ I'm just starting out with lexicon and trying to get it working with Rackspace Cloud DNS. Requests are failing with a `requests.exceptions.HTTPError: 401 Client Error: Resource not found for validate token request` err...
lexicon/providers/rackspace.py <|code_start|>"""Rackspace provider implementation""" from __future__ import absolute_import import json import logging import time import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['rackspacecloud.co...
lexicon/providers/rackspace.py <|code_start|>"""Rackspace provider implementation""" from __future__ import absolute_import import json import logging import time import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['rackspacecloud.co...
DNSimple crash with team member that does not have a plan Here's the error I get (I have redacted my account number, domain and auth token) ```sh $ lexicon dnsimple --auth-token REDACTED list REDACTED A Traceback (most recent call last): File "/usr/local/bin/lexicon", line 11, in <module> sys.exit(main()) ...
lexicon/providers/dnsimple.py <|code_start|>"""Module provider for DNS Simple""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['dnsimple.com'] def provider_par...
lexicon/providers/dnsimple.py <|code_start|>"""Module provider for DNS Simple""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['dnsimple.com'] def provider_par...
PowerDNS dot notation From PowerDNS 4.2 onwards, undotted notation is not supported. From PowerDNS >=4.0 but <=4.1 the dotted notation is _optional_. I suggest we implement the dotted notation _by default_ since that will work with both dotted and undotted versions. We could have a flag to turn this behavior fo...
lexicon/providers/powerdns.py <|code_start|>""" Lexicon PowerDNS Provider Author: Will Hughes, 2017 API Docs: https://doc.powerdns.com/md/httpapi/api_spec/ Implementation notes: * The PowerDNS API does not assign a unique identifier to each record in the way that Lexicon expects. We work around this by creating an I...
lexicon/providers/powerdns.py <|code_start|>""" Lexicon PowerDNS Provider Author: Will Hughes, 2017 API Docs: https://doc.powerdns.com/md/httpapi/api_spec/ Implementation notes: * The PowerDNS API does not assign a unique identifier to each record in the way that Lexicon expects. We work around this by creating an I...
gandi: updating deletes all record of same rtype When using Gandi provider, if you update a specific record with a specific type, all records with a matching name will be deleted. The if-condition handling the case is not correct.
lexicon/providers/gandi.py <|code_start|>"""Provide support to Lexicon for Gandi LiveDNS and Gandi XMLRPC changes. Lexicon provides a common interface for querying and managing DNS services through those services' APIs. This module implements the Lexicon interface against the Gandi API. Gandi introduced the LiveDNS A...
lexicon/providers/gandi.py <|code_start|>"""Provide support to Lexicon for Gandi LiveDNS and Gandi XMLRPC changes. Lexicon provides a common interface for querying and managing DNS services through those services' APIs. This module implements the Lexicon interface against the Gandi API. Gandi introduced the LiveDNS A...
DNS Made Easy needs retry logic, to recover from rate limiting errors Originally certbot/certbot#7411. DNS Made Easy has [restrictive rate limits](https://api-docs.dnsmadeeasy.com/?version=latest#f6f3c489-422d-4cf0-bccb-1933e6d655ac): >To prevent unwanted flooding of the API system, there is a maximum number of req...
lexicon/providers/dnsmadeeasy.py <|code_start|>"""Module provider for DNSMadeEasy""" from __future__ import absolute_import import hmac import json import logging from builtins import bytes from email.utils import formatdate from hashlib import sha1 import requests from lexicon.providers.base import Provider as BasePr...
lexicon/providers/dnsmadeeasy.py <|code_start|>"""Module provider for DNSMadeEasy""" from __future__ import absolute_import import hmac import json import logging from builtins import bytes from email.utils import formatdate from hashlib import sha1 from urllib3.util.retry import Retry import requests from requests.ad...
LuaDNS _list_records fails due to missing "id" in API response I'm using certbot with the luadns plugin which in turn uses lexicon. I've been experiencing the error reported here: https://community.letsencrypt.org/t/luadns-renew-error/89634 ``` 2019-08-29 06:32:43,517:DEBUG:urllib3.connectionpool:https://api.luadn...
lexicon/providers/luadns.py <|code_start|>"""Module provider for luadns""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['luadns.com'] def provider_parser(subp...
lexicon/providers/luadns.py <|code_start|>"""Module provider for luadns""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['luadns.com'] def provider_parser(subp...
Easyname provider is broken Currently, easyname support is not working as the easyname website changed. There is a pull request with a working fix though: #449 I am in the process of getting things to work so it can be merged, but in the meantime you can just apply the 2 linechanges so you can use lexicon with eas...
lexicon/providers/easyname.py <|code_start|>"""Module provider for Easyname DNS""" from __future__ import absolute_import, print_function import logging from requests import Response, Session # Handling optional dependency for this provider try: from bs4 import BeautifulSoup, Tag except ImportError: pass fro...
lexicon/providers/easyname.py <|code_start|>"""Module provider for Easyname DNS""" from __future__ import absolute_import, print_function import logging from requests import Response, Session # Handling optional dependency for this provider try: from bs4 import BeautifulSoup, Tag except ImportError: pass fro...
TLDExtract Private Domains for Dynamic DNS Providers Hello all, I'm currently putting together the plugin for dynu.com (listed in NYI proiders). As Dynu also acts as Dynamic DNS provider with several toplevel domains as base for the dynamic domain (`yourhost.dynu.net`, `yourhost.freeddns.org`..., also, wildcards), ...
lexicon/client.py <|code_start|>"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.""" from __future__ import absolute_import import importlib import tldextract from lexicon import discovery from lexicon.config import ( ConfigResolver, DictConfigSource, legacy_config_resolver, n...
lexicon/client.py <|code_start|>"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.""" from __future__ import absolute_import import importlib import os import tldextract from lexicon import discovery from lexicon.config import ( ConfigResolver, DictConfigSource, legacy_config_r...
GoDaddy provider should recognize domaincontrol.com as its nameserver For the auto provider, it should recognize that domains managed by GoDaddy often have nameservers under the *.domaincontrol.com namespace. You can verify this is GoDaddy via whois; and I also tested this by adding 'domaincontrol.com' to the recogniz...
lexicon/providers/godaddy.py <|code_start|>"""Module provider for Godaddy""" from __future__ import absolute_import import hashlib import json import logging import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry from lexicon.providers.base import Provider as BaseProvider LOG...
lexicon/providers/godaddy.py <|code_start|>"""Module provider for Godaddy""" from __future__ import absolute_import import hashlib import json import logging import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry from lexicon.providers.base import Provider as BaseProvider LOG...
Provider Hetzner KonsoleH is broken When using the latest version of lexicon, i.e. ``` $ lexicon --version lexicon 3.3.11 ``` there is a problem parsing the website: ``` $ lexicon hetzner create evk.services TXT --log_level DEBUG --name "_foo.foo2" --content "foo2" Arguments: Namespace(action='create', au...
lexicon/providers/hetzner.py <|code_start|>"""Module provider for Hetzner""" from __future__ import absolute_import from __future__ import unicode_literals from contextlib import contextmanager import hashlib import logging import re import time import requests from six import string_types from urllib3.util.retry impo...
lexicon/providers/hetzner.py <|code_start|>"""Module provider for Hetzner""" from __future__ import absolute_import from __future__ import unicode_literals from contextlib import contextmanager import hashlib import logging import re import time import requests from six import string_types from urllib3.util.retry impo...
Cloudflare provider only lists first DNS 100 entries for domain How to reproduce: * Have a CloudFlare domain with > 100 entries * Create a new entry starting with a "high" letter, e.g. `zzzz.<domain>` * List entries: only the first 100 entries will be returned, making it appear as though `zzzz` had not been create...
lexicon/providers/cloudflare.py <|code_start|>"""Module provider for Cloudflare""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['cloudflare.com'] def provider...
lexicon/providers/cloudflare.py <|code_start|>"""Module provider for Cloudflare""" from __future__ import absolute_import import json import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ['cloudflare.com'] def provider...
Easyname not working anymore Lexicon version: 3.3.27 I can't access anything on easyname right now: ``` Traceback (most recent call last): File "/usr/local/bin/lexicon", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/lexicon/cli.py", line 117, in main results = c...
lexicon/providers/easyname.py <|code_start|>"""Module provider for Easyname DNS""" from __future__ import absolute_import, print_function import logging from requests import Response, Session # Handling optional dependency for this provider try: from bs4 import BeautifulSoup, Tag except ImportError: pass fro...
lexicon/providers/easyname.py <|code_start|>"""Module provider for Easyname DNS""" from __future__ import absolute_import, print_function import logging from requests import Response, Session # Handling optional dependency for this provider try: from bs4 import BeautifulSoup, Tag except ImportError: pass fro...
Route53 provider does not handle >100 hosted zones Hello, I ran into an interesting problem while setting up a system with certbot + lexicon. We have almost 200 hosted zones in AWS Route 53 and we were getting a "No domains found." error which I finally traced to the _authenticate method. I hacked together some chan...
lexicon/providers/route53.py <|code_start|>"""Provide support to Lexicon for AWS Route 53 DNS changes.""" from __future__ import absolute_import import hashlib import logging import re from lexicon.providers.base import Provider as BaseProvider try: import boto3 # optional dep import botocore # optional de...
lexicon/providers/route53.py <|code_start|>"""Provide support to Lexicon for AWS Route 53 DNS changes.""" from __future__ import absolute_import import hashlib import logging import re from lexicon.providers.base import Provider as BaseProvider try: import boto3 # optional dep import botocore # optional de...
Plesk provider assumes `site_name` equals `domain` (which is not always true) The plesk provider assumes that the `site_name` is always the same as the `domain`: https://github.com/AnalogJ/lexicon/blob/master/lexicon/providers/plesk.py#L52 That creates problems if one wants to create a record for a subdomain (e.g. `...
lexicon/providers/plesk.py <|code_start|>""" Lexicon Plesk Provider Author: Jens Reimann, 2018 API Docs: https://docs.plesk.com/en-US/onyx/api-rpc """ import logging from collections import defaultdict from typing import Dict, List, Optional from xml.etree import cElementTree from xml.etree.ElementTree import Element...
lexicon/providers/plesk.py <|code_start|>""" Lexicon Plesk Provider Author: Jens Reimann, 2018 API Docs: https://docs.plesk.com/en-US/onyx/api-rpc """ import logging from collections import defaultdict from typing import Dict, List, Optional from xml.etree import cElementTree from xml.etree.ElementTree import Element...
Dreamhost integration will break November 2nd, 2021 It looks like Dreamhost is "retiring" some of it's API calls Nov 2nd, including `domain-list_domains` which Lexicon seems to use for validating the domain during initial auth: https://help.dreamhost.com/hc/en-us/articles/217555767-Domain-API-commands https://git...
lexicon/providers/dreamhost.py <|code_start|>"""Module provider for Dreamhost""" import base64 import json import logging import time import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS...
lexicon/providers/dreamhost.py <|code_start|>"""Module provider for Dreamhost""" import base64 import json import logging import time import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS...
Plesk provider not working: invalid request (error code 1014) The Plesk provider seems to be not working at all: ``` lexicon plesk --log_level DEBUG --auth-username apiuser --auth-password secret --plesk-server "https://plesk-api-host:8443" list mydomain.com A ``` leads to: ``` Arguments: Namespace(delegate...
lexicon/providers/plesk.py <|code_start|>""" Lexicon Plesk Provider Author: Jens Reimann, 2018 API Docs: https://docs.plesk.com/en-US/onyx/api-rpc """ import logging from collections import defaultdict from typing import Dict, List, Optional from xml.etree import cElementTree from xml.etree.ElementTree import Element...
lexicon/providers/plesk.py <|code_start|>""" Lexicon Plesk Provider Author: Jens Reimann, 2018 API Docs: https://docs.plesk.com/en-US/onyx/api-rpc """ import logging from collections import defaultdict from typing import Dict, List, Optional from xml.etree import cElementTree from xml.etree.ElementTree import Element...
joker: HTTP 414 client error when adding a new record Hi, I get a "414 Client error" when trying to add a new record to one of my zones hosted at Joker. Is there an easy fix or is that a limitation of their API? ``` lexicon joker create example.com A --name a --content 127.0.0.1 Traceback (most recent call last...
lexicon/providers/joker.py <|code_start|>"""Module provider for Joker.com""" # The Joker.com API is well documented. # Several specificities compared to classic REST API in other providers: # - everything is done with GET requests: all parameters (including actual records data # and authentication data) are passe...
lexicon/providers/joker.py <|code_start|>"""Module provider for Joker.com""" # The Joker.com API is well documented. # Several specificities compared to classic REST API in other providers: # - everything is done with GET requests: all parameters (including actual records data # and authentication data) are passe...
transip provider needs requests>=2.27.0 in dependency spec The update of the transip provider from #1086 included in 3.9.2 uses `from requests.exceptions import JSONDecodeError` which was first included in requests 2.27.0 but the requirements spec only requires `>=2`: https://github.com/AnalogJ/lexicon/blob/d8b26bcfff...
lexicon/providers/transip.py <|code_start|>"""Module provider for TransIP""" import binascii import json import logging import uuid from base64 import b64decode, b64encode from typing import Any, Dict, List, Optional import requests from cryptography.hazmat.backends import default_backend from cryptography.hazmat.prim...
lexicon/providers/transip.py <|code_start|>"""Module provider for TransIP""" import binascii import json import logging import uuid from base64 import b64decode, b64encode from typing import Any, Dict, List, Optional import requests from cryptography.hazmat.backends import default_backend from cryptography.hazmat.prim...
RFE: Replace use of `pkg_resources` with `importlib.metadata` See discussions: [astropy/astropy#11091](https://github.com/astropy/astropy/pull/11091) [pypa/pip#7413](https://github.com/pypa/pip/issues/7413) ```console [tkloczko@devel-g2v lexicon-3.11.0]$ grep -r pkg_resources lexicon/discovery.py:import pkg_reso...
lexicon/client.py <|code_start|>"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.""" import importlib import logging import os from typing import Dict, List, Optional, Type, Union, cast import tldextract # type: ignore from lexicon import config as helper_config from lexicon import d...
lexicon/client.py <|code_start|>"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.""" import importlib import logging import os from typing import Dict, List, Optional, Type, Union, cast import tldextract # type: ignore from lexicon import config as helper_config from lexicon import d...
Add support for porkbun https://porkbun.com/ Add support for porkbun https://porkbun.com/
lexicon/providers/porkbun.py <|code_start|><|code_end|>
lexicon/providers/porkbun.py <|code_start|>import logging import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider import json LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["porkbun.com"] def provider_parser(subparser): """Return...
Bug in create action for glesys provider When creating an A record with the glesys provider, the full name is added instead of the host name. ``` lexicon_config = { "provider_name" : "glesys", "action": "create", "domain": "somedomain.com", "type": "A", "name": "lexicon", "content": "1...
lexicon/providers/glesys.py <|code_start|>"""Module provider for Glesys""" import json import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider NAMESERVER_DOMAINS = ["glesys.com"] def provider_parser(subparser): """Generate a subparser for G...
lexicon/providers/glesys.py <|code_start|>"""Module provider for Glesys""" import json import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider NAMESERVER_DOMAINS = ["glesys.com"] def provider_parser(subparser): """Generate a subparser for G...
DuckDNS.org API support The DuckDNS.org is a popular Dynamic DNS provider. And it supports the TXT records update which is used for issuing ACME certificates. Here is a sample https://github.com/acmesh-official/acme.sh/blob/master/dnsapi/dns_duckdns.sh Could you please support it's API?
lexicon/providers/duckdns.py <|code_start|><|code_end|>
lexicon/providers/duckdns.py <|code_start|>"""\ Module provider for Duck DNS The Duck DNS public API does not provide the whole set of features supported by Lexicon: it only has one GET endpoint, "/update", authenticated by the token which is given when you register with one of the supported OAuth providers; the API o...
Misleading error message: ProviderNotAvailableError - This provider (plesk) has required dependencies that are missing. Please install lexicon[plesk] first. ``` (venv) mypc:~/myprojects/dns-lexicon$ pip freeze certifi==2019.9.11 cffi==1.13.2 chardet==3.0.4 cryptography==2.8 dns-lexicon==3.3.10 future==0.18.2 i...
lexicon/client.py <|code_start|>"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.""" import importlib import logging import os from typing import Dict, List, Optional, Type, Union, cast import tldextract # type: ignore from lexicon import config as helper_config from lexicon import d...
lexicon/client.py <|code_start|>"""Main module of Lexicon. Defines the Client class, that holds all Lexicon logic.""" import importlib import logging import os from typing import Dict, List, Optional, Type, Union, cast import tldextract # type: ignore from lexicon import config as helper_config from lexicon import d...
Can't use lexicon with pending Cloudflare domains I cannot use Lexicon with a domain that is `pending` (not `active`) in Cloudflare. It's useful to to be able to manipulate DNS records for `pending` domains before changing nameservers to minimize disruption. ## Context 1. Add a domain (e.g., `example.com`) in Clo...
lexicon/providers/cloudflare.py <|code_start|>"""Module provider for Cloudflare""" import json import logging import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["cloudflare.com"] ...
lexicon/providers/cloudflare.py <|code_start|>"""Module provider for Cloudflare""" import json import logging import requests from lexicon.exceptions import AuthenticationError from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["cloudflare.com"] ...
Hover fails with "HTTPError: 400 Client Error: Bad Request for url" Example command line with sensitive info replaced by "XXXXX": lexicon hover --log_level DEBUG --auth-username "XXXXX" --auth-password "XXXXX" list XXXXX TXT ...outputs this: Arguments: Namespace(delegated=None, config_dir='/root', provider_nam...
src/lexicon/_private/providers/hover.py <|code_start|>"""Module provider for Hover""" import json import logging from argparse import ArgumentParser from typing import List import requests from lexicon.exceptions import AuthenticationError from lexicon.interfaces import Provider as BaseProvider LOGGER = logging.getL...
src/lexicon/_private/providers/hover.py <|code_start|>"""Module provider for Hover""" import json import logging import re from argparse import ArgumentParser from typing import List import pyotp import requests from lexicon.exceptions import AuthenticationError from lexicon.interfaces import Provider as BaseProvider...
[Feature]: Input Convert as cmd tool ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Feature Converting input files from: 1. `json` &rarr; `toml` or `yaml` 2. `toml ` &rarr; `json ` or `yaml` 3. `yaml ` &rarr; `toml` or `toml ` ### Possible Solution _No r...
spectrafit/plugins/__init__.py <|code_start|><|code_end|> spectrafit/plugins/converter.py <|code_start|><|code_end|> spectrafit/tools.py <|code_start|>"""Collection of essential tools for running SpectraFit.""" import json import sys from pathlib import Path from typing import Any from typing import Dict from typing i...
spectrafit/plugins/__init__.py <|code_start|>"""Plugins for SpectraFit.""" <|code_end|> spectrafit/plugins/converter.py <|code_start|>"""Convert the input and output files to the preferred file format.""" import argparse import json from pathlib import Path from typing import Any from typing import Dict import toml i...
[Bug]: Correct Export of correlation as `*.csv` ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior ```css 0,energy,energy,"[1.0, 0,... ``` ### Expected Behavior _No response_ ### Steps To Reproduce _No response_ ### ⚙️ Environment ```markdown - OS: - Pyth...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.1" <|code_end|> spectrafit/models.py <|code_start|>"""Minimization models for curve fitting.""" from collections import defaultdict from dataclasses import dataclass from typing import Any from typing imp...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.2" <|code_end|> spectrafit/models.py <|code_start|>"""Minimization models for curve fitting.""" from collections import defaultdict from dataclasses import dataclass from math import log from math import ...
[Docs]: Using builtin release drafter ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Information in the Docs https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes ### Anything else? _No response_ ### Code ...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.3" <|code_end|> spectrafit/api/models_model.py <|code_start|>"""Reference model for the API of the models distributions.""" from typing import Callable from typing import List from typing import Optiona...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.4" <|code_end|> spectrafit/api/models_model.py <|code_start|>"""Reference model for the API of the models distributions.""" from typing import Callable from typing import List from typing import Optiona...
[Docs]: Using builtin release drafter ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Information in the Docs https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes ### Anything else? _No response_ ### Code ...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.4" <|code_end|>
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a0" <|code_end|>
[Docs]: Update release drafter ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Information in the Docs - Link to the complete changes of the latest release. - Exclude auto commits in the contributor list ### Anything else? _No response_ ### Code of Conduct ...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a0" <|code_end|>
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a1" <|code_end|>
[Docs]: Using mike for versioning docs ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Information in the Docs https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/ ### Anything else? _No response_ ### Code of Conduct - [X] I agree to foll...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a2" <|code_end|>
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a3" <|code_end|>
[Docs]: Update labeled criteria for CHANGELOG ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Information in the Docs Update the labeler criteria for avoiding double labels in `CHANGELOG.md` ### Anything else? _No response_ ### Code of Conduct - [X] I agree ...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a7" <|code_end|>
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0a8" <|code_end|>
[Bug]: ASCII Char in creating branch ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Is crashing ### Expected Behavior Is realising a change in changeling ### Steps To Reproduce _No response_ ### ⚙️ Environment ```markdown - OS: - Python: - spectrafit: ...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0b1" <|code_end|>
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "1.0.0b2" <|code_end|>
[Feature]: Add python 3.11 support ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Missing Feature Add python 3.11 support ### Possible Solution _No response_ ### Anything else? _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Condu...
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.6" <|code_end|>
spectrafit/__init__.py <|code_start|>"""SpectraFit, fast command line tool for fitting data.""" __version__ = "0.16.7" <|code_end|>
SSL: CERTIFICATE_VERIFY_FAILED Hi, I don't know if you got notified about my last comment in the closed issue #81 . I cannot reopen it, so ill try it this way: Sorry, I hadn't had the time to test it. I have tested it now with the newest version 3.0.0b5 and HASS 0.64.3 self.get_state() works now without any pr...
appdaemon/plugins/hass/hassapi.py <|code_start|>import requests import inspect import appdaemon.appapi as appapi import appdaemon.utils as utils from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # # Define an entities class as ...
appdaemon/plugins/hass/hassapi.py <|code_start|>import requests import inspect import appdaemon.appapi as appapi import appdaemon.utils as utils from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # # Define an entities class as ...
Avoid copying states in get_state() if read-only access is needed only Hi, I think that deep-copying the whole HA state adds considerable overhead to ``get_state()``, especially when called for a whole domain or even complete HA state. It turns out that in most cases, you just need read-only access to the states....
appdaemon/adapi.py <|code_start|>import datetime import inspect import iso8601 import re from datetime import timedelta import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon class ADAPI: # # Internal # def __init__(self, ad: AppDaemon, name, logging_obj, args, config, app_config,...
appdaemon/adapi.py <|code_start|>import datetime import inspect import iso8601 import re from datetime import timedelta import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon class ADAPI: # # Internal # def __init__(self, ad: AppDaemon, name, logging_obj, args, config, app_config,...
add oneshot to listen_event I noticed that `listen_state` has `oneshot` which seems very useful. I think it makes sense to implement the same in `listen_event`. What do you guys think? I might give this a shot if I have time soon.
appdaemon/adapi.py <|code_start|>import asyncio import datetime import inspect import iso8601 import re from datetime import timedelta from copy import deepcopy # needed for fake coro cb that looks like scheduler import uuid import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon class ADAPI: ...
appdaemon/adapi.py <|code_start|>import asyncio import datetime import inspect import iso8601 import re from datetime import timedelta from copy import deepcopy # needed for fake coro cb that looks like scheduler import uuid import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon class ADAPI: ...
turn_on service not working with async apps ## What did I do I bumped into an [issue](https://community.home-assistant.io/t/need-help-with-appdaemon-4-and-async/163937) from the community forum that resulted to be the same problem I had recently. Consider the following simple application: ```python import appdaemo...
appdaemon/__main__.py <|code_start|>#!/usr/bin/python3 """AppDaemon main() module. AppDaemon module that contains main() along with argument parsing, instantiation of the AppDaemon and HTTP Objects, also creates the loop and kicks everything off """ import sys import argparse import os import os.path import signal ...
appdaemon/__main__.py <|code_start|>#!/usr/bin/python3 """AppDaemon main() module. AppDaemon module that contains main() along with argument parsing, instantiation of the AppDaemon and HTTP Objects, also creates the loop and kicks everything off """ import argparse import asyncio import os import os.path import pla...
TypeError: a bytes-like object is required, not 'str' When I build and run (`docker build -t appdaemon:dev . && docker run appdaemon:dev`) the `dev` branch, the app exits with errors. ``` 2021-02-21 10:25:51.952206 INFO AppDaemon: AppDaemon Version 4.0.6 starting 2021-02-21 10:25:51.953718 INFO AppDaemon: Python v...
appdaemon/http.py <|code_start|>import asyncio import json import os import re import time import traceback import concurrent.futures from urllib.parse import urlparse import feedparser from aiohttp import web import ssl import bcrypt import uuid from jinja2 import Environment, FileSystemLoader, select_autoescape impo...
appdaemon/http.py <|code_start|>import asyncio import json import os import re import time import traceback import concurrent.futures from urllib.parse import urlparse import feedparser from aiohttp import web import ssl import bcrypt import uuid from jinja2 import Environment, FileSystemLoader, select_autoescape impo...
Rework AD's internal Service calls Service calls within AD should no longer wait to return results by default If results are needed, the user will have 2 options 1. Give the `call_service` api a callback to use 2. Set a flag, that it should wait for the result This will help significantly speedup the core, as r...
appdaemon/adapi.py <|code_start|>import asyncio import datetime import inspect import iso8601 import re from datetime import timedelta from copy import deepcopy from typing import Any, Optional, Callable # needed for fake coro cb that looks like scheduler import uuid import appdaemon.utils as utils from appdaemon.app...
appdaemon/adapi.py <|code_start|>import asyncio import datetime import inspect import iso8601 import re from datetime import timedelta from copy import deepcopy from typing import Any, Optional, Callable # needed for fake coro cb that looks like scheduler import uuid import appdaemon.utils as utils from appdaemon.app...