message
stringlengths
13
484
diff
stringlengths
38
4.63k
When adding new item allocations, filter the available stock items Must match the appropriate part Remove items that are already allocated
@@ -12,6 +12,7 @@ from django.forms import HiddenInput from part.models import Part from .models import Build, BuildItem +from stock.models import StockItem from .forms import EditBuildForm, EditBuildItemForm from InvenTree.views import AjaxView, AjaxUpdateView, AjaxCreateView @@ -145,7 +146,9 @@ class BuildItemCreate(...
Update config.py format config with black
@@ -5,7 +5,6 @@ from core.constants import YETI_ROOT class Dictionary(dict): - def __getattr__(self, key): return self.get(key, None) @@ -14,10 +13,9 @@ class Dictionary(dict): class Config: - def __init__(self): config = ConfigParser(allow_no_value=True) - config.read(os.path.join(YETI_ROOT, "yeti.conf"), encoding='ut...
[varLib] fix undefined name 'masters' Ouch!
@@ -272,6 +272,7 @@ def build(designspace_filename, master_finder=lambda s:s, axisMap=None): axes = ds['axes'] if 'axes' in ds else [] if 'sources' not in ds or not ds['sources']: raise VarLibError("no 'sources' defined in .designspace") + masters = ds['sources'] instances = ds['instances'] if 'instances' in ds else []...
(trivial) qt settings: fix a type hint (no change in behaviour)
@@ -192,8 +192,8 @@ class SettingsDialog(WindowModalDialog): msat_cb = QCheckBox(_("Show amounts with msat precision")) msat_cb.setChecked(bool(self.config.get('amt_precision_post_satoshi', False))) - def on_msat_checked(b: bool): - prec = 3 if b else 0 + def on_msat_checked(v): + prec = 3 if v == Qt.Checked else 0 if ...
show 10 slowest core tests Summary: the dagster core tests are hitting 18m need to figure out which ones are worst Test Plan: bk Reviewers: dgibson, jordansanders, max Subscribers: rexledesma
@@ -21,13 +21,13 @@ commands = flake8 . --count --exclude=./.*,dagster/seven/__init__.py --select=E9,F63,F7,F82 --show-source --statistics echo -e "--- \033[0;32m:pytest: Running tox tests\033[0m" - api_tests: pytest -vv ./dagster_tests/api_tests --junitxml=test_results.xml {env:COVERAGE_ARGS} {posargs} - cli_tests: py...
Include kubernetes pbft yaml in docs artifacts Preserve the kubernetes pbft yaml file in the docs build artifacts for publishing.
@@ -71,6 +71,7 @@ html: templates cli @cp $(SAWTOOTH)/docker/compose/sawtooth-default-pbft.yaml $(HTMLDIR)/app_developers_guide/sawtooth-default-pbft.yaml @cp $(SAWTOOTH)/docker/compose/sawtooth-default-poet.yaml $(HTMLDIR)/app_developers_guide/sawtooth-default-poet.yaml @cp $(SAWTOOTH)/docker/kubernetes/sawtooth-kuber...
fix: always use parameter fallback Even when the filesystem encoding and sys.argv encoding are the same we should still fall back to trying for decoding command line arguments.
@@ -119,6 +119,8 @@ class StringParamType(ParamType): value = value.decode(fs_enc) except UnicodeError: value = value.decode('utf-8', 'replace') + else: + value = value.decode('utf-8', 'replace') return value return value
Install tox as user Gets around issue where circleci docker images don't run as root
@@ -20,7 +20,7 @@ base_test_step: &base_test_step - run: name: install dependencies command: | - pip install --upgrade setuptools tox + pip install --user --upgrade setuptools tox tox --notest - save_cache:
source: df: Do not require features be passed to dataflow Fixes:
@@ -24,7 +24,8 @@ class DataFlowSourceConfig: dataflow: DataFlow = field("DataFlow to use for preprocessing") features: Features = field( "Features to pass as definitions to each context from each " - "record to be preprocessed" + "record to be preprocessed", + default=Features(), ) inputs: List[str] = field( "Other in...
raise GenericYetiError if not 200 ``` python tests/testfeeds.py X DEBUG:root:Scheduler started Running X... DEBUG:root:Running X (ID: X) DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): X:80 DEBUG:urllib3.connectionpool:http://X:80 "GET /X.php HTTP/1.1" 404 293 X: success! ```
@@ -10,6 +10,7 @@ from lxml import etree from mongoengine import DoesNotExist from mongoengine import StringField +from core.errors import GenericYetiError from core.config.celeryctl import celery_app from core.config.config import yeti_config from core.scheduling import ScheduleEntry @@ -141,8 +142,7 @@ class Feed(Sch...
[IMPR] Wait for _putthread is done in BaseBot.exit() For asychronous puts there is a pywikibot._putthread which holds the queue to be done. Wait in BaseBot exit() method until all asychronous put were made and write statistics after it.
@@ -1289,28 +1289,36 @@ class BaseBot(OptionHandler): May be overridden by subclasses. """ self.teardown() + if hasattr(self, '_start_ts'): + read_delta = pywikibot.Timestamp.now() - self._start_ts + read_seconds = int(read_delta.total_seconds()) + + if pywikibot._putthread.is_alive(): + pywikibot._flush() + pywikibot....
Modify "Initialize the databse" command The command `sudo service postgresql initdb` doesn't work within CentOS 7.1. I have updated this to the command that I was able to use to initialize the database.
@@ -19,7 +19,7 @@ Installing PostgreSQL Database 5. Initialize the database. - ``sudo service postgresql initdb`` + ``sudo /usr/pgsql-9.4/bin/postgresql94-setup initdb`` 6. Set PostgreSQL to start on boot.
Fix handling of ad.Zero in _select_and_scatter_add_transpose. Fixes
@@ -5573,6 +5573,8 @@ def _select_and_scatter_add_transpose( t, source, operand, *, select_prim, window_dimensions, window_strides, padding): assert ad.is_undefined_primal(source) and not ad.is_undefined_primal(operand) + if type(t) is ad_util.Zero: + return [ad_util.Zero(source.aval), None] ones = (1,) * len(window_di...
BUG: Pickling class Windows compatibility Child processes cannot access global dictionary in master process. Moved storing the function into the pickling class itself.
@@ -52,25 +52,15 @@ def get_rank(): else: process_name = multiprocessing.current_process().name if process_name is not "MainProcess": - rank = int(process_name[-1]) + rank = int(process_name.split("-")[-1]) return rank -# Helping ProcessPoolExecutor map unpicklable functions -_FUNCTIONS = {} - - class PicklableAndCalla...
Remove --no-update-dependencies Summary: Absolutely no idea why this is needed. This should be a valid argument. Pull Request resolved:
@@ -724,7 +724,7 @@ binary_linux_test_and_upload: &binary_linux_test_and_upload # Install the package if [[ "$PACKAGE_TYPE" == conda ]]; then - conda install -y "$pkg" --offline --no-update-dependencies + conda install -y "$pkg" --offline else pip install "$pkg" fi @@ -862,7 +862,7 @@ binary_mac_build: &binary_mac_buil...
notifications: Add tests for `relative_to_full_url()` function. Fixes:
from __future__ import absolute_import from __future__ import print_function +import os import random import re +import ujson from django.conf import settings from django.core import mail @@ -13,7 +15,8 @@ from mock import patch, MagicMock from six.moves import range from typing import Any, Dict, List, Text -from zerve...
Update graphql.yaml Reference:
@@ -46,6 +46,8 @@ requests: - "{{BaseURL}}/graph_cms" - "{{BaseURL}}/query-api" - "{{BaseURL}}/api/cask/graphql-playground" + - "{{BaseURL}}/altair" + - "{{BaseURL}}/playground" headers: Content-Type: application/json
WL: xwayland windows need to know which outputs they are on So that they can damage them when they need to show new content
@@ -1082,6 +1082,7 @@ class Static(base.Static, Window): else: self.surface.configure(x, y, self._width, self._height) self.paint_borders(bordercolor, borderwidth) + self._find_outputs() self.damage() def cmd_bring_to_front(self) -> None:
Update installing.rst Made it clear that we prefer pyqt5.
@@ -36,7 +36,10 @@ is used to provide an abstract interface to the two most widely used QT bindings * `pyqt5 <https://riverbankcomputing.com/software/pyqt/intro>`_ -- version 5 * `PySide2 <https://wiki.qt.io/Qt_for_Python>`_ -- version 5 -At least one of those bindings must be installed for the interative GUIs to work....
Fix MatrixStore test fixture importer Previously we weren't restricting to import events of type "prescribing". This happened to be OK in the contexts where we were using it, but it breaks on the `one_month_of_measures` fixture.
@@ -48,7 +48,7 @@ def matrixstore_from_postgres(): This provides an easy way of using existing test fixtures with the MatrixStore. """ - latest_date = ImportLog.objects.latest("current_at").current_at + latest_date = ImportLog.objects.latest_in_category("prescribing").current_at end_date = str(latest_date)[:7] return m...
Catch Permission SSL error Give a suggestion on possible fix for binding to port 443
@@ -28,7 +28,7 @@ This is the main file the defines what URLs get routed to what handlers import sys from setup import __version__ -from os import urandom, _exit +from os import urandom, _exit, path as os_path from modules.Menu import Menu from modules.Recaptcha import Recaptcha from modules.AppTheme import AppTheme @@...
Update core.py This is a small bugfix to stop an error where None would be returned by metadata.findtext. Instead, an empty string is returned.
@@ -1215,7 +1215,7 @@ class SoCo(_SocoSingletonBase): metadata = XML.fromstring(really_utf8(metadata)) # Try parse trackinfo trackinfo = metadata.findtext('.//{urn:schemas-rinconnetworks-com:' - 'metadata-1-0/}streamContent') + 'metadata-1-0/}streamContent') or '' index = trackinfo.find(' - ') if index > -1:
fix docs mistakes in lr_scheduler.MultiplicativeLR Summary: This PR is referenced to an issue: [The docs of `MultiplicativeLR` use `LambdaLR` as example](https://github.com/pytorch/pytorch/issues/33752#issue-570374087) Pull Request resolved:
@@ -247,9 +247,8 @@ class MultiplicativeLR(_LRScheduler): last_epoch (int): The index of last epoch. Default: -1. Example: - >>> # Assuming optimizer has two groups. >>> lmbda = lambda epoch: 0.95 - >>> scheduler = LambdaLR(optimizer, lr_lambda=lmbda) + >>> scheduler = MultiplicativeLR(optimizer, lr_lambda=lmbda) >>> f...
Let.Expr: add types in the constructor's docstring TN: minor
@@ -1569,6 +1569,11 @@ class Let(AbstractExpression): pretty_class_name = 'Let' def __init__(self, vars, var_exprs, expr, abstract_expr=None): + """ + :type vars: list[VariableExpr] + :type vars_exprs: list[ResolvedExpression] + :type expr: ResolvedExpression + """ self.vars = vars self.var_exprs = var_exprs self.expr ...
Do not install all azure packages Often azure brokes packege dependencies and our CI became broken. Install only that azure packages, tht we are using.
@@ -52,8 +52,9 @@ setup( 'google-api-python-client==1.6.4', 'google-auth==1.2.1', 'google-auth-httplib2==0.0.3', - 'azure==2.0.0', - 'azure-mgmt-containerservice==3.0.1', + 'azure-common==1.1.9', + 'azure-mgmt-containerservice==3.0.0', + 'msrestazure==0.4.25', 'urllib3==1.22' ], setup_requires=[
Update abcd.py Better doc
@@ -283,9 +283,11 @@ class Matrix(object): return outputRay def largestDiameter(self): + """ Largest diameter of the element or group of elements """ return self.apertureDiameter def hasFiniteApertureDiameter(self): + """ True if the element or group of elements have a finite aperture size """ return self.apertureDiame...
pipeline: unify object exporting Remove output.export and associated logic in pipeline.assemble. Instead, return output or None, and export only once in pipeline.run.
@@ -284,11 +284,11 @@ class Pipeline: return results, build_tree, tree - def assemble(self, object_store, build_tree, tree, monitor, libdir, output_directory): + def assemble(self, object_store, build_tree, tree, monitor, libdir): results = {"success": True} if not self.assembler: - return results + return results, Non...
Update faq.md fixed a typo: "... by opening and issue," -> "... by opening an issue,"
@@ -133,7 +133,7 @@ The main Presidio modules (analyzer, anonymizer, image-redactor) can be used bot ### How can I contribute to Presidio? -First, review the [contribution guidelines](https://github.com/microsoft/presidio/blob/main/CONTRIBUTING.md), and feel free to reach out by opening and issue, posting a discussion ...
Optimization: Annotate bool type shape of dictionary "in" operations * This was missing in constrast to generic dictionary operations. * This should enable more optimization as it removes false exception annotations for conditions with it.
@@ -48,7 +48,12 @@ from .NodeMakingHelpers import ( makeStatementOnlyNodesFromExpressions, wrapExpressionWithSideEffects, ) -from .shapes.BuiltinTypeShapes import tshape_dict, tshape_list, tshape_none +from .shapes.BuiltinTypeShapes import ( + tshape_bool, + tshape_dict, + tshape_list, + tshape_none, +) from .shapes.St...
Update seq2seq_model.py replaced marian.prepare_translation_batch() with marian.prepare_seq2seq_batch()
@@ -844,7 +844,7 @@ class Seq2SeqModel: to_predict[i : i + self.args.eval_batch_size] for i in range(0, len(to_predict), self.args.eval_batch_size) ]: if self.args.model_type == "marian": - input_ids = self.encoder_tokenizer.prepare_translation_batch( + input_ids = self.encoder_tokenizer.prepare_seq2seq_batch( batch, m...
Update python-app.yml Added pytest-cov
@@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest pytest-cov if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: |
fix valid logic 0 is false, None check is safer
@@ -35,7 +35,7 @@ class OpenPypeVersion: self.prerelease = prerelease is_valid = True - if not major or not minor or not patch: + if major is None or minor is None or patch is None: is_valid = False self.is_valid = is_valid
Update .travis.yml Attempt to include pyglow on build server
language: python python: - "2.7" - #- "3.3" - - "3.4" - "3.5" - "3.6" sudo: false @@ -38,8 +36,10 @@ install: # - conda install --yes -c dan_blanchard python-coveralls nose-cov - source activate test-environment - pip install coveralls - # pysatCDF installed via setup.py requirement - # - pip install pysatCDF + - git c...
Update formbook.txt Removing some dups + cleaning.
# Reference: https://blog.talosintelligence.com/2018/06/my-little-formbook.html?m=1 -http://www.drylipc.com/em1/ -http://www.handanzhize.info/d5/ -http://www.bddxpso.info/d7/ -http://www.newraxz.com/as/ -http://www.atopgixn.info/de8/ -http://www.cretezzy.com/am/ -http://www.casiinoeuros.info/d3/ -http://www.newraxz.com...
testing, ignore why is the link broken?
@@ -9,3 +9,12 @@ The Epidata API is built and maintained by the Carnegie Mellon University [Delphi research group](https://delphi.cmu.edu/). Explore one way in which Delphi is responding to the pandemic by visiting the [COVID-19 Survey page](covid_survey.md). + +# ignore + +gotta love testing in production. + +visiting...
Provide a little more help in error case Hopefully never a problem in production, but helpful while building tests. We have the information, why not share it?
@@ -156,7 +156,9 @@ class EndpointInterchange: executor.endpoint_id = self.endpoint_id else: if not executor.endpoint_id == self.endpoint_id: - raise Exception("InconsistentEndpointId") + eep_id = f"Executor({executor.endpoint_id})" + sep_id = f"Interchange({self.endpoint_id})" + raise Exception(f"InconsistentEndpointI...
add classname() and classnames() Try to provide a convenient and consistent method to retrieve ROOT class names as plain strings
@@ -107,6 +107,10 @@ class ROOTDirectory(object): out.__dict__.update(self.__dict__) return out + @classmethod + def classname(cls): + return cls._classname.decode('ascii') + @staticmethod def read(source, *args, **options): if len(args) == 0: @@ -300,6 +304,9 @@ class ROOTDirectory(object): def classes(self, recursive...
Remove f-strings This fixes the Python 3.5 tests
@@ -270,7 +270,8 @@ def accepts(**arg_units): dimension = arg_units[arg_name] if not _has_units(arg_value, dimension): raise TypeError( - f"arg '{arg_name}={arg_value}' does not match {dimension}" + "arg '%s=%s' does not match %s" + % (arg_name, arg_value, dimension) ) return f(*args, **kwargs) @@ -337,7 +338,7 @@ def ...
component: pass --no-pager to git in log_cince.py We don't need to use pager in log_since.py
@@ -23,7 +23,9 @@ def get_logs(root, pseudo_revision, mergebase, start, end): if end is not None: end_ref += '~%d' % (pseudo_revision - end) refspec = '%s..%s' % (start_ref, end_ref) - cmd = ['git', 'log', refspec, '--date=short', '--format=%ad %ae %s'] + cmd = [ + 'git', '--no-pager', 'log', refspec, '--date=short', '...
Add __init__ save data_context set self.custom_styles_directory if directory present
@@ -50,9 +50,16 @@ class DefaultJinjaView(object): * Vega-Lite 3.2.1 * Vega-Embed 4.0.0 """ - _template = NoOpTemplate + def __init__(self, data_context): + self.data_context = data_context + plugins_directory = data_context.plugins_directory + if os.path.isdir(os.path.join(plugins_directory, "custom_data_docs", "style...
Use a shared database cache. Fixes The default was a local memory cache, which was fast, but led to discrepancies in each app's cache.
@@ -77,6 +77,13 @@ INSTALLED_APPS = ( SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', + 'LOCATION': 'studio_db_cache', + } +} + MIDDLEWARE_CLASSES = ( # 'django.middleware.cache.UpdateCacheMiddleware', 'django.contrib.s...
Minor typo fix requies -> requires
``std=c99`` added if compiler is named ``gcc`` ---------------------------------------------- -GCC before version 5 requies the ``-std=c99`` command line argument. Newer +GCC before version 5 requires the ``-std=c99`` command line argument. Newer compilers automatically turn on C99 mode. The compiler setup code will au...
Implement suggestions Added links to mypy and PEP484 (the type hint pep). Removed the temp variable for clarity, maybe it's fine if we don't show that you can typehint normal variables?
**Type Hints** -A typehint indicates what type something should be. For example, +A type hint indicates what type something is expected to be. For example, ```python def add(a: int, b: int) -> int: - sum: int = a + b - return sum + return a + b ``` -In this case, `a` and `b` are expected to be ints, and the function re...
add failing test The distutils build_sass command runs the Manifest.build() method, not the Manifest.build_one() method. The former does not honor the strip_extension option.
@@ -635,7 +635,7 @@ class ManifestTestCase(BaseTestCase): ) -def test_manifest_strip_extension(tmpdir): +def test_manifest_build_one_strip_extension(tmpdir): src = tmpdir.join('test').ensure_dir() src.join('a.scss').write('a{b: c;}') @@ -645,6 +645,16 @@ def test_manifest_strip_extension(tmpdir): assert tmpdir.join('cs...
Added Channel Stat Created a stat to count how many channels are being saved by curators
@@ -4,6 +4,7 @@ import uuid import hashlib import functools import json +import newrelic.agent from django.conf import settings from django.contrib import admin from django.core.cache import cache @@ -256,6 +257,9 @@ class Channel(models.Model): if self.pk and Channel.objects.filter(pk=self.pk).exists(): original_node ...
Small questioning ... Wouldnt it be better to print both mAP values since the evaluation takes some time already for some datasets? It will take twice this time if we want to compute these values separately... (this is happening too me right now and I really start to find this annoying :) ).
@@ -108,7 +108,6 @@ def parse_args(args): parser.add_argument('--image-min-side', help='Rescale the image so the smallest side is min_side.', type=int, default=800) parser.add_argument('--image-max-side', help='Rescale the image if the largest side is larger than max_side.', type=int, default=1333) parser.add_argument(...
feat(spatial_index): reverse lookup for labels -> locations Requires querying the whole dataset.
+from collections import defaultdict import json import os @@ -6,7 +7,7 @@ import numpy as np from ...exceptions import SpatialIndexGapError from ...storage import Storage, SimpleStorage from ... import paths -from ...lib import Bbox, Vec, xyzrange, min2 +from ...lib import Bbox, Vec, xyzrange, min2, toiter class Spati...
Change check_robustness dataset As Adversarial training using training data, although here has a random sample, it's more reasonable to use eval data to check robustness.
@@ -576,7 +576,7 @@ def train_model(args): break if args.check_robustness: - samples_to_attack = list(zip(train_text, train_labels)) + samples_to_attack = list(zip(eval_text, eval_labels)) samples_to_attack = random.sample(samples_to_attack, 1000) adv_attack_results = _generate_adversarial_examples( model_wrapper, atta...
[meta] remove 7.x branch from backport config 7.x branch has been removed has there won't be any 7.18 minor version.
{ - "upstream": "elastic/helm-charts", + "all": true, + "prFilter": "label:need-backport", + "sourcePRLabels": [ + "backported" + ], "targetBranchChoices": [ "6.8", - "7.17", - "7.x" + "7.17" ], - "all": true, - "prFilter": "label:need-backport", "targetPRLabels": [ "backport" ], - "sourcePRLabels": [ - "backported" - ...
Also inspect the path for the script tag Part of
Referer: "<script >alert(1);</script>" output: log_contains: id "941110" + - + test_title: 941110-5 + desc: XSS in URI / PATH_INFO going undetected - GH issue 1022 + stages: + - + stage: + input: + dest_addr: 127.0.0.1 + method: GET + port: 80 + uri: "/foo/bar%3C/script%3E%3Cscript%3Ealert(1)%3C/script%3E/" + headers: ...
Update Google_News.py Added comment to function and updated print feature using the new format syntax.
@@ -4,7 +4,9 @@ from bs4 import BeautifulSoup as soup from urllib.request import urlopen def news(xml_news_url): - + '''Print select details from a html response containing xml + @param xml_news_url: url to parse + ''' Client=urlopen(xml_news_url) xml_page=Client.read() Client.close() @@ -15,10 +17,10 @@ def news(xml_n...
New RandomPreprocessor class: Randomly apply one preprocessor as a subpreprocessor with certain probability.
@@ -3208,6 +3208,76 @@ class RepeatPreprocessor(Preprocessor): return dtypes +class RandomApplyPreprocessor(Preprocessor): + """Randomly apply a preprocessor with certain probability. + + This preprocessor takes a preprocessor as a subprocessor and apply the + subprocessor to features with certain probability. + + """ ...
Fix initialization order in KafkaClient Fix initialization order in KafkaClient
@@ -201,10 +201,15 @@ class KafkaClient(object): if key in configs: self.config[key] = configs[key] + # these properties need to be set on top of the initialization pipeline + # because they are used when __del__ method is called + self._closed = False + self._wake_r, self._wake_w = socket.socketpair() + self._selector...
paraminfo_tests.py: Add 'text/x-collabkit' as a new content format test_content_format should expect 'text/x-collabkit' as a new content format when it finds CollaborationKit extension on a wiki.
@@ -127,6 +127,9 @@ class MediaWikiKnownTypesTestCase(KnownTypesTestBase, if isinstance(self.site, DataSite): # It is not clear when this format has been added, see T129281. base.append('application/vnd.php.serialized') + extensions = set(e['name'] for e in self.site.siteinfo['extensions']) + if 'CollaborationKit' in e...
[cluster autoscaler] expand logic around scaling cancelled resources 2 new rules for scaling cancelled resources (asg/sfr): 1. If any resource in a pool needs to scale up, ignore cancelled resources 2. Otherwise, if any resource (in a pool) is cancelled, ignore running resources 3. Else work as normal
@@ -17,6 +17,7 @@ import logging import math import os import time +from collections import defaultdict from collections import namedtuple from datetime import datetime from datetime import timedelta @@ -937,12 +938,14 @@ def autoscale_local_cluster(config_folder, dry_run=False, log_level=None): autoscaling_resources =...
settings: Use id of the container to find status element. This commit changes the code to use container id in the selector of the status element of presence_enabled setting such that the correct element is selected because we will add another element with same class in the realm-level presence_enabled setting.
@@ -694,7 +694,7 @@ export function set_up() { channel.patch, "/json/settings", data, - $(".privacy-setting-status").expectOne(), + $("#account-settings .privacy-setting-status").expectOne(), ); }); }
TST: added attributes to test class Added new and missing attributes to the attribute test list.
@@ -218,7 +218,8 @@ class TestConstellationFunc: self.ref_time = pysat.instruments.pysat_testing._test_dates[''][''] self.attrs = ["platforms", "names", "tags", "inst_ids", "instruments", "bounds", "empty", "empty_partial", "index_res", - "common_index"] + "common_index", "date", "yr", "doy", "yesterday", "today", + "t...
Remove newlines from added file lines New files created by a patch were being read in with newline characters causing any patches that then change the new file to fail validation.
@@ -525,7 +525,7 @@ def _apply_file_unidiff(patched_file, files_under_test): assert len(patched_file) == 1 # Should be only one hunk assert patched_file[0].removed == 0 assert patched_file[0].target_start == 1 - files_under_test[patched_file_path] = [x.value for x in patched_file[0]] + files_under_test[patched_file_pat...
Making LFP file detection automatic Removes lfp flag from __init__ params, sets lfp flag based on file name, also checks that input file is a .bin
@@ -13,14 +13,19 @@ class SpikeGLXRecordingExtractor(RecordingExtractor): mode = 'file' installation_mesg = "" # error message when not installed - def __init__(self, file_path, lfp=False, x_pitch=21, y_pitch=20): + def __init__(self, file_path, x_pitch=21, y_pitch=20): RecordingExtractor.__init__(self) self._npxfile =...
encryptor: remove duplicate len() statements For some reason pylint does not like these.
@@ -183,6 +183,7 @@ class DecryptorFile(FileWrap): # else temporarily but we keep _decrypt_offset intact until we actually do a # read in case the caller just called seek in order to then immediately seek back self._decrypt_offset = None + self.offset = None self._reset() def _reset(self): @@ -260,8 +261,9 @@ class Dec...
WL: Pick up changed app_id in _on_map Without this, some apps (e.g. Alacritty) will not have app_id detected.
@@ -76,6 +76,9 @@ class XdgWindow(Window[XdgSurface]): def _on_map(self, _listener: Listener, _data: Any) -> None: logger.debug("Signal: xdgwindow map") + if not self._wm_class == self.surface.toplevel.app_id: + self._wm_class = self.surface.toplevel.app_id + if self in self.core.pending_windows: self.core.pending_wind...
[tests/module/disk] Adapt to new input parameters Open application now defaults to xdg-open, replace with nautilus manually.
@@ -20,6 +20,7 @@ class TestDiskModule(unittest.TestCase): self._os = mock.patch("bumblebee.modules.disk.os") self.os = self._os.start() self.config.set("disk.path", "somepath") + self.config.set("disk.open", "nautilus") def tearDown(self): self._os.stop()
Update receive.py +existing code, works fine in python 2.7 +in python 3 it breaks +In python 3 there is change in chardet module and hence the error +convert-string-to-bytes-in-python-3 +this is also fixed in v11-hotfix branch
@@ -481,7 +481,10 @@ class Email: """Detect chartset.""" charset = part.get_content_charset() if not charset: + if six.PY2: charset = chardet.detect(str(part))['encoding'] + else: + charset = chardet.detect(part.encode())['encoding'] return charset
Update link to latest docs The docs-badge was pointing to old documentation containing references to model hosting, etc.
@@ -6,7 +6,7 @@ Cognite Python SDK ========================== [![build](https://github.com/cognitedata/cognite-sdk-python/workflows/release/badge.svg)](https://github.com/cognitedata/cognite-sdk-python/actions?query=workflow:release) [![codecov](https://codecov.io/gh/cognitedata/cognite-sdk-python/branch/master/graph/b...
DEV: updated pinned versions to the latest [CHANGED] requirements.txt used for github actions, make these the latest versions
chardet==4.0.0 -pillow>=8.3.2 -psutil==5.8.0 -scipy==1.6.1; python_version > '3.6' -tox==3.23.1 -tox-gh-actions==2.5.0 -plotly +pillow==9.0.0 +psutil==5.9.0 +scipy==1.7.3 +tox==3.24.5 +tox-gh-actions==2.8.1 +plotly==5.5.0 .[dev]
fix files filtering Filter both expected and published folders and skip temporary files. Temporary files might be pulled into expected folder when directly copying result of one test run to source zip file.
@@ -336,21 +336,31 @@ class PublishTest(ModuleUnitTest): glob.glob(expected_dir_base + "\\**", recursive=True) if f != expected_dir_base and os.path.exists(f)) - filtered_published = set() - for pub_path in published: - if skip_compare_folders: - if not any([re.search(val, pub_path) - for val in skip_compare_folders]):...
Update clang_format_ci.sh Summary: shellcheck led me astray! Pull Request resolved:
@@ -5,7 +5,7 @@ set -eux # Requires a single argument, which is the <commit> argument to git-clang-format # If you edit this whitelist, please edit the one in clang_format_all.py as well -find . -type f -print0 \ +find . -type f \ -path './torch/csrc/jit/*' -or \ -path './test/cpp/jit/*' -or \ -path './test/cpp/tensore...
Fix file extensions to remove leading '.' Fix incorrect variable reference.
@@ -141,7 +141,9 @@ def collect_local_artifacts(): def create_artifact_data(artifact_dir): for artifact in listdir(artifact_dir): filename, file_extension = os.path.splitext(artifact) - if file_extension in artifacts_dict: + # Remove leading '.' + file_extension = file_extension[1:] + if file_extension in file_manifest...
Fix memory leak in Dense.copy() Also had knock-on effects in add_dense() due the call to Dense.copy(). Fix
@@ -120,6 +120,7 @@ cdef class Dense(base.Data): out.shape = self.shape out.data = ptr out.fortran = self.fortran + out._deallocate = True return out cdef void _fix_flags(self, object array, bint make_owner=False):
drafts: Rename two functions in puppeteer tests for better clarity. Soon there will be another way to restore a message draft, and this rename helps specify which kind of restoring is happening here.
@@ -110,7 +110,7 @@ async function test_previously_created_drafts_rendered(page: Page): Promise<void ); } -async function test_restore_message_draft(page: Page): Promise<void> { +async function test_restore_message_draft_via_draft_overlay(page: Page): Promise<void> { console.log("Restoring stream message draft"); await...
Update quick_entry.js Add missing init_callback in constructor
@@ -13,7 +13,7 @@ frappe.ui.form.make_quick_entry = (doctype, after_insert, init_callback) => { }; frappe.ui.form.QuickEntryForm = Class.extend({ - init: function(doctype, after_insert){ + init: function(doctype, after_insert, init_callback){ this.doctype = doctype; this.after_insert = after_insert; this.init_callback ...
[output] Add support for pango markup Add a new parameter "output.markup" that allows a user to pass in a custom markup string (e.g. "pango"). Note: To make use of this, the user still has to use a Pango font, as well as use a bumblebee-status module that supports Pango output. fixes
@@ -164,6 +164,7 @@ class I3BarOutput(object): "align": self._theme.align(widget), "instance": widget.id, "name": module.id, + "markup": self._config.get("output.markup", "none"), }) def begin(self):
Sets autosize=False for reports. Having reports resize all their plots whenever the window changes size is too expensive in most cases.
@@ -233,9 +233,9 @@ def _merge_template(qtys, templateFilename, outputFilename, auto_open, precision #print("DB: rendering ",key) if isinstance(val,_ws.WorkspaceTable): #supply precision argument - out = val.render("html", precision=precision, resizable=True, autosize=True) + out = val.render("html", precision=precisio...
WL: correctly check failed xwayland startup If XWayland can't be started up it raises a RuntimeError, it doesn't return None, so this needs to be handled with a catch.
@@ -241,14 +241,16 @@ class Core(base.Core, wlrq.HasListeners): self.foreign_toplevel_manager_v1 = ForeignToplevelManagerV1.create(self.display) # Set up XWayland + self._xwayland: xwayland.XWayland | None = None + try: self._xwayland = xwayland.XWayland(self.display, self.compositor, True) - if self._xwayland: + excep...
Minor comment edits Minor comment edts to make clear what the default values are in the doc string.
@@ -183,8 +183,11 @@ def load_graphml(filepath, node_type=int, node_dtypes=None, edge_dtypes=None): convert node ids to this data type node_dtypes : dict of attribute name -> data type identifies additional is a numpy.dtype or Python type to cast one or more additional node attributes + defaults to {"elevation":float, ...
Change cryptdev.mapping `immediate` map option Change `delay_mapping` with default `True` to `immediate` with default `False`. This is consistent with `unmapping`. See
@@ -44,7 +44,7 @@ def mapped(name, opts=None, config='/etc/crypttab', persist=True, - delay_mapping=True, + immediate=False, match_on='name'): ''' Verify that a device is mapped @@ -71,9 +71,10 @@ def mapped(name, persist Set if the map should be saved in the crypttab, Default is ``True`` - delay_mapping - Set if the d...
Problem: py-abci not upgraded Solution: Upgrade py-abci to the latest fix
@@ -84,7 +84,7 @@ install_requires = [ 'pyyaml~=3.12', 'aiohttp~=2.3', 'python-rapidjson-schema==0.1.1', - 'abci==0.4.3', + 'abci==0.4.4', 'setproctitle~=1.1.0', ] @@ -131,7 +131,7 @@ setup( ], }, install_requires=install_requires, - dependency_links=['git+https://github.com/kansi/py-abci.git@master#egg=abci-0.4.3'], +...
Update TODO with description of [skip ci]
todo ==== -* move Model classmethods (select/insert/update/delete) to meta-class? -* better schema-manager support for sequences (and views?) -* additional examples in example dir +* GitHub #1991 - two left-outer joins, the intervening model should probably + be set to NULL rather than an empty model, when there is no ...
MAINT: fixed wording Fixed spelling and wording of docstrings.
@@ -519,7 +519,7 @@ class TestNetCDF4Integration(object): # Test the filtered output for mkey in mdict.keys(): if mkey not in fdict.keys(): - # Determine of the data is NaN + # Determine if the data is NaN try: is_nan = np.isnan(mdict[mkey]) except TypeError: @@ -552,7 +552,7 @@ class TestNetCDF4Integration(object): @p...
Fix ModelFeatureConfig bug Summary: Didn't import all the subclasses prior to filling union
@@ -24,6 +24,14 @@ from reagent.workflow.result_registries import ( from reagent.workflow.tagged_union import TaggedUnion # noqa F401 +try: + from reagent.fb.models.model_feature_config_builder import ( # noqa + ConfigeratorModelFeatureConfigProvider, + ) +except ImportError: + pass + + @dataclass class Dataset: parque...
fix: Deference symbolic link when create tar file Dereference all symbolic link when packing source code and dependencies. Symbolic link will unlikely have any meaning once deployed in the Docker instance.
@@ -331,7 +331,7 @@ def create_tar_file(source_files, target=None): else: _, filename = tempfile.mkstemp() - with tarfile.open(filename, mode="w:gz") as t: + with tarfile.open(filename, mode="w:gz", dereference=True) as t: for sf in source_files: # Add all files from the directory into the root of the directory structu...
raise execption when trying to create CompoundType with nested structured data type arrays
@@ -4795,11 +4795,12 @@ def _set_alignment(dt): for name in names: fmt = dt.fields[name][0] if fmt.kind == 'V': - if fmt.shape == () or fmt.subdtype[0].str[1] == 'V': - # nested scalar or array structured type + if fmt.shape == (): dtx = _set_alignment(dt.fields[name][0]) else: - # primitive data type + if fmt.subdtype...
ebuild.domain: freeze jitted forced_use and stable_forced_use attrs To make sure they're immutable.
@@ -303,17 +303,19 @@ class domain(config_domain): @klass.jit_attr_none def forced_use(self): - c = ChunkedDataDict() - c.merge(getattr(self.profile, 'forced_use')) - c.add_bare_global((), (self.arch,)) - return c + use = ChunkedDataDict() + use.merge(getattr(self.profile, 'forced_use')) + use.add_bare_global((), (self...
[mysql] fix version comparison operator Compare tuple against tuple, not string.
@@ -504,7 +504,7 @@ class MySql(AgentCheck): self.log.debug("Collecting Extra Status Metrics") metrics.update(OPTIONAL_STATUS_VARS) - if self._version_compatible(db, host, "5.6.6"): + if self._version_compatible(db, host, (5, 6, 6)): metrics.update(OPTIONAL_STATUS_VARS_5_6_6) if _is_affirmative(options.get('galera_clus...
README: Add Pyperclip dependency info in the "Configuration" section. This commit adds a "Copy to clipboard" sub-section in the Configuration section of the README. It explains the various utility packages required for copy/pasting operations via pyperclip on different OSes.
@@ -154,6 +154,26 @@ echo 'export ZT_NOTIFICATION_SOUND=Ping' >> ~/.zshenv source ~/.zshenv ``` +### Copy to clipboard + +Zulip Terminal allows users to copy certain texts to the clipboard via a Python module, [`Pyperclip`](https://pypi.org/project/pyperclip/). This module makes use of various system packages which may...
Clarify cryptdev.rm_crypttab documentation See
@@ -136,7 +136,8 @@ def crypttab(config='/etc/crypttab'): def rm_crypttab(name, device, config='/etc/crypttab'): ''' - Remove the device point from the crypttab + Remove the device point from the crypttab. If the described entry does not + exist, nothing is changed, but the command succeeds. CLI Example:
Cleanup test_blueprint.py to use test fixtures Modify several tests to use the app and client test fixtures.
@@ -202,9 +202,7 @@ def test_templates_and_static(test_apps): assert flask.render_template('nested/nested.txt') == 'I\'m nested' -def test_default_static_cache_timeout(): - app = flask.Flask(__name__) - +def test_default_static_cache_timeout(app): class MyBlueprint(flask.Blueprint): def get_send_file_max_age(self, file...
Corrected typo in rules.rst documentation Corrected typo from 'safed' to 'saved' in section *Defining groups for execution* in the rules documentation.
@@ -985,7 +985,7 @@ Defining groups for execution From Snakemake 5.0 on, it is possible to assign rules to groups. Such groups will be executed together in **cluster** or **cloud mode**, as a so-called **group job**, i.e., all jobs of a particular group will be submitted at once, to the same computing node. -By this, q...
get proxies: logging and performance improvement Improve logging and performace of get_cluster_proxies function: change log level from info to debug save loaded proxy configuration to config object related to
@@ -33,9 +33,12 @@ def get_cluster_proxies(): http_proxy = proxy_obj.get("spec", {}).get("httpProxy", "") https_proxy = proxy_obj.get("spec", {}).get("httpsProxy", "") no_proxy = proxy_obj.get("status", {}).get("noProxy", "") - logger.info("Using http_proxy: '%s'", http_proxy) - logger.info("Using https_proxy: '%s'", h...
op-guide: update jmespath Via:
@@ -701,3 +701,11 @@ Python 2.7.5 (default, Nov 6 2016, 00:28:07) Type "help", "copyright", "credits" or "license" for more information. >>> import jmespath ``` + +If `import jmespath` still reports an error after the `python2-jmespath` package is installed, install the Python `jmespath` module using pip: + +``` +$ sud...
Fixed moving item between mailboxes using impersonation Will now use delegation in this specific case.
@@ -96,7 +96,7 @@ script: logging.basicConfig(stream=log_stream, level=logging.DEBUG) from exchangelib.errors import ErrorItemNotFound, ResponseMessageError, TransportError, \ - ErrorFolderNotFound + ErrorFolderNotFound, ErrorToFolderNotFound from exchangelib.items import Item, Message from exchangelib.services import ...
move mixer offset correction setting to ro_lutman half of the mixer corrections are already known by the lutman, it's just natural that the lutman controls all of it. should also move the calibration routines here.
@@ -26,8 +26,16 @@ class Base_RO_LutMan(Base_LutMan): self.add_parameter('mixer_phi', vals=vals.Numbers(), unit='deg', parameter_class=ManualParameter, initial_value=0.0) + self.add_parameter('mixer_offs_I', unit='V', + parameter_class=ManualParameter, initial_value=0) + self.add_parameter('mixer_offs_Q', unit='V', + p...
Fix ndb test to use ipv6 localhost instead of ipv4. ipv6 setup stolen from https://groups.google.com/a/google.com/forum/#!msg/python-users/xwO_0_LK_oM/mnBEVBbfCgAJ All ndb tests pass with and without the --run_under=//tools/test:forge_ipv6_only
@@ -573,8 +573,8 @@ class ContextTestMixin(object): self.assertEqual(bar.name, 'updated-bar') def start_test_server(self): - host = '127.0.0.1' - s = socket.socket() + host = 'localhost' + s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) for i in range(10): ...
Add copy logic for LibTorch to avoid issues on Windows Summary: This should work both on VS and Ninja. Pull Request resolved:
@@ -39,6 +39,18 @@ this: target_link_libraries(example-app "${TORCH_LIBRARIES}") set_property(TARGET example-app PROPERTY CXX_STANDARD 11) + # The following code block is suggested to be used on Windows. + # According to https://github.com/pytorch/pytorch/issues/25457, + # the DLLs need to be copied to avoid memory err...
Support newer Python graphviz module Python graphviz 0.19 or later has _repr_image_svg_xml() instead of _repr_svg_().
@@ -453,8 +453,16 @@ def block_to_svg(block=None, split_state=True, maintain_arg_order=False): """ try: from graphviz import Source - return Source(block_to_graphviz_string(block, split_state=split_state, - maintain_arg_order=maintain_arg_order))._repr_svg_() + src = Source(block_to_graphviz_string(block, split_state=s...
fix dtype of SwapInflateTake with empty results The `evaluable.SwapInflateTake` evaluable generates two `list` objects with indices, `newtake` and `newinflate`, and returns them as `numpy.array(newtake)` and `numpy.array(newinflate)`. If the lists are empty, numpy assumes the dtype is `float`, which is wrong in this ca...
@@ -2644,7 +2644,7 @@ class SwapInflateTake(Evaluable): for j in [subinflate[k]] if uniqueinflate else numpy.equal(inflateidx.ravel(), n).nonzero()[0]: newinflate.append(i) newtake.append(j) - return numpy.array(newtake), numpy.array(newinflate), numpy.array(len(newtake)) + return numpy.array(newtake, dtype=int), numpy...
Fix x11 set wallpaper bug The `set_wallpaper` function can result in an unhandled `ConnectionException` when retrieving the root pixmap. This PR catches that exception and ensures a new pixmap is generated. Fixes
@@ -698,9 +698,13 @@ class Painter: width = max((win.x + win.width for win in root_windows)) height = max((win.y + win.height for win in root_windows)) + try: root_pixmap = self.default_screen.root.get_property( "_XROOTPMAP_ID", xcffib.xproto.Atom.PIXMAP, int ) + except xcffib.ConnectionException: + root_pixmap = None ...
Add Google PAIR-code Facets [Google PAIR-code Facets](https://github.com/pair-code/facets)
@@ -331,6 +331,9 @@ RUN pip install --upgrade mpld3 && \ pip install git+https://github.com/dvaida/hallucinate.git && \ pip install scikit-surprise && \ pip install pymongo && \ + # Add google PAIR-code Facets + cd /opt/ && git clone https://github.com/PAIR-code/facets && cd facets/ && jupyter nbextension install facet...
Remove wrong commit "Fix course scraping issue" This reverts commit
@@ -8,7 +8,6 @@ from functools import partial BASE_COURSE_URL = 'https://my.uq.edu.au/programs-courses/course.html?course_code=' BASE_ASSESSMENT_URL = 'https://www.courses.uq.edu.au/student_section_report.php?report=assessment&profileIds=' # noqa BASE_CALENDAR_URL = 'http://www.uq.edu.au/events/calendar_view.php?catego...
don't anti-alias box-type graph widgets The "box" graph type is all square shapes, like a bar-chart, with no curves, and so the anti-aliasing makes it look worse rather than being sharply defined edges that align with the pixels anyway.
@@ -75,6 +75,10 @@ class _Graph(base._Widget): self.oldtime = time.time() self.lag_cycles = 0 + def _configure(self, qtile, bar): + super()._configure(qtile, bar) + self.drawer.ctx.set_antialias(cairocffi.ANTIALIAS_NONE) + def timer_setup(self): self.timeout_add(self.frequency, self.update)