message
stringlengths
13
484
diff
stringlengths
38
4.63k
Add evm tx to tx_perf On my macbook pro 2.9 GHz Intel Core i7 (venv) zgw@mac:~/projects/pyquarkchain/quarkchain/experimental$ python tx_perf.py --evm=true Creating 10 identities Creating 5000 transactions... Creations PS: 4087.09 Verifying transactions Verifications PS: 4222.17 (venv) zgw@mac:~/projects/pyquarkchain/qu...
from quarkchain.tests.test_utils import create_random_test_transaction from quarkchain.core import Identity, Address +from quarkchain.evm.transactions import Transaction as EvmTransaction import argparse import random import time @@ -48,13 +49,64 @@ def test_perf(): print("Verifications PS: %.2f" % (N / duration)) +def...
switch-to-containers: do not fail when stopping the ceph-mgr daemon If we are working with a jewel cluster ceph mgr does not exist and this makes the playbook fail.
become: true pre_tasks: + # failed_when: false is here because if we're + # working with a jewel cluster then ceph mgr + # will not exist - name: stop non-containerized ceph mgr(s) service: name: "ceph-mgr@{{ ansible_hostname }}" state: stopped enabled: no + failed_when: false - set_fact: ceph_uid: 64045
Make URLs test insensitive to parameter order The order is generally based on the order in which they come out of a dictionary which varies between Python versions and makes our tests brittle.
# edited by hand! from collections import defaultdict +from urllib import parse from django.contrib.humanize.templatetags.humanize import intcomma from django.core.management import call_command @@ -62,9 +63,9 @@ class MeasuresTests(SeleniumTestCase): element = base_element.find_element_by_css_selector(css_selector) a_...
Diagram tools should also work for LinePresentation Like they do for DiagramLine.
@@ -23,6 +23,7 @@ from gaphas.tool import ( from gi.repository import Gdk from gi.repository import Gtk +from gaphor.UML.presentation import LinePresentation from gaphor.core import Transaction, transactional from gaphor.diagram.diagramline import DiagramLine from gaphor.diagram.elementitem import ElementItem @@ -39,7 ...
Move Git SHA defining at end of Dockerfile to re-enable caching Defining SHA at the beginning of build breaks caching, so this should be avoided.
FROM python:3.8-slim -# Define Git SHA build argument -ARG git_sha="development" - # Set pip to have cleaner logs and no saved cache ENV PIP_NO_CACHE_DIR=false \ PIPENV_HIDE_EMOJIS=1 \ PIPENV_IGNORE_VIRTUALENVS=1 \ - PIPENV_NOSPIN=1 \ - GIT_SHA=$git_sha + PIPENV_NOSPIN=1 RUN apt-get -y update \ && apt-get install -y \ ...
Add logic to process the case that fails the consensus of a leader complaint, even though it gets all votes of reps. Increase a round if the consensus of a leader complaint fails, even though it gets all votes of reps.
@@ -727,6 +727,11 @@ class BlockManager: if elected_leader: self.__channel_service.reset_leader(elected_leader, complained=True) self.__channel_service.reset_leader_complain_timer() + elif elected_leader is False: + util.logger.warning(f"Fail to elect the next leader on {self.epoch.round} round.") + # In this case, a n...
Initialize telegram variable Prevent errors when telegram is not set.
@@ -296,12 +296,14 @@ class Notification: tweeted = False pushed = False + telegram = False if PUSHBULLET: pushed = self.pbpush() if TWITTER: tweeted = self.tweet() + if TELEGRAM: telegram = self.sendToTelegram()
Corrected the name to Median Corrected the name to Median
{ - "word": "Modulate", + "word": "Median", "definitions": [ "denoting or relating to a value or quantity lying at the midpoint of a frequency distribution of observed values or quantities, such that there is an equal probability of falling above or below it", "situated in the middle, especially of the body"
Fixed: Color loss after re-editing under certain circumstances None values in style string from old node are not considered anymore. Resolves
@@ -1190,7 +1190,8 @@ class SvgElement(object): # Fetch the part of the source dict which is interesting for colorization src_style_dict = ss.parseStyle(src_style_string) color_style_dict = {key: value for key, value in src_style_dict.items() if - key in ["fill", "stroke", "opacity", "stroke-opacity", "fill-opacity"]} ...
Handle missing data from the API The following ensures that we handle missing data returned back from the new API. Although the new API isn't turned on in this branch, we should at least handle the case where it could be.
@@ -325,7 +325,7 @@ class AddApplicationChange(ChangeInfo): charm_url=charm, application=self.application, series=self.series, - config=self.options, + config=options, constraints=self.constraints, endpoint_bindings=self.endpoint_bindings, resources=resources, @@ -337,10 +337,10 @@ class AddApplicationChange(ChangeInfo...
Update pi18.py fix first response (drop extra char)
@@ -168,7 +168,7 @@ class pi18(AbstractProtocol): return ["NAK"] # Drop ^Dxxx from first response - responses[0] = responses[0][4:] + responses[0] = responses[0][5:] # Remove CRC of last response responses[-1] = responses[-1][:-3] return responses
python3 compatibility for raise python3 compatibility for raise
@@ -1027,7 +1027,7 @@ class Collections(PlexObject): 'showItems': '2'} key = mode_dict.get(mode) if mode is None: - raise BadRequest('Unknown collection mode : %s. Options %s' % (mode, mode_dict.key())) + raise BadRequest('Unknown collection mode : %s. Options %s' % (mode, list(mode_dict.key()))) part = '/library/metad...
Change BlockValidationAborted to BlockValidationError This exception is raised by helper functions, and it's not their job to declare that a block should be aborted.
@@ -32,12 +32,10 @@ from sawtooth_validator.state.merkle import INIT_ROOT_KEY LOGGER = logging.getLogger(__name__) -class BlockValidationAborted(Exception): +class BlockValidationError(Exception): """ - Indication that the validation of this fork has terminated for an - expected(handled) case and that the processing sh...
Fix CurrentLayout widget for default layouts The widget defaults to showing layout at index 0 when it loads but if a user has set a default layout for the group, the current layout index will be different. Fixes
@@ -46,7 +46,8 @@ class CurrentLayout(base._TextBox): def _configure(self, qtile, bar): base._TextBox._configure(self, qtile, bar) - self.text = self.bar.screen.group.layouts[0].name + layout_id = self.bar.screen.group.current_layout + self.text = self.bar.screen.group.layouts[layout_id].name self.setup_hooks() self.ad...
pytorch_to_onnx.py: allow specifying multiple model paths The intended use for this is to enable the use of custom model creation modules placed in the model config directory, for cases when a model can't just be instantiated with a constructor with simple arguments.
import argparse import importlib +import os import sys from pathlib import Path @@ -48,7 +49,7 @@ def parse_args(): help='Shape of the input blob') parser.add_argument('--output-file', type=Path, required=True, help='Path to the output ONNX model') - parser.add_argument('--model-path', type=str, + parser.add_argument('...
Allow pre-releases vesions (dev, alpha, etc.) of documentation requirements in the docs build, so long as the meet the minimum requirements. This will be needed especially for development/testing of our own packages, such as sphinx-astropy. Fixes [skip ci]
@@ -51,7 +51,7 @@ for line in importlib_metadata.requires('astropy'): except importlib_metadata.PackageNotFoundError: missing_requirements[req_package] = req_specifier - if version not in SpecifierSet(req_specifier): + if version not in SpecifierSet(req_specifier, prereleases=True): missing_requirements[req_package] = ...
Add settings to schema.yaml chatwork_proxy chatwork_proxy_login chatwork_proxy_pass dingtalk_proxy dingtalk_proxy_login dingtalk_proxy_pass
@@ -305,6 +305,9 @@ properties: ### Chatwork chatwork_apikey: {type: string} chatwork_room_id: {type: string} + chatwork_proxy: {type: string} + chatwork_proxy_login: {type: string} + chatwork_proxy_pass: {type: string} ### Command command: *arrayOfString @@ -322,6 +325,9 @@ properties: dingtalk_single_title: {type: st...
Optimization: Slightly faster float digit checks * Avoid recalculating float digit boundary for every call, that can only be slow.
@@ -350,7 +350,7 @@ def isDebugPython(): return hasattr(sys, "gettotalrefcount") -def isPythonValidDigitValue(value): +def _getFloatDigitBoundaryValue(): if python_version < 0x270: bits_per_digit = 15 elif python_version < 0x300: @@ -358,10 +358,19 @@ def isPythonValidDigitValue(value): else: bits_per_digit = sys.int_i...
[setup] add pathlib2 to PY2 dependencies version.package_version() uses pathlib which is a python 3 library. pathlib2 is required for python 2.7 then.
@@ -110,6 +110,10 @@ if PY2: # ipaddr 2.1.10+ is distributed with Debian and Fedora. See T105443. dependencies.append('ipaddr>=2.1.10') + # version.package_version() uses pathlib which is a python 3 library. + # pathlib2 is required for python 2.7 + dependencies.append('pathlib2') + if (2, 7, 6) < PYTHON_VERSION < (2, ...
is_visible_from: remove obsolete TODO TN:
@@ -287,10 +287,6 @@ def is_visible_from(referenced_env, base_env): Expression that will return whether an env's associated compilation unit is visible from another env's compilation unit. - TODO: This is mainly exposed on envs because the AnalysisUnit type is not - exposed in the DSL yet. We might want to change that ...
Add extra tests from upstream Add analogues of new upstream tests, with somewhat different behaviour because metadata loading is different.
@@ -2977,6 +2977,21 @@ class PhoneNumberUtilTest(TestMetadataTestCase): # Python version extra test: check with bogus region self.assertFalse(phonenumbers.is_mobile_number_portable_region("XY")) + def testGetMetadataForRegionForNonGeoEntity_shouldBeNull(self): + self.assertTrue(PhoneMetadata.metadata_for_region("001") ...
Add documentation fro terminate mutation in graphql Summary: Resolves Test Plan: View docs page Reviewers: yuhan, sashank
@@ -264,3 +264,28 @@ If you want to use a preset instead of defining the run config, use the `preset` } } } + +### Terminate a running pipeline + +If you want to stop execution of a pipeline that's currently running, use the `terminatePipelineExecution` mutation. The only required argument for this mutation is the ID o...
docs: remove lfs_criterion_us_states Remove it from the default installation for now until its ported to Django 1.10.
@@ -149,7 +149,6 @@ execute following steps: ["lfs.criteria.models.WeightCriterion", _(u"Weight")], ["lfs.criteria.models.ShippingMethodCriterion", _(u"Shipping Method")], ["lfs.criteria.models.PaymentMethodCriterion", _(u"Payment Method")], - ["lfs_criterion_us_states.models.USStatesCriterion", _(u"US State")], ] LFS_...
Update CODE_OF_CONDUCT.md Updated contact e-mail address for code of conduct issues.
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at william.usher{THATSIGN}ouce.ox.ac.uk. All +reported by contacting the project team at wusher{THATSIGN}kth.se. All ...
Fix update method in handler It should not be an aliast for assign. It should be used only for files.
# from typing import TYPE_CHECKING, Union, Iterable +from neptune.new.attributes import File from neptune.new.attributes.file_set import FileSet from neptune.new.attributes.series import FileSeries from neptune.new.attributes.series.float_series import FloatSeries @@ -23,7 +24,7 @@ from neptune.new.attributes.sets.stri...
igw: stop tcmu-runner on iscsi purge When the iscsi purge playbook is run we stop the gw and api daemons but not tcmu-runner which I forgot on the previous PR. Fixes Red Hat BZ:
igw_purge: mode="disks" when: igw_purge_type == 'all' - - name: stop and disable rbd-target-api daemon + - name: stop and disable daemons service: - name: rbd-target-api - state: stopped - enabled: no - when: igw_purge_type == 'all' - - - name: stop and disable rbd-target-gw daemon - service: - name: rbd-target-gw + na...
asset store bug fix Test Plan: bk Reviewers: sandyryza, cdecarolis, schrockn
@@ -42,7 +42,7 @@ def asset_pipeline(): def test_result_output(): with seven.TemporaryDirectory() as tmpdir_path: - asset_store = default_filesystem_asset_store.configured({"base_dir": tmpdir_path}) + asset_store = fs_asset_store.configured({"base_dir": tmpdir_path}) pipeline_def = define_asset_pipeline(asset_store, {}...
lint: Check for occurrences of `.includes` except in `frontend_tests/`. Adds a custom check to js_rules in `/tools/lint/lib/custom_check.py`.
@@ -188,6 +188,9 @@ def build_custom_checkers(by_lang): 'description': 'Do not concatenate i18n strings'}, {'pattern': '\+.*i18n\.t\(.+\)', 'description': 'Do not concatenate i18n strings'}, + {'pattern': '[.]includes[(]', + 'exclude': ['frontend_tests/'], + 'description': '.includes() is incompatible with Internet Exp...
modify comments of rgb and lab conversion * modify comments of rgb and lab conversion * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see
@@ -17,7 +17,7 @@ def rgb_to_lab(image: torch.Tensor) -> torch.Tensor: .. image:: _static/img/rgb_to_lab.png - The image data is assumed to be in the range of :math:`[0, 1]`. Lab + The input RGB image is assumed to be in the range of :math:`[0, 1]`. Lab color is computed using the D65 illuminant and Observer 2. Args: @...
Fix parameter interpretation of 'with_latest_from' The following instructions are not correctly interpretated, because the result selector gets ignored: s1.with_latest_from([s2], lambda v1, v2=v1+v2) Observable.with_latest_from([s2], lambda v1, v2=v1+v2)
@@ -23,13 +23,14 @@ def with_latest_from(self, *args): elements of the sources using the specified result selector function. """ - args = list(args) if args and isinstance(args[0], list): - args = args[0] - - args.insert(0, self) + children = args[0] + result_selector = args[1] + args_ = [self] + children + [result_sel...
Update data.rst Update csv format according to feedback
@@ -72,13 +72,18 @@ Converting CSV Format into Qlib Format ``Qlib`` has provided the script ``scripts/dump_bin.py`` to convert **any** data in CSV format into `.bin` files (``Qlib`` format) as long as they are in the correct format. -Users can download the 1 day demo china-stock data in CSV format as follows for refere...
[tests] Fix site_tests.TestLogPages tests test_logpages and test_list_namespace are sometimes failing due to autoblock removal entries. Check for this case.
@@ -1353,6 +1353,7 @@ class TestLogPages(DefaultSiteTestCase, DeprecationTestCase): self.assertLessEqual(len(le), 10) for entry in le: self.assertIsInstance(entry, tuple) + if not isinstance(entry[0], int): # autoblock removal entry self.assertIsInstance(entry[0], pywikibot.Page) self.assertIsInstance(entry[1], basestr...
llvm, functions/ContentAddressableMemory: Cleanup Reuse existing poitners. Use 'None' instance to zero out output memory location.
@@ -771,14 +771,9 @@ class ContentAddressableMemory(MemoryFunction): # ----------------------------- var_val_ptr = builder.gep(arg_in, [ctx.int32_ty(0), ctx.int32_ty(1)]) # Zero output + builder.store(arg_out.type.pointee(None), arg_out) out_key_ptr = builder.gep(arg_out, [ctx.int32_ty(0), ctx.int32_ty(0)]) out_val_ptr...
[skip ci][CI][Fix] Fixing lint A linting issue was introduced in fixing this up.
@@ -59,7 +59,9 @@ def conv2d_transpose_nchw(cfg, data, kernel, stride, padding, out_dtype, output_ stride_height, stride_width = stride outpad_height, outpad_width = output_padding assert outpad_height < stride_height and outpad_width < stride_width - assert inp_channels % groups == 0, f"input channels {inp_channels} m...
Remove regularization_weight from hpo_default since it belongs to Regularizer
@@ -23,8 +23,7 @@ class ComplEx(BaseModule): """An implementation of ComplEx [trouillon2016]_.""" hpo_default = dict( - embedding_dim=dict(type=int, low=50, high=300, q=50), - regularization_weight=dict(type=float, low=0.0, high=0.1, scale='log'), + embedding_dim=dict(type=int, low=50, high=300, q=50) ) loss_default = ...
Shortcut syntax for choices with same label & data This would allow for a convenient shortcut syntax for entering choices. If label and data are both the same, you can do ['One', 'Two', 'Three'] instead of [('One', 'One'), ('Two', 'Two'), ('Three', 'Three')]
@@ -522,7 +522,12 @@ class SelectField(SelectFieldBase): self.validate_choice = validate_choice def iter_choices(self): - for value, label in self.choices: + if isinstance(self.choices[0], (list, tuple)): + choices = self.choices + else: + choices = zip(self.choices, self.choices) + + for value, label in choices: yield...
Correctly handle invalid titles in harvest_template.py Neither of those constructors raises that exception.
@@ -182,14 +182,15 @@ class HarvestRobot(WikidataBot): def _template_link_target(self, item, link_text): link = pywikibot.Link(link_text) - try: linked_page = pywikibot.Page(link) + try: + exists = linked_page.exists() except pywikibot.exceptions.InvalidTitle: - pywikibot.error('%s is not a valid title so it cannot be ...
Fix open file not working when using open command and double click files * When using open command or double click on macOS would send a file url with trailing slash. It's the cause of failing to open a file. By removing it, the problem would be solved.
@@ -241,6 +241,7 @@ class DocumentApp(App): fileURL (str): The URL/path to the file to add as a document. """ # Convert a cocoa fileURL to a file path. + fileURL = fileURL.strip('/') path = unquote(urlparse(fileURL).path) extension = os.path.splitext(path)[1][1:]
Link directly to 7.0.0 release notes for migration guide The previous link is to the releases page, so requires a bit of hunting to find the actual migration guide. This PR links directly to the release (7.0.0) which lists the main breaking changes for Thumbor 7 and how to migrate.
@@ -32,7 +32,7 @@ more details):: .. warning:: Release 7.0.0 introduces a major breaking change due to the migration to python 3 and the modernization of our codebase. Please read the - `release notes <https://github.com/thumbor/thumbor/releases>`_ + `release notes <https://github.com/thumbor/thumbor/releases/tag/7.0.0...
Update translation *.po/*.mo files regenerating django.po/django.mo file and translate it Some of the old translations weren't showing up
Binary files a/taggit/locale/ar/LC_MESSAGES/django.mo and b/taggit/locale/ar/LC_MESSAGES/django.mo differ
Use eval() replace globals() & fix spell mistake `globals()` would return all the current scope variable dict, it will make the code a bit chaos. Lucky, the `FX` dict value is also the calling function name itself. So the `eval()` could be a little helper to handle this dirty work property.
@@ -158,8 +158,9 @@ while run: ''') choice = input() try: - fx = FX[int(choice)] - run = globals()[fx]() + # Via eval() let `str expression` to `function` + fx = eval(FX[int(choice)]) + run = fx() except KeyError: system('clear') if count <= 5: @@ -167,5 +168,5 @@ while run: print("----------enter proper key-----------...
[circleci] Tolerate 20 DRC/ LVS errors before erroring out
@@ -251,7 +251,7 @@ jobs: pip install align[test] -f ./dist filter="<<parameters.design>>" filter="<<parameters.pdk>>${filter:+ and $filter}" - pytest -vv --runnightly --maxerrors=10 --timeout=<<parameters.timeout>> -k "$filter" -- tests/integration + pytest -vv --runnightly --maxerrors=20 --timeout=<<parameters.timeou...
test_home: Fix wrong bot references in test_people. These are all referring to email_gateway_bot, when they're supposed to refer to the notification and welcome bots, respectively. The values are the same though, so the tests were passing anyway.
@@ -615,7 +615,7 @@ class HomeTest(ZulipTestCase): is_guest=False, ), dict( - avatar_version=email_gateway_bot.avatar_version, + avatar_version=notification_bot.avatar_version, bot_owner_id=None, bot_type=1, email=notification_bot.email, @@ -629,7 +629,7 @@ class HomeTest(ZulipTestCase): is_guest=False, ), dict( - avat...
Install pyOpenSSL from pip for chromium images. Chromium's install-build-deps.sh installs 16.04's version, which is incompatible with google cloud SDK.
@@ -37,7 +37,10 @@ RUN apt-get update && \ nodejs-legacy \ pulseaudio \ xdotool \ - xvfb + xvfb && \ + # 16.04's pyOpenSSL (installed by install-build-deps.sh) is too old for + # Google Cloud SDK. + sudo pip install pyOpenSSL==19.0.0 # Needed for older versions of Chrome. RUN ln -s /usr/lib/x86_64-linux-gnu/libudev.so ...
Address comments on CONTRIBUTING Added a couple more bullets to naming convention Linked to Google's guide Removed Additional Style subsection Added 15 lines of example code. It obviously leaves much uncovered, but perhaps captures the essence of the style.
@@ -141,37 +141,48 @@ C++ code should be compatible with standard C++11. Naming ~~~~~~ -* File names should be lowercase with underscores and end with ``.cpp`` or ``.hpp``. -* Type names should be PascalCase. i.e. :code:`AdjArrayBQM` + +* File names should be lowercase with underscores or dashes and end with ``.cpp`` o...
deploy: update component label value for recovery Adds new component label "app-recovery" for the recovery endpoint"
@@ -269,7 +269,7 @@ parameters: value: "quay-component" displayName: quay app selector label - name: QUAY_APP_COMPONENT_LABEL_VALUE - value: "app" + value: "app-recovery" displayName: quay app selector label value - name: LOADBALANCER_SERVICE_PORT value: "443"
Fix collision in workunit affecting patches. and collided, and a test broke on master.
@@ -651,7 +651,9 @@ class StreamingWorkunitTests(unittest.TestCase, SchedulerTestBase): scheduler.product_request(Output, subjects=[0]) finished = list(itertools.chain.from_iterable(tracker.finished_workunit_chunks)) - workunit = next(item for item in finished if item["name"] == "a_rule") + workunit = next( + item for ...
Implement Twilio Copilot Alerting Maintain compatibility with Twilio SMS API, validate new settings conditionally using the 'twilio_use_copilot' flag. Throws EAException in case of an incorrect combination of settings.
@@ -1483,10 +1483,20 @@ class TwilioAlerter(Alerter): client = TwilioClient(self.twilio_account_sid, self.twilio_auth_token) try: + if self.twilio_use_copilot: + if self.twilio_message_service_sid == None: + raise EAException("Twilio Copilot requires the 'twilio_message_service_sid' option") + client.messages.create(bo...
Update ac_train.sh change the folder name for train.rules.json & entity_rules.json from DATA_FOLDER to ORACLE_FOLDER
@@ -39,8 +39,8 @@ else # Copy variables that we will need for standalone cp $DATA_FOLDER/dict.* ${MODEL_FOLDER}-seed${seed}/ - cp $DATA_FOLDER/train.rules.json ${MODEL_FOLDER}-seed${seed}/ - cp $DATA_FOLDER/entity_rules.json ${MODEL_FOLDER}-seed${seed}/ + cp $ORACLE_FOLDER/train.rules.json ${MODEL_FOLDER}-seed${seed}/ ...
Apply flake8 and black formatting Use helper to retrieve schemas
@@ -280,13 +280,15 @@ class TestComponents: class TestPlugin(BasePlugin): def init_spec(self, spec): spec.components.schema( - "TestSchema", {"properties": {"key": {"type": "string"}}, "type": "object"} + "TestSchema", + {"properties": {"key": {"type": "string"}}, "type": "object"}, ) - spec = APISpec("Test API", versi...
[air] Update to use more verbose default config for trainers. Internal user feedback showing that more detailed logging is preferred:
@@ -169,4 +169,4 @@ class RunConfig: stop: Optional[Union[Mapping, "Stopper", Callable[[str, Mapping], bool]]] = None failure: Optional[FailureConfig] = None sync_config: Optional[SyncConfig] = None - verbose: Union[int, Verbosity] = Verbosity.V2_TRIAL_NORM + verbose: Union[int, Verbosity] = Verbosity.V3_TRIAL_DETAILS
purge-container-cluster: always prune force Since podman 2.x, there's now a confirmation when running podman container prune command.
- name: remove stopped/exited containers command: > - {{ container_binary }} container prune{% if container_binary == 'docker' %} -f{% endif %} + {{ container_binary }} container prune -f changed_when: false - name: show container list on all the nodes (should be empty)
Remove unused methods on ParseContext `ParseContext.create_object_if_not_exists` and `Storage.add_if_not_exists` are no longer invoked anywhere in pants. This commit removes these methods.
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -import functools import threading @@ -20,14 +19,6 @@ class Storage(threading.local): self.objects_by_name[name] = obj self.objects.append(obj) - def add_if_not_exists(self, name, obj_creat...
build: Bump isort from 5.11.4 to 5.12.0 New version requires python >=3.8 but that should be ok now with the refactored requirements files.
# (We are not so interested in the specific versions of the tools: the versions # are pinned to prevent unexpected linting failures when tools update) black==22.12.0 -isort==5.11.4 +isort==5.12.0 pylint==2.16.1 mypy==0.991 bandit==1.7.4
[docs] Deprecate RTD -- add meta refresh to redirect to new site Summary: {F141658} Test Plan: bk Reviewers: sashank, schrockn
.. title:: Home \ No newline at end of file - -.. toctree:: - :maxdepth: 3 - :includehidden: - :name: Documentation - - Install <sections/install/index> - Tutorial <sections/tutorial/index> - Learn <sections/learn/index> - API Docs <sections/api/index> - Deploying <sections/deploying/index> - Community <sections/commun...
Clean up settings overlay "Your Account" tab display. This enforces a max-width of 1024px on the #settings overlay. This commit also cleans up the "Your Account" tab to display correctly without the avatar bleeding over to the next line.
@@ -39,6 +39,16 @@ label { min-width: 200px; } +.new-style .grid .user-name-section label { + min-width: 120px; +} + +.new-style .grid .user-name-section .warning { + display: block; + width: calc(100% - 20px - 5px); + text-align: right; +} + .new-style .grid .warning { display: inline-block; vertical-align: top; @@ -7...
Add bucket suffixes Based on what I found and other reports, I add some suffix like prod, production, staging, etc
@@ -22,7 +22,7 @@ class sfp_s3bucket(SpiderFootPlugin): # Default options opts = { "endpoints": "s3.amazonaws.com,s3-external-1.amazonaws.com,s3-us-west-1.amazonaws.com,s3-us-west-2.amazonaws.com,s3.ap-south-1.amazonaws.com,s3-ap-south-1.amazonaws.com,s3.ap-northeast-2.amazonaws.com,s3-ap-northeast-2.amazonaws.com,s3-a...
Add Guild.get_channel_or_thread helper method The name might change in the future, unsure.
@@ -599,6 +599,24 @@ class Guild(Hashable): return self._channels.get(id) or self._threads.get(id) + def get_channel_or_thread(self, channel_id: int, /) -> Optional[Union[Thread, GuildChannel]]: + """Returns a channel or thread with the given ID. + + .. versionadded:: 2.0 + + Parameters + ----------- + channel_id: :cla...
Document how to use tox This is probably a good idea, so that developers can test with the same set of tools and envronments that the CI server uses.
@@ -52,34 +52,63 @@ performance by running the following command. python tests/benchmarks.py -Makefile Utility ----------------- +Running all the tests +--------------------- -Makefiles are a simple way to perform code compilation on ``Linux platforms``. +You can run all of ChatterBot's tests with a single command: ``t...
Add register_manager docs * Add register_manager docs Fixes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see
@@ -142,6 +142,16 @@ class BaseModelClass(metaclass=BaseModelMetaClass): def register_manager(cls, adata_manager: AnnDataManager): """ Registers an :class:`~scvi.data.AnnDataManager` instance with this model class. + + Stores the :class:`~scvi.data.AnnDataManager` reference in a class-specific manager store. + Intended...
Changes travis max-line-length to 80 Fixes
@@ -12,8 +12,8 @@ install: before_script: # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - - flake8 . --count --exit-zero --max-complexi...
Update Sauter link This appears to be the active one. FAO
@@ -102,7 +102,7 @@ Matthew Webber. .. _`CCP4`: http://www.ccp4.ac.uk/ .. _`Diamond Light Source`: http://www.diamond.ac.uk/Home.html .. _`Dr Gwyndaf Evans`: http://www.diamond.ac.uk/Beamlines/Mx/VMXm/Staff/Evans.html -.. _`Dr Nicholas Sauter`: http://pbd.lbl.gov/scientists/nicholas-sauter/ +.. _`Dr Nicholas Sauter`: h...
fix: Clear user cache on doctype insert No need to do Settings -> Reload after creating a new doctype
from __future__ import unicode_literals import re, copy, os, shutil import json +from frappe.cache_manager import clear_user_cache # imports - third party imports import six @@ -103,6 +104,10 @@ class DocType(Document): self.owner = 'Administrator' self.modified_by = 'Administrator' + def after_insert(self): + # clear ...
Rely on types.UpdateChatPinnedMessage for chat unpins Fixes probably.
@@ -38,6 +38,10 @@ class ChatAction(EventBuilder): return cls.Event(types.PeerChannel(update.channel_id), unpin=True) + elif isinstance(update, types.UpdateChatPinnedMessage) and update.id == 0: + return cls.Event(types.PeerChat(update.chat_id), + unpin=True) + elif isinstance(update, types.UpdateChatParticipantAdd): r...
enable vector test for clang 4.0 fix
@@ -185,10 +185,6 @@ class BaseTestCompleter(object): # Verify that we got the expected completions back. self.assertIsNotNone(completions) - if platform.system() == "Windows": - # disable the windows tests for now until AppVeyor fixes things - self.tear_down() - return expected = ['begin\titerator begin()', 'begin()']...
create settings method for LibrarySection return current library settings
@@ -4,6 +4,7 @@ from plexapi.base import PlexObject from plexapi.compat import unquote, urlencode, quote_plus from plexapi.media import MediaTag from plexapi.exceptions import BadRequest, NotFound +from plexapi.settings import Setting class Library(PlexObject): @@ -401,6 +402,12 @@ class LibrarySection(PlexObject): key...
Fix ReplyKeyboardMarkup's add method Fix when add method taking multiple buttons was adding one button to a new row and then adding items to rows according to row_width
@@ -41,7 +41,7 @@ class ReplyKeyboardMarkup(base.TelegramObject): :rtype: :obj:`types.ReplyKeyboardMarkup` """ row = [] - for index, button in enumerate(args): + for index, button in enumerate(args, start=1): row.append(button) if index % self.row_width == 0: self.keyboard.append(row)
vocabulary raises warning when loading from nonexistent dataset series fixes
@@ -123,6 +123,10 @@ def from_dataset(datasets: List[Dataset], series_ids: List[str], max_size: int, warn("Inferring vocabulary from lazy dataset!") for series_id in series_ids: + if not dataset.has_series(series_id): + warn("Data series '{}' not present in the dataset" + .format(series_id)) + series = dataset.get_seri...
MNT: remove dead code This got moved out to __read_and_stash_a_motor
@@ -1051,19 +1051,6 @@ def reset_positions_wrapper(plan, devices=None): else: coupled_parents = set() - def read_and_stash_a_motor(obj): - try: - cur_pos = obj.position - except AttributeError: - reading = yield Msg('read', obj) - if reading is None: - # this plan may be being list-ified - cur_pos = 0 - else: - k = lis...
Update task.json Fixes typo, lack of closing quotes
{ "input": "In which direction should one look to see the Sun in the morning?", "target_scores": { - "East: 1, + "East": 1, "North": 0, "South": 0, "West": 0, { "input": "In which direction should one look to see the Sun in the evening?", "target_scores": { - "East: 1, + "East": 1, "North": 0, "South": 0, "West": 0,
Reinstate 'counter' function in subdoc. Tested-by: Ellis Breen Tested-by: Build Bot
@@ -2,7 +2,7 @@ from typing import * from couchbase_core import subdocument as SD import couchbase_core.priv_constants as _P from .options import OptionBlockTimeOut -from couchbase_core.subdocument import array_addunique, array_append, array_insert, array_prepend, insert, remove, replace, upsert, Spec +from couchbase_c...
docstrings and better handling added docstring and better handling of the parameters.
@@ -1008,18 +1008,47 @@ class Collections(PlexObject): part = '/library/metadata/%s' % self.ratingKey return self._server.query(part, method=self._server._session.delete) - def modeUpdate(self, mode=['default', 'hide', 'hideItems', 'showItems']): + def modeUpdate(self, mode=None): + """ Update Collection Mode + + Param...
Remove non-sequitur Jenkins configuraton How to set up and use sudoers has nothing to do with this function.
@@ -186,22 +186,6 @@ def send( salt-call event.send myco/mytag foo=Foo bar=Bar salt-call event.send 'myco/mytag' '{foo: Foo, bar: Bar}' - A convenient way to allow Jenkins to execute ``salt-call`` is via sudo. The - following rule in sudoers will allow the ``jenkins`` user to run only the - following command. - - ``/et...
Incorrect Striping of Hashtags Comment on Hashtags method
@@ -433,8 +433,8 @@ def menu_comment(): hashtag = input("what?").strip() else: hashtag = random.choice(bot.read_list_from_file(hashtag_file)) - for hashtags in hashtag: - bot.comment_hashtag(hashtags) + #for hashtags in hashtag: + bot.comment_hashtag(hashtag) elif ans == "2": print("""
Fixing new_project fixture We need to ensure to switch to the default project
@@ -138,7 +138,10 @@ def create_project(request): """ Delete the project """ - class_instance.project_obj.delete(resource_name=class_instance.namespace) + ocp.switch_to_default_rook_cluster_project() + class_instance.project_obj.delete( + resource_name=class_instance.namespace + ) class_instance.project_obj.wait_for_de...
enhancement: solid voxelization add methods for solid voxelization, call show(solid_mode=True) for visualization
@@ -203,6 +203,14 @@ class VoxelMesh(Voxel): self._cache['origin'] = origin return voxels + @util.cache_decorator + def sparse_solid(self): + voxels, origin = voxelize_subdivide_solid(mesh=self._data['mesh'], + pitch=self._data['pitch'], + max_iter=self._data['max_iter'][0]) + self._cache['origin'] = origin + return vo...
[IMPR] Add support for translated dates/times This implementation just combines date, year and time from pywikibot.date lookup. It could be more precise if MonthFormat would have a day_years_format entry but most of the current year_formats entries are default which just append the year to the month.
@@ -43,8 +43,10 @@ and override its `callback` method. Here is a sample: from typing import Union import pywikibot + from pywikibot import i18n from pywikibot.bot import OptionHandler +from pywikibot.date import format_date, formatYear from pywikibot.exceptions import APIError, Error from pywikibot.tools.formatter impo...
Update RELEASE.md Add upstream note
* Update version constants (find them by running `git grep [VERSION_NUMBER]`) * Create changelog entry (edit CHANGELOG.md with a one-liner for each closed issue going in the release) * Commit and push changes to master with the message: "Version Bump to v[VERSION_NUMBER]" -* Push tag and PyPi `fab release:[VERSION_NUMB...
Add converters to and from dictionary Implement PWInput.as_dict() and PWInput.from_dict(pwinput_dict) methods to the PWInput class.
@@ -173,6 +173,44 @@ class PWInput(object): out.append(" %f %f %f" % (vec[0], vec[1], vec[2])) return "\n".join(out) + def as_dict(self): + """ + Create a dictionary representation of a PWInput object + + Returns: + dict + """ + pwinput_dict = {'structure': self.structure.as_dict(), + 'pseudo': self.pseudo, + 'sections...
Standalone: Do not include "site" module as compiled * The "site" module should not be included, but if it is, do not compile via C code, as some modern ".pth" files insist on Python frame stacks.
@@ -1365,6 +1365,7 @@ class NuitkaPluginPopularImplicitImports(NuitkaPluginBase): "telethon.tl.types", # Not performance relevant and slow C compile "importlib_metadata", # Not performance relevant and slow C compile "comtypes.gen", # Not performance relevant and slow C compile + "site", # Not performance relevant and ...
[benchmarks][libxml2-v2.9.2] Fix broken build Fix broken build by ignoring git's unhelpful conversion of CRLF to LF.
@@ -33,7 +33,15 @@ build_lib() { ) } -get_git_tag https://gitlab.gnome.org/GNOME/libxml2.git v2.9.2 SRC +git clone https://gitlab.gnome.org/GNOME/libxml2.git SRC +cd SRC + +# Git is converting CRLF to LF automatically and causing issues when checking +# out the branch. So use -f to ignore the complaint about lost chang...
Build and install VMAF Fixes
@@ -210,18 +210,33 @@ RUN \ rm -vf /etc/ssh/ssh_host_* && \ curl -sSL https://github.com/xiph/rd_tool/tarball/master | tar zxf - -C ${RD_TOOL_DIR} --strip-components=1 +# install meson +RUN \ + apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build && \ + pip3 install meson + # install dav1...
Simplify nonnull_count computation in PandasDataset Accommodates error raised in pandas 0.21 (plus it's simpler).
@@ -192,7 +192,9 @@ class MetaPandasDataset(Dataset): element_count = int(len(series)) nonnull_values = series[null_indexes == False] - nonnull_count = int((null_indexes == False).sum()) + # Simplify this expression because the old version fails under pandas 0.21 (but only that version) + # nonnull_count = int((null_in...
Update JARVIS.py Added "open" to "open {x program}" in all app-opening processes added github to website opener added discord to app-opening process changed some grammar added a clip and record/stop recording function
@@ -15,7 +15,8 @@ import subprocess # subprocess module allows you to spawn new processes import pyjokes import requests import json - +#for 30 seconds clip "Jarvis, clip that!" and discord ctrl+k quick-move (might not come to fruition) +from pynut import keyboard # ======= from playsound import * #for sound output # m...
Added to complete cfg for MM1 serial port change. Linked with previous commit.
@@ -176,6 +176,13 @@ MM1_MAX_FORWARD = 2000 # Max throttle to go fowrward. The bigger the fa MM1_STOPPED_PWM = 1500 MM1_MAX_REVERSE = 1000 # Max throttle to go reverse. The smaller the faster MM1_SHOW_STEERING_VALUE = False +# Serial port -- Default Pi: '/dev/ttyS0' +# -- Jetson Nano: '/dev/ttyTHS1' +# -- Google coral:...
Need to quote python versions. Also added 3.11 because why not.
@@ -7,7 +7,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04, ubuntu22.04, macos-12, windows-2022] - python-version: [3.9, 3.10] + python-version: ['3.9', '3.10', '3.11'] runs-on: ${{ matrix.os }} steps:
Typo on line 942 interactive should be interaction
@@ -939,7 +939,7 @@ calculation so that it can be used later with new values. JobConnections -------------- Larger pyQuil programs can take longer than 30 seconds to run. These jobs can be posted into the -cloud job queue using a different connection object. The mode of interactive with the API is +cloud job queue usin...
fix: VM Resize with StopStart VM Resize testcase with StopStart leaves VM in Stop state if Resize raises an exception. This PR is to Start VM before raising an exception
@@ -154,9 +154,10 @@ class VmResize(TestSuite): else: raise identifier time.sleep(1) - assert expected_vm_capability, "fail to find proper vm size" + finally: if not hot_resize: start_stop.start() + assert expected_vm_capability, "fail to find proper vm size" test_result.information["final_vm_size"] = final_vm_size tes...
Add GitLab CI trigger for Conan package Build Conan package as part of CI Upload to Artifactory for commits to "main": - use "PACKAGE/VERSION@xed/stable" reference when tagged with "vVERSION" - use "PACKAGE/SHA@xed/ci" reference for unversioned commits Update alias reference "PACKAGE/latest@xed/ci"
# .gitlab-ci.yml +variables: + PACKAGE_NAME: xed-common + build: #image: ubuntu:18.04 #image: xed-testing-container @@ -7,3 +10,26 @@ build: stage: build script: - python3 ci-internal.py + +build-conan: + image: amr-registry.caas.intel.com/syssim/teamcity-agent:2020.1.5-21ww05 + stage: build + script: + - virtualenv --...
Use single part as default The data stored in artifact storage are usually small. Using multi-part is not strictly a requirement. Change the default to true to better support more platform out of box.
@@ -281,7 +281,7 @@ func initMinioClient(initConnectionTimeout time.Duration) storage.ObjectStoreInt accessKey := getStringConfig("ObjectStoreConfig.AccessKey") secretKey := getStringConfig("ObjectStoreConfig.SecretAccessKey") bucketName := getStringConfig("ObjectStoreConfig.BucketName") - disableMultipart := getBoolCo...
Python 3 support #catalyst/curate/poloniex.py: Change `print url` to `print(url)`
@@ -129,7 +129,7 @@ class PoloniexCurator(object): start = str(newstart), end = str(end) ) - print url + print(url) attempts = 0 success = 0
Tidy up ClusterNodeGenerator docstring added notes on the valid range for `lam`, and the specific criteria that `q` must divide into the number of clusters, which might otherwise be unclear/non-obvious to the end-user added information on default values of each parameter minor formatting fixes See
@@ -34,7 +34,7 @@ from .base import Generator class ClusterNodeGenerator(Generator): """ - A data generator for use with ClusterGCN models on homogeneous graphs, [1]. + A data generator for use with ClusterGCN models on homogeneous graphs, see [1]. The supplied graph G should be a StellarGraph object with node features...
Fix type annotations for `dd.from_pandas` and `dd.from_delayed` * remove union * Revert "remove union" This reverts commit * add overloads * match overload args * ignore pd.series overload * set overload args back to original ones
@@ -6,7 +6,7 @@ from functools import partial from math import ceil from operator import getitem from threading import Lock -from typing import TYPE_CHECKING, Iterable, Literal +from typing import TYPE_CHECKING, Iterable, Literal, overload import numpy as np import pandas as pd @@ -153,6 +153,30 @@ def from_array(x, ch...
fix horizaontal line breaks linter issue fix
@@ -545,7 +545,7 @@ class md026(mddef): else: mr = re.match(self.ratx, title) title = mr.group(2) - if title[-1] in self.settings: + if len(title) > 0 and title[-1] in self.settings: ret[s] = '%s found' % repr(title[-1]) return ret
Replace self._execution.signal with schedule_task This let us have ExternalWorkflowExecutionSignaled events in the history, so we don't resend signals multiple times.
@@ -1148,6 +1148,8 @@ class Executor(executor.Executor): known_workflows_ids = frozenset(known_workflows_ids) + signals_scheduled = False + for signal in history.signals.values(): input = signal['input'] if not isinstance(input, dict): # foreign signal: don't try processing it @@ -1157,12 +1159,8 @@ class Executor(exec...
Adds some documentation changes Specifying which models are discrete or continuous. At time of commit, all are discrete (I think).
@@ -188,8 +188,9 @@ class LinearGaussianTimeInvariantTransitionModel(LinearGaussianTransitionModel, class ConstantNthDerivative(LinearGaussianTransitionModel, TimeVariantModel): - r"""Discrete model based on the Nth derivative with respect to time being constant, - to set derivative use keyword argument :attr:`constant...
EditScopeUI : Don't prune if EditScope isn't being viewed This would lead to a terribly confusing experience where things were being pruned in a downstream node without any feedback in the Viewer.
@@ -62,6 +62,13 @@ def __pruningKeyPress( viewer, event ) : # that all its descendants are selected? return True + viewedNode = viewer.view()["in"].getInput().node() + if editScope != viewedNode and editScope not in Gaffer.NodeAlgo.upstreamNodes( viewedNode ) : + # Spare folks from deleting things in a downstream EditS...
Check for run when resolving schedule attempt Summary: Fixes Test Plan: Delete run, load scheduler page, verify there is no error Reviewers: alangenfeld
@@ -148,6 +148,7 @@ def resolve_attempts(self, graphene_info, **kwargs): ): status = DauphinScheduleAttemptStatus.SUCCESS run_id = json_result['run']['runId'] + if graphene_info.context.instance.has_run(run_id): run = graphene_info.schema.type_named('PipelineRun')( graphene_info.context.instance.get_run_by_id(run_id) )...
Fix and improvements for tiles Added automatic tile number selection Fixed tiles displacement
@@ -69,7 +69,8 @@ class Tiles: a range between ``low`` and ``high`` for each dimension. Args: - n_tilings (int): number of tilings; + n_tilings (int): number of tilings, or -1 to compute the number + automatically; n_tiles (list): number of tiles for each tilings for each dimension; low (np.ndarray): lowest value for e...
Fixed image_format typo in doc Closes-Bug:
@@ -1663,7 +1663,7 @@ select a format from the set that the Glance service supports. This supported set can be seen by querying the ``/v2/schemas/images`` resource. An operator can add or remove disk formats to the supported set. This is done by setting the ``disk_formats`` parameter which is found in the -``[image_for...