repo
string
pull_number
int64
instance_id
string
issue_numbers
list
base_commit
string
patch
string
test_patch
string
problem_statement
string
hints_text
string
created_at
timestamp[s]
language
string
label
string
getlogbook/logbook
183
getlogbook__logbook-183
[ "94" ]
1d999a784d0d8f5f7423f25c684cc1100843ccc5
diff --git a/logbook/handlers.py b/logbook/handlers.py --- a/logbook/handlers.py +++ b/logbook/handlers.py @@ -20,6 +20,7 @@ except ImportError: from sha import new as sha1 import traceback +import collections from datetime import datetime, timedelta from collections import deque from textwrap import dedent @...
diff --git a/tests/test_mail_handler.py b/tests/test_mail_handler.py --- a/tests/test_mail_handler.py +++ b/tests/test_mail_handler.py @@ -7,6 +7,11 @@ from .utils import capturing_stderr_context, make_fake_mail_handler +try: + from unittest.mock import Mock, call, patch +except ImportError: + from mock impo...
SMTP Handler STARTTLS Due to the lack of documentation on this handler it took a little digging to work out how to get it to work... One thing that confused me was the "secure" argument. Python SMTPLib starttls() accepts two optional values: a keyfile and certfile - but these are only required for _checking_ the ident...
You're right. A simple solution is to use `secure = ()`, but I agree it has to be better documented.
2015-12-03T01:44:29
python
Easy
rigetti/pyquil
399
rigetti__pyquil-399
[ "398", "398" ]
d6a0e29b2b1a506a48977a9d8432e70ec699af34
diff --git a/pyquil/parameters.py b/pyquil/parameters.py --- a/pyquil/parameters.py +++ b/pyquil/parameters.py @@ -31,9 +31,11 @@ def format_parameter(element): out += repr(r) if i == 1: - out += 'i' + assert np.isclose(r, 0, atol=1e-14) + out = 'i' elif...
diff --git a/pyquil/tests/test_parameters.py b/pyquil/tests/test_parameters.py --- a/pyquil/tests/test_parameters.py +++ b/pyquil/tests/test_parameters.py @@ -14,6 +14,8 @@ def test_format_parameter(): (1j, 'i'), (0 + 1j, 'i'), (-1j, '-i'), + (1e-15 + 1j, 'i'), + (1e-15 - 1j, '-...
DEFGATEs are not correct There is a problem with DEFGATEs that has manifested itself in the `phase_estimation` module of Grove (brought to our attention here: https://github.com/rigetticomputing/grove/issues/145). I have traced the problem to commit d309ac11dabd9ea9c7ffa57dd26e68b5e7129aa9 Each of the below tes...
2018-04-20T17:39:41
python
Hard
marcelotduarte/cx_Freeze
2,220
marcelotduarte__cx_Freeze-2220
[ "2210" ]
639141207611f0edca554978f66b1ed7df3d8cdf
diff --git a/cx_Freeze/winversioninfo.py b/cx_Freeze/winversioninfo.py --- a/cx_Freeze/winversioninfo.py +++ b/cx_Freeze/winversioninfo.py @@ -12,16 +12,16 @@ __all__ = ["Version", "VersionInfo"] +# types +CHAR = "c" +WCHAR = "ss" +WORD = "=H" +DWORD = "=L" + # constants RT_VERSION = 16 ID_VERSION = 1 -# type...
diff --git a/tests/test_winversioninfo.py b/tests/test_winversioninfo.py --- a/tests/test_winversioninfo.py +++ b/tests/test_winversioninfo.py @@ -9,7 +9,12 @@ import pytest from generate_samples import create_package, run_command -from cx_Freeze.winversioninfo import Version, VersionInfo, main_test +from cx_Freeze...
Cannot freeze python-3.12 code on Windows 11 **Describe the bug** Cannot freeze python 3.12 code on Windows 11 Pro amd64 using cx_Freeze 6.16.aplha versions, last I tried is 20. This was working fine three weeks ago, but suddenly it started to fail like this: ``` copying C:\Users\jmarcet\scoop\apps\openjdk17\17.0.2...
Please check the version installed of cx_Freeze and setuptools with `pip list`. Successfully installed aiofiles-23.2.1 aiohttp-3.9.1 aiosignal-1.3.1 asyncio-3.4.3 asyncio_dgram-2.1.2 attrs-23.2.0 cx-Logging-3.1.0 **cx_Freeze-6.16.0.dev9** defusedxml-0.8.0rc2 filelock-3.13.1 frozenlist-1.4.1 httptools-0.6.1 idna-3.6 li...
2024-01-25T06:06:14
python
Easy
pytest-dev/pytest-django
1,108
pytest-dev__pytest-django-1108
[ "1106" ]
6cf63b65e86870abf68ae1f376398429e35864e7
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -362,8 +362,15 @@ def _get_option_with_source( @pytest.hookimpl(trylast=True) def pytest_configure(config: pytest.Config) -> None: - # Allow Django settings to be configured in a user pyt...
diff --git a/tests/test_manage_py_scan.py b/tests/test_manage_py_scan.py --- a/tests/test_manage_py_scan.py +++ b/tests/test_manage_py_scan.py @@ -144,6 +144,37 @@ def test_django_project_found_invalid_settings_version( result.stdout.fnmatch_lines(["*usage:*"]) +@pytest.mark.django_project(project_root="django...
`pytest --help` fails in a partially configured app having a difficult time narrowing down a minimal example -- the repo involved is https://github.com/getsentry/sentry I have figured out _why_ it is happening and the stacktrace for it: <summary>full stacktrace with error <details> ```console $ pytest --he...
That’s a fun one! Hopefully using `config.stash.get()` calls and acting only on non-`None` values will be enough to fix the issue... here's a minimal case: ```console ==> t.py <== WAT = 1 ==> tests/__init__.py <== ==> tests/conftest.py <== import os def pytest_configure(): os.environ.setdefault('DJA...
2024-01-29T14:22:15
python
Hard
marcelotduarte/cx_Freeze
2,597
marcelotduarte__cx_Freeze-2597
[ "2596" ]
df2c8aef8f92da535a1bb657706ca4496b1c3352
diff --git a/cx_Freeze/finder.py b/cx_Freeze/finder.py --- a/cx_Freeze/finder.py +++ b/cx_Freeze/finder.py @@ -537,7 +537,10 @@ def _replace_package_in_code(module: Module) -> CodeType: # Insert a bytecode to set __package__ as module.parent.name codes = [LOAD_CONST, pkg_const_index, STORE_NAM...
diff --git a/samples/scipy/test_scipy.py b/samples/scipy/test_scipy.py --- a/samples/scipy/test_scipy.py +++ b/samples/scipy/test_scipy.py @@ -1,8 +1,6 @@ """A simple script to demonstrate scipy.""" -from scipy.stats import norm +from scipy.spatial.transform import Rotation if __name__ == "__main__": - print( ...
cx-Freeze - No module named 'scipy._lib.array_api_compat._aliases' **Prerequisite** This was previously reported in the closed issue #2544, where no action was taken. I include a minimal script that produces the problem for me. **Describe the bug** When running the compiled executable, i get the following error: ...
Changing the config to `"zip_exclude_packages": ['scipy']`, things work. I assume it should work just fine/the same from the zip file. This will be my workaround for now
2024-10-02T02:42:26
python
Easy
rigetti/pyquil
1,149
rigetti__pyquil-1149
[ "980" ]
07db509c5293df2b4624ca6ac409e4fce2666ea1
diff --git a/pyquil/device/_isa.py b/pyquil/device/_isa.py --- a/pyquil/device/_isa.py +++ b/pyquil/device/_isa.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. ###########################################################################...
diff --git a/pyquil/device/tests/test_device.py b/pyquil/device/tests/test_device.py --- a/pyquil/device/tests/test_device.py +++ b/pyquil/device/tests/test_device.py @@ -55,10 +55,10 @@ def test_isa(isa_dict): Qubit(id=3, type="Xhalves", dead=True), ], edges=[ - Edge(targets=[...
Change the namedtuples in device.py to dataclasses As discussed in #961, using `dataclasses` instead of `namedtuples` would greatly improve readability, understanding, and use of the structures in the `device` module.
2020-01-02T19:58:40
python
Hard
pallets-eco/flask-wtf
512
pallets-eco__flask-wtf-512
[ "511" ]
b86d5c6516344f85f930cdd710b14d54ac88415c
diff --git a/src/flask_wtf/__init__.py b/src/flask_wtf/__init__.py --- a/src/flask_wtf/__init__.py +++ b/src/flask_wtf/__init__.py @@ -5,4 +5,4 @@ from .recaptcha import RecaptchaField from .recaptcha import RecaptchaWidget -__version__ = "1.0.0" +__version__ = "1.0.1.dev0" diff --git a/src/flask_wtf/form.py b/src/...
diff --git a/tests/test_recaptcha.py b/tests/test_recaptcha.py --- a/tests/test_recaptcha.py +++ b/tests/test_recaptcha.py @@ -80,7 +80,8 @@ def test_render_custom_args(app): app.config["RECAPTCHA_DATA_ATTRS"] = {"red": "blue"} f = RecaptchaForm() render = f.recaptcha() - assert "?key=%28value%29" in ...
Update to Request.get_json() in Werkzeug 2.1.0 breaks empty forms Similar to #510 - the get_json() change in Werkzeug 2.1.0 https://github.com/pallets/werkzeug/issues/2339 breaks any empty submitted form (not json). From form.py: ``` def wrap_formdata(self, form, formdata): if formdata is _Auto: ...
2022-03-31T15:26:26
python
Easy
pytest-dev/pytest-django
979
pytest-dev__pytest-django-979
[ "978" ]
b3b679f2cab9dad70e318f252751ff7659b951d1
diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -167,7 +167,7 @@ def _django_db_helper( serialized_rollback, ) = False, False, None, False - transactional = transactional or ( + transactional = transactio...
diff --git a/tests/test_database.py b/tests/test_database.py --- a/tests/test_database.py +++ b/tests/test_database.py @@ -287,11 +287,16 @@ def test_reset_sequences_disabled(self, request) -> None: marker = request.node.get_closest_marker("django_db") assert not marker.kwargs - @pytest.mark.djan...
4.5.1: reset_sequences=True fails on MariaDB/MySQL Firstly, thanks for maintaining such a powerful and useful testing library for Django. On to the bug: - OS: Windows 10 - Python: 3.9.1 - pytest-6.2.5 - py-1.11.0 - pluggy-1.0.0 - Django: 3.2.10 Example: @pytest.mark.django_db(reset_sequences=True) ...
It's missing `transaction=True`. Needs a better error message. Did it work on pytest-django 4.4.0? If yes, then I'll make it work again. Thanks for the fast response! Yes it works on 4.5.0
2021-12-07T14:17:20
python
Easy
rigetti/pyquil
177
rigetti__pyquil-177
[ "176" ]
e10881922b799ab015f750d07156f03b2bca7046
diff --git a/pyquil/kraus.py b/pyquil/kraus.py --- a/pyquil/kraus.py +++ b/pyquil/kraus.py @@ -50,9 +50,8 @@ def _create_kraus_pragmas(name, qubit_indices, kraus_ops): :rtype: str """ - prefix = "PRAGMA ADD-KRAUS {} {}".format(name, " ".join(map(str, qubit_indices))) pragmas = [Pragma("ADD-KRAUS", -...
diff --git a/pyquil/tests/test_quil.py b/pyquil/tests/test_quil.py --- a/pyquil/tests/test_quil.py +++ b/pyquil/tests/test_quil.py @@ -520,11 +520,11 @@ def test_kraus(): ret = pq.out() assert ret == """X 0 -PRAGMA ADD-KRAUS 0 "(0.0+0.0i 1.0+0.0i 1.0+0.0i 0.0+0.0i)" -PRAGMA ADD-KRAUS 0 "(0.0+0.0i 0.0+0.0i 0...
`ADD-KRAUS` does not pass the gate name to `Pragma` constructor As is `ADD-KRAUS` is broken, but the fix is easy.
2017-11-09T01:17:37
python
Hard
pytest-dev/pytest-django
323
pytest-dev__pytest-django-323
[ "322" ]
274efdfd48e806830e08d003d93af1e6070eb2b3
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -539,6 +539,20 @@ def _template_string_if_invalid_marker(request): else: dj_settings.TEMPLATE_STRING_IF_INVALID.fail = False + +@pytest.fixture(autouse=True, scop...
diff --git a/tests/test_environment.py b/tests/test_environment.py --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -3,9 +3,12 @@ import os import pytest +from django.contrib.sites.models import Site +from django.contrib.sites import models as site_models from django.core import mail from django...
Tests with django sites framework onetoonefield causes unexpected behavior Assume you have a model: ``` class Customer(models.Model): site = models.OneToOneField('sites.Site') ``` And when using the sites middleware, without setting SITE_ID, the site is looked up and cached based on the requests host information:...
2016-04-01T13:38:30
python
Easy
pytest-dev/pytest-django
1,189
pytest-dev__pytest-django-1189
[ "1188" ]
6d5c272519037031f0b68d78dca44727b860d65e
diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -129,8 +129,8 @@ def _get_databases_for_test(test: pytest.Item) -> tuple[Iterable[str], bool]: test_cls = getattr(test, "cls", None) if test_cls and issubclass(test_cls, Tran...
diff --git a/tests/test_database.py b/tests/test_database.py --- a/tests/test_database.py +++ b/tests/test_database.py @@ -432,6 +432,28 @@ def test_db_access_3(self): ) +def test_django_testcase_multi_db(django_pytester: DjangoPytester) -> None: + """Test that Django TestCase multi-db support works.""" + +...
django.test.TestCase with multiples database doesn't create secondary db in 4.11.0 With the 4.11.0 version, if a Django TestCase is setup to use multiples database with the `databases` attribute, only the default database is created on runtime. ``` class Test(TestCase): databases = {"default", "db2"} ``` Trying ...
Ouch, silly mistake! I will fix and do a patch release. Thanks for the report.
2025-04-03T18:40:04
python
Hard
rigetti/pyquil
1,492
rigetti__pyquil-1492
[ "1486" ]
76c95c2b5ccdca93cce6f2b972dafda5a680ee13
diff --git a/pyquil/api/_abstract_compiler.py b/pyquil/api/_abstract_compiler.py --- a/pyquil/api/_abstract_compiler.py +++ b/pyquil/api/_abstract_compiler.py @@ -102,12 +102,15 @@ def __init__( self._timeout = timeout self._client_configuration = client_configuration or QCSClientConfiguration.load(...
diff --git a/test/unit/conftest.py b/test/unit/conftest.py --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -1,6 +1,5 @@ import json import os -from pathlib import Path from typing import Dict, Any import numpy as np diff --git a/test/unit/test_compiler_client.py b/test/unit/test_compiler_client.py --- ...
Get version info requests to quilc should go through the QCS SDK Currently, the qcs-sdk handles all external requests to `quilc` _except_ for getting version info. We need add a method for getting that data to QCS SDK Rust (see [this issue](https://github.com/rigetti/qcs-sdk-rust/issues/205)), then follow-up and use it...
Good catch!
2022-11-03T16:56:26
python
Hard
pallets-eco/flask-wtf
264
pallets-eco__flask-wtf-264
[ "227" ]
f306c360f74362be3aac89c43cdc7c37008764fb
diff --git a/flask_wtf/_compat.py b/flask_wtf/_compat.py --- a/flask_wtf/_compat.py +++ b/flask_wtf/_compat.py @@ -6,9 +6,11 @@ if not PY2: text_type = str string_types = (str,) + from urllib.parse import urlparse else: text_type = unicode string_types = (str, unicode) + from urlparse import...
diff --git a/tests/base.py b/tests/base.py --- a/tests/base.py +++ b/tests/base.py @@ -1,10 +1,12 @@ from __future__ import with_statement -from flask import Flask, render_template, jsonify -from wtforms import StringField, HiddenField, SubmitField -from wtforms.validators import DataRequired +from unittest import T...
Make it easier to access a CSRF token in automated tests If you want to run your automated tests with CSRF enabled (which is a good idea if it's enabled in production), there's no good built-in way to do so. Even the tests for this project [use regular expressions to parse the CSRF token out of the page](https://github...
2016-10-13T04:41:57
python
Hard
rigetti/pyquil
421
rigetti__pyquil-421
[ "384" ]
9612be90f91405ecbc089b3496f1c85d9c177cc8
diff --git a/pyquil/noise.py b/pyquil/noise.py --- a/pyquil/noise.py +++ b/pyquil/noise.py @@ -296,22 +296,51 @@ def damping_after_dephasing(T1, T2, gate_time): # You can only apply gate-noise to non-parametrized gates or parametrized gates at fixed parameters. NO_NOISE = ["RZ"] -NOISY_GATES = { - ("I", ()): (np...
diff --git a/pyquil/tests/test_noise.py b/pyquil/tests/test_noise.py --- a/pyquil/tests/test_noise.py +++ b/pyquil/tests/test_noise.py @@ -208,3 +208,17 @@ def test_apply_noise_model(): assert i.command in ['ADD-KRAUS', 'READOUT-POVM'] elif isinstance(i, Gate): assert i.name in NO_NOI...
Adding decoherence noise models fails when `RX` angles are perturbed from +/-pi or +/-pi/2 Two ways to fix this: 1. Quick: allow angles to deviate from pi within some tolerance (e.g., 10^{-10}) that is much stricter than any anticipated gate error. 2. Slow: actually implement a mechanism to translate arbitrary pyquil...
@mpharrigan what are your thoughts? Is this an issue in practice? Can we do quick in the near term and slow eventually in the context of noise models for arbitrary gates Yeah, it was an issue for me today when I tried to add noise after compiling the program an external user wants to simulate with noise. I am happy to ...
2018-05-03T19:00:14
python
Hard
marcelotduarte/cx_Freeze
2,759
marcelotduarte__cx_Freeze-2759
[ "2738" ]
aee3a1a3195a358e814c4fcbdc116e192132bbf5
diff --git a/cx_Freeze/_compat.py b/cx_Freeze/_compat.py --- a/cx_Freeze/_compat.py +++ b/cx_Freeze/_compat.py @@ -7,6 +7,7 @@ from pathlib import Path __all__ = [ + "ABI_THREAD", "BUILD_EXE_DIR", "EXE_SUFFIX", "EXT_SUFFIX", @@ -21,8 +22,9 @@ PLATFORM = sysconfig.get_platform() PYTHON_VERSION ...
diff --git a/tests/test_executables.py b/tests/test_executables.py --- a/tests/test_executables.py +++ b/tests/test_executables.py @@ -12,6 +12,7 @@ from cx_Freeze import Executable from cx_Freeze._compat import ( + ABI_THREAD, BUILD_EXE_DIR, EXE_SUFFIX, IS_MACOS, @@ -241,14 +242,18 @@ def test_ex...
Replace _PyMem_RawStrdup with strdup Per https://github.com/python/cpython/issues/127991#issuecomment-2547810583 Fixes #2568
2024-12-30T01:37:43
python
Easy
marcelotduarte/cx_Freeze
2,583
marcelotduarte__cx_Freeze-2583
[ "2572" ]
cf4dc4997e54208d90d4bdc419276da6af39dbc4
diff --git a/cx_Freeze/executable.py b/cx_Freeze/executable.py --- a/cx_Freeze/executable.py +++ b/cx_Freeze/executable.py @@ -116,7 +116,7 @@ def init_module_name(self) -> str: :rtype: str """ - return f"{self._internal_name}__init__" + return f"__init__{self._internal_name}" @...
diff --git a/tests/test_cli.py b/tests/test_cli.py --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -10,16 +10,16 @@ import pytest from generate_samples import create_package, run_command +from cx_Freeze._compat import BUILD_EXE_DIR, EXE_SUFFIX + if TYPE_CHECKING: from pathlib import Path -SUFFIX = ".exe"...
Why is Executable target_name has to be A valid identifier? In https://github.com/marcelotduarte/cx_Freeze/blob/7.2.1/cx_Freeze/executable.py#L234 target_name is required to be a valid identifier. Is there any reason for that? I removed that condition and it seems to work fine. my target_name="6578e4ecf0464d7fb25...
Maybe a regression - issue #884 fixed by #889
2024-09-23T03:32:58
python
Easy
rigetti/pyquil
745
rigetti__pyquil-745
[ "744" ]
98dec8330958af4723b7befb51345cea182a886c
diff --git a/pyquil/noise.py b/pyquil/noise.py --- a/pyquil/noise.py +++ b/pyquil/noise.py @@ -324,10 +324,24 @@ def damping_after_dephasing(T1, T2, gate_time): :param float gate_time: The gate duration. :return: A list of Kraus operators. """ - damping = damping_kraus_map(p=1 - np.exp(-float(gate_tim...
diff --git a/pyquil/tests/test_noise.py b/pyquil/tests/test_noise.py --- a/pyquil/tests/test_noise.py +++ b/pyquil/tests/test_noise.py @@ -70,7 +70,7 @@ def test_damping_after_dephasing(): dephasing = dephasing_kraus_map(p=.5 * (1 - np.exp(-.2))) ks_ref = combine_kraus_maps(damping, dephasing) - ks_actua...
T2 noise model is wrong when T1 is finite In particular, a damping noise model with T1 will lead to a contribution to the dephasing rate 1/T2 that equals 1/(2*T1).
2018-12-21T19:49:19
python
Hard
pytest-dev/pytest-django
231
pytest-dev__pytest-django-231
[ "228" ]
1f279deb0d46c4f7dd161945b50f6e2add85793a
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -51,6 +51,9 @@ def pytest_addoption(parser): group._addoption('--nomigrations', action='store_true', dest='nomigrations', default=False, help='Di...
diff --git a/tests/test_django_settings_module.py b/tests/test_django_settings_module.py --- a/tests/test_django_settings_module.py +++ b/tests/test_django_settings_module.py @@ -244,6 +244,31 @@ def test_debug_is_false(): assert r.ret == 0 +def test_debug_no_force(testdir, monkeypatch): + monkeypatch.delen...
why DEBUG is hardcoded to False? Hi https://github.com/pytest-dev/pytest-django/blob/master/pytest_django/plugin.py#L239 this looks not too flexible I tried a lot of things before i found this hardcode - i needed to understand why my liveserver fails, and it returned just standard 500 instead of debug page, and debug...
IIRC the setup with Django's testrunner is also False, to reflect what would be used in production, but I am not certain. :+1: for a way to configure/override this. ok i'll prepare PR
2015-04-10T13:35:34
python
Easy
rigetti/pyquil
1,477
rigetti__pyquil-1477
[ "1476" ]
57f0501c2d2bc438f983f81fd5793dc969a04ed3
diff --git a/pyquil/quil.py b/pyquil/quil.py --- a/pyquil/quil.py +++ b/pyquil/quil.py @@ -874,9 +874,9 @@ def __add__(self, other: InstructionDesignator) -> "Program": p = Program() p.inst(self) p.inst(other) - p._calibrations = self.calibrations - p._waveforms = self.waveforms...
diff --git a/test/unit/test_program.py b/test/unit/test_program.py --- a/test/unit/test_program.py +++ b/test/unit/test_program.py @@ -56,3 +56,31 @@ def test_parameterized_readout_symmetrization(): p += RX(symmetrization[0], 0) p += RX(symmetrization[1], 1) assert parameterized_readout_symmetrization([0...
Adding two `Program`s together unexpectedly mutates first `Program` Pre-Report Checklist -------------------- - [x] I am running the latest versions of pyQuil and the Forest SDK - [x] I checked to make sure that this bug has not already been reported Issue Description ----------------- Summary: when adding ...
2022-09-20T22:23:51
python
Hard
pytest-dev/pytest-django
881
pytest-dev__pytest-django-881
[ "513" ]
bb9e86e0c0141a30d07078f71b288026b6e583d2
diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -304,7 +304,7 @@ def admin_client(db, admin_user): from django.test.client import Client client = Client() - client.login(username=admin_user.username, password="password"...
diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -49,6 +49,17 @@ def test_admin_client_no_db_marker(admin_client): assert force_str(resp.content) == "You are an admin" +# For test below. +@pytest.fixture +def existing_admin_user(django_us...
admin_client is not checking for login success `client.login` inside `admin_client` can return `False` in the case when there's an existing admin user with a password set to something other than `'password'`. Perhaps, `admin_client` should use `force_login` instead?
Seems sensible Can you provide a failing test and fix in a PR? Sure, I'll do that in the next couple of days.
2020-10-09T12:42:31
python
Easy
pytest-dev/pytest-django
869
pytest-dev__pytest-django-869
[ "660" ]
9d91f0b5492c136d4cd9d6012672783171b4034c
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import os import sys import datetime diff --git a/pytest_django/asserts.py b/pytest_django/asserts.py --- a/pytest_django/asserts.py +++ b/pytest_django/asserts.py @@ -23,10 +23,10 @@ def asserti...
diff --git a/pytest_django_test/app/migrations/0001_initial.py b/pytest_django_test/app/migrations/0001_initial.py --- a/pytest_django_test/app/migrations/0001_initial.py +++ b/pytest_django_test/app/migrations/0001_initial.py @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.9a1 on 2016-06-22 04:33 -fr...
Import pathlib from pytest As discussed on #636 when all supported versions of pytest offer an import of `pathlib`, use that rather than direct dependency on `pathlib2`
2020-09-19T18:49:07
python
Easy
pytest-dev/pytest-django
664
pytest-dev__pytest-django-664
[ "662" ]
5000ff814584e67eda6085f36a3644f6a834f6c2
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -120,7 +120,10 @@ def _handle_import_error(extra_message): def _add_django_project_to_path(args): def is_django_project(path): - return path.is_dir() and (path / 'manage.py').exis...
diff --git a/tests/test_manage_py_scan.py b/tests/test_manage_py_scan.py --- a/tests/test_manage_py_scan.py +++ b/tests/test_manage_py_scan.py @@ -83,3 +83,15 @@ def test_django_project_found_invalid_settings_version(django_testdir, monkeypat result = django_testdir.runpytest_subprocess('django_project_root', '--h...
OSError on long command-line args In the logic of django_find_project there exist these lines: ``` def find_django_path(args): args = map(str, args) args = [arg_to_path(x) for x in args if not x.startswith("-")] args = [p for p in args if p.is_dir()] ... ``` Unfortunately, this means...
Please consider creating a failing test and fix for this yourself. I assume the `args = [p for p in args if p.is_dir()]` should be turned into a loop that try/catches any OSError and ignores it. /cc @voidus for the pathlib change that appears to trigger this
2018-10-16T19:19:27
python
Easy
pytest-dev/pytest-django
970
pytest-dev__pytest-django-970
[ "329", "956" ]
904a99507bfd2d9570ce5d21deb006c4ae3f7ad3
diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -20,7 +20,8 @@ import django _DjangoDbDatabases = Optional[Union["Literal['__all__']", Iterable[str]]] - _DjangoDb = Tuple[bool, bool, _DjangoDbDatabases] + # transacti...
diff --git a/tests/test_database.py b/tests/test_database.py --- a/tests/test_database.py +++ b/tests/test_database.py @@ -48,7 +48,12 @@ def non_zero_sequences_counter(db: None) -> None: class TestDatabaseFixtures: """Tests for the different database fixtures.""" - @pytest.fixture(params=["db", "transaction...
Tests using live_server fixture removing data from data migrations I've created a simple test case to reproduce this behavior https://github.com/ekiro/case_pytest/blob/master/app/tests.py which fails after second test using live_server fixture. MyModel objects are created in migration, using RunPython. It seems like a...
That's because of the `transactional_db` fixture being used automatically by `live_server` (there is no need to mark it with `@pytest.mark.django_db`). There are several issues / discussions in this regard, but the last time I looked closer at this, there was no easy solution to this problem that comes with using data...
2021-11-29T10:28:09
python
Easy
rigetti/pyquil
191
rigetti__pyquil-191
[ "184" ]
4fbcbd16a4963818daa73d700f7c26406ae19ec7
diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -20,6 +20,7 @@ import numpy as np from .slot import Slot from six import integer_types, string_types +from fractions import Fraction class QuilAtom(object): @@ -513,8 +514,10 @@ def format_parameter(element...
diff --git a/pyquil/tests/test_quil.py b/pyquil/tests/test_quil.py --- a/pyquil/tests/test_quil.py +++ b/pyquil/tests/test_quil.py @@ -40,7 +40,7 @@ def test_gate(): def test_defgate(): dg = DefGate("TEST", np.array([[1., 0.], [0., 1.]])) - assert dg.out() == "DEFGATE TEST:\...
Parameters to gates that are nearly pi, pi/2, pi/4 etc should be printed using pi Instead of this: `RZ(-3.141592653589793) 0` let's print this: `RZ(-pi) 0` which is valid quil. This will aid in program understanding.
Hint to implementers: look at the format_parameter function in quilbase Hello, I implemented this last night using np.float32 and fractions.Fraction. I wanted to verify the expected behavior before making a pull request. Here are some printed results, which after obvious adjustments to the test cases pass tests fo...
2017-11-17T11:38:23
python
Hard
marcelotduarte/cx_Freeze
642
marcelotduarte__cx_Freeze-642
[ "566" ]
485eb0330de934a6418afa42b2eb82f1948cf2d7
diff --git a/cx_Freeze/hooks.py b/cx_Freeze/hooks.py --- a/cx_Freeze/hooks.py +++ b/cx_Freeze/hooks.py @@ -5,6 +5,9 @@ from cx_Freeze.common import rebuild_code_object +MINGW = sysconfig.get_platform() == "mingw" +WIN32 = sys.platform == "win32" + def initialize(finder): """upon initialization of the finder,...
diff --git a/cx_Freeze/samples/cryptography/test_crypt.py b/cx_Freeze/samples/cryptography/test_crypt.py --- a/cx_Freeze/samples/cryptography/test_crypt.py +++ b/cx_Freeze/samples/cryptography/test_crypt.py @@ -1,3 +1,3 @@ from cryptography.fernet import Fernet -print('Hello cryptography', Fernet) +print("Hello cryp...
tkinter path error Hi, Got a problem with version mingw-w64-x86_64-python-cx_Freeze-6.0-1 Can't find path to tkinter (error: [Errno 2] No such file or directory: 'C:/msys64/mingw64/tcl/tcl8.6') I try to add path in setup-freeze.py: ... include_files = [ r"C:\msys64\mingw64\bin\tcl86.dll", r"C:\msys64\mi...
I try the sample: https://github.com/anthony-tuininga/cx_Freeze/tree/master/cx_Freeze/samples/Tkinter Got: ... copying C:/msys64/mingw64/tcl/tcl8.6 -> build/exe.mingw-3.8/tcl error: [Errno 2] No such file or directory: 'C:/msys64/mingw64/tcl/tcl8.6' Can bypass error doing this: - Create С:\msys64\mingw64\tcl ...
2020-04-27T07:48:25
python
Easy
rigetti/pyquil
1,795
rigetti__pyquil-1795
[ "1719" ]
ba4aaf50e788ee1aa2980e810fab60d2ce78348e
diff --git a/pyquil/api/__init__.py b/pyquil/api/__init__.py --- a/pyquil/api/__init__.py +++ b/pyquil/api/__init__.py @@ -30,7 +30,7 @@ QVMCompiler, ) from pyquil.api._qam import QAM, MemoryMap, QAMExecutionResult -from pyquil.api._qpu import QPU +from pyquil.api._qpu import QPU, QPUExecuteResponse from pyquil...
diff --git a/test/unit/__snapshots__/test_quilbase.ambr b/test/unit/__snapshots__/test_quilbase.ambr --- a/test/unit/__snapshots__/test_quilbase.ambr +++ b/test/unit/__snapshots__/test_quilbase.ambr @@ -11,6 +11,18 @@ # name: TestArithmeticBinaryOp.test_out[SUB-left1-1] 'SUB b[1] 1' # --- +# name: TestArithmeticBi...
Make `QAMExecutionResult` serializable Due to using non-picklable members from `qcs-sdk-python`, `QAMExecutionResult` is not itself serializable. We should add a way to pickle it, either by supporting pickling upstream or implementing it for `QAMExecutionResult` specifically.
This would also be useful for `pyquil.api._qpu.QPUExecuteResponse` so that programs can be submitted and retrieved in separate programs. Yes this would be great. Also, instead of the program data/results disappearing after it's been retrieved by the user (as happens now, from what i understand), it would be great, if i...
2024-07-29T16:23:59
python
Hard
marcelotduarte/cx_Freeze
2,443
marcelotduarte__cx_Freeze-2443
[ "2382", "2433" ]
c3b273e3246b5026808f91c315daaf980406a1da
diff --git a/cx_Freeze/hooks/multiprocessing.py b/cx_Freeze/hooks/multiprocessing.py --- a/cx_Freeze/hooks/multiprocessing.py +++ b/cx_Freeze/hooks/multiprocessing.py @@ -43,16 +43,71 @@ def load_multiprocessing(finder: ModuleFinder, module: Module) -> None: sys.exit() # workaround: inject freeze_supp...
diff --git a/tests/test_multiprocessing.py b/tests/test_multiprocessing.py --- a/tests/test_multiprocessing.py +++ b/tests/test_multiprocessing.py @@ -21,14 +21,13 @@ SOURCE = """\ sample1.py - import multiprocessing, sys + import multiprocessing def foo(q): - q.put('hello') + q.put("Hell...
hooks: improve multiprocessing hook to work with pytorch Fixes #2376 Version 7.1.0 (and 7.1.0.post0) break FastAPI/hypercorn **Describe the bug** When running a program built with cx_freeze starting version 7.1.0, it adds additional arguments, which hypercorn does not accept. These arguments seem to be related to m...
## [Codecov](https://app.codecov.io/gh/marcelotduarte/cx_Freeze/pull/2382?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcelo+Duarte) Report All modified and coverable lines are covered by tests :white_check_mark: > Project coverage is 83.29...
2024-06-07T00:14:01
python
Easy
rigetti/pyquil
1,714
rigetti__pyquil-1714
[ "1710" ]
40739442d53c913f989728dd681926ca2aa11fe5
diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -2750,12 +2750,12 @@ def frame(self) -> Frame: def frame(self, frame: Frame) -> None: quil_rs.FrameDefinition.identifier.__set__(self, frame) # type: ignore[attr-defined] - def _set_attribute(se...
diff --git a/test/unit/test_quilbase.py b/test/unit/test_quilbase.py --- a/test/unit/test_quilbase.py +++ b/test/unit/test_quilbase.py @@ -518,32 +518,48 @@ def test_frame(self, def_frame: DefFrame, frame: Frame): assert def_frame.frame == Frame([Qubit(123)], "new_frame") def test_direction(self, def_fr...
Make the `get_attribute` and `set_attribute` methods on `DefFrame` public. `DefFrame` supports generic attributes but there is not a direct way to access any that aren't defined as a `@property` in the public API. One example is `channel_delay`. It was added to the constructor parameters in `V4`, but doesn't have an as...
Historical note: it wasn't carried over because it didn't exist, right? This is a new feature of the v2 translation backend. And simultaneously, frames changed in the Quil spec to have dynamic key-value pairs. So I don't think the right answer here is to add more properties, but rather to allow looking them up by st...
2023-12-14T16:41:15
python
Hard
pytest-dev/pytest-django
910
pytest-dev__pytest-django-910
[ "909" ]
762cfc2f2cea6eeb859c3ddba3ac06d1799d0842
diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -147,6 +147,12 @@ class ResetSequenceTestCase(django_case): django_case = ResetSequenceTestCase else: from django.test import TestCase as django_case + ...
diff --git a/tests/test_database.py b/tests/test_database.py --- a/tests/test_database.py +++ b/tests/test_database.py @@ -1,7 +1,8 @@ import pytest -from django.db import connection +from django.db import connection, transaction from django.test.testcases import connections_support_transactions +from pytest_django...
Handle transaction.atomic(durable=True) This argument will be introduced in Django 3.2: https://docs.djangoproject.com/en/3.2/topics/db/transactions/#controlling-transactions-explicitly It's used to make sure that atomic blocks aren't nested and naturally this fails when running the test suite. The django `TestCase`...
2021-03-02T18:55:42
python
Easy
getlogbook/logbook
284
getlogbook__logbook-284
[ "283" ]
b1532c4ca83b75efc5a09c02aa58642571ff0a41
diff --git a/logbook/queues.py b/logbook/queues.py --- a/logbook/queues.py +++ b/logbook/queues.py @@ -604,7 +604,10 @@ class TWHThreadController(object): queue and sends it to a handler. Both queue and handler are taken from the passed :class:`ThreadedWrapperHandler`. """ - _sentinel = object() + ...
diff --git a/tests/test_queues.py b/tests/test_queues.py --- a/tests/test_queues.py +++ b/tests/test_queues.py @@ -89,9 +89,24 @@ def test_multi_processing_handler(): assert test_handler.has_warning('Hello World') +class BatchTestHandler(logbook.TestHandler): + def __init__(self, *args, **kwargs): + ...
ThreadedWrapperHandler does not forward batched emits as expected I noticed that the `ThreadedWrapperHandler` does not forward batch emits in *batch form*. Thus, if a `ThreadedWrapperHandler` wraps a `MailHandler`, a mail is sent for each logging entry instead of one summarising mail. I may be able to provide a PR b...
@lgrahl Thanks for the feedback! I think this is a reasonable change to implement. At the most naive approach this will be equivalent to a for loop with `emit`, and at the more complex scenarios this will enable all sorts of optimizations. Sounds like a good idea!
2019-01-07T14:14:20
python
Hard
pytest-dev/pytest-django
888
pytest-dev__pytest-django-888
[ "846" ]
c0d10af86eb737f5ac4ba42b1f4361b66d3c6c18
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -118,6 +118,12 @@ def pytest_addoption(parser): type="bool", default=True, ) + parser.addini( + "django_debug_mode", + "How to set the Django DEBUG settin...
diff --git a/tests/test_django_settings_module.py b/tests/test_django_settings_module.py --- a/tests/test_django_settings_module.py +++ b/tests/test_django_settings_module.py @@ -278,7 +278,7 @@ def test_settings(): assert result.ret == 0 -def test_debug_false(testdir, monkeypatch): +def test_debug_false_by_de...
Django debug should be optional https://github.com/pytest-dev/pytest-django/blob/162263f338d863fddc14b0659f506d63799f78e1/pytest_django/plugin.py#L473 Currently django is hard codded to not allow debug. This means that static files are not served, even when debug is set as true. So in my tests when loading from st...
I get having a default flag for DEBUG = False. But if in user's settings they explicitly specify DEBUG = True. I don't think the library should override it. I prefer to run tests with ``DEBUG`` set to ``True``, and I can't seem to do that with pytest-django. Am I missing something, or if I'm not, is there a workarou...
2020-10-16T21:52:32
python
Easy
marcelotduarte/cx_Freeze
2,857
marcelotduarte__cx_Freeze-2857
[ "2856" ]
0be89ba63a67cfefcd73ee8520848c2bb9d1f17c
diff --git a/cx_Freeze/hooks/__init__.py b/cx_Freeze/hooks/__init__.py --- a/cx_Freeze/hooks/__init__.py +++ b/cx_Freeze/hooks/__init__.py @@ -34,6 +34,15 @@ def load_aiofiles(finder: ModuleFinder, module: Module) -> None: finder.include_package("aiofiles") +def load_argon2(finder: ModuleFinder, module: Module...
diff --git a/tests/test_hooks_argon2.py b/tests/test_hooks_argon2.py new file mode 100644 --- /dev/null +++ b/tests/test_hooks_argon2.py @@ -0,0 +1,37 @@ +"""Tests for some cx_Freeze.hooks.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING + +import pytest +from generate_samples import create...
argon2-cffi metadata is missing on 7.2.4+ **Describe the bug** argon2-cffi metadata is missing ``` File "permissions.py", line 104, in authenticate File "passlib\context.py", line 2347, in verify File "passlib\handlers\argon2.py", line 669, in verify File "passlib\utils\handlers.py", line 2254, in _stub_requir...
2025-03-26T07:38:23
python
Easy
rigetti/pyquil
1,133
rigetti__pyquil-1133
[ "1109" ]
7210fbe56290121c44da97b9ec6eea032fcdb612
diff --git a/examples/1.3_vqe_demo.py b/examples/1.3_vqe_demo.py --- a/examples/1.3_vqe_demo.py +++ b/examples/1.3_vqe_demo.py @@ -2,7 +2,6 @@ This is a demo of VQE through the forest stack. We will do the H2 binding from the Google paper using OpenFermion to generate Hamiltonians and Forest to simulate the system "...
diff --git a/pyquil/api/tests/test_config.py b/pyquil/api/tests/test_config.py --- a/pyquil/api/tests/test_config.py +++ b/pyquil/api/tests/test_config.py @@ -1,5 +1,4 @@ import pytest -import os from pyquil.api._config import PyquilConfig from pyquil.api._errors import UserMessageError diff --git a/pyquil/latex/t...
Ignore fewer flake8 style rules If I remove everything other than `E501` (line length) and `F401` (unused imports), and run `flake8 pyquil`, I get 319 errors. At some point we should try to get rid of these, rather than ignoring them. I'll paste the output as a comment.
``` pyquil/magic.py:43:5: E743 ambiguous function definition 'I' pyquil/gates.py:75:5: E743 ambiguous function definition 'I' pyquil/gates.py:514:14: W503 line break before binary operator pyquil/gates.py:900:11: E126 continuation line over-indented for hanging indent pyquil/gate_matrices.py:90:1: E741 ambiguous v...
2019-12-23T22:43:44
python
Hard
rigetti/pyquil
1,294
rigetti__pyquil-1294
[ "1156" ]
b6ad4a9db8e7a6baae3af372bdaa166f725a678d
diff --git a/pyquil/api/_base_connection.py b/pyquil/api/_base_connection.py --- a/pyquil/api/_base_connection.py +++ b/pyquil/api/_base_connection.py @@ -600,7 +600,7 @@ def _qvm_run( measurement_noise: Optional[Tuple[float, float, float]], gate_noise: Optional[Tuple[float, float, float]], r...
diff --git a/pyquil/tests/test_quil.py b/pyquil/tests/test_quil.py --- a/pyquil/tests/test_quil.py +++ b/pyquil/tests/test_quil.py @@ -243,10 +243,26 @@ def test_prog_init(): assert p.out() == ("DECLARE ro BIT[1]\nX 0\nMEASURE 0 ro[0]\n") -def test_classical_regs(): +def test_classical_regs_implicit_ro(): ...
QVM returns only MEASURE'd memory regions Issue Description ----------------- In #873, we attempted to enable the QVM (and, later, the QPU) to let the user do post-execution analysis on all memory regions, rather than just on the contents of `ro`. However, in https://github.com/rigetti/pyquil/blob/master/pyquil/api...
Even within the 'ro' memory region, it only returns those indices that are written to by measurements: ``` from pyquil import Program, get_qc from pyquil.gates import CNOT, X, MEASURE p = Program() ro = p.declare("ro", "BIT", 4) p += CNOT(0, 1) p += X(2) p += CNOT(2, 3) p += MEASURE(0, ro[0]) p += MEASURE(3...
2021-01-20T18:46:33
python
Hard
marcelotduarte/cx_Freeze
2,358
marcelotduarte__cx_Freeze-2358
[ "2354" ]
de2888d31d344c3d50994c4ecaaeb668bcc9b095
diff --git a/cx_Freeze/hooks/numpy.py b/cx_Freeze/hooks/numpy.py --- a/cx_Freeze/hooks/numpy.py +++ b/cx_Freeze/hooks/numpy.py @@ -87,6 +87,20 @@ def load_numpy_core__add_newdocs( finder.include_module("numpy.core._multiarray_tests") +def load_numpy_core_overrides(finder: ModuleFinder, module: Module) -> None:...
diff --git a/tests/test_hooks_pandas.py b/tests/test_hooks_pandas.py --- a/tests/test_hooks_pandas.py +++ b/tests/test_hooks_pandas.py @@ -24,7 +24,7 @@ @pytest.mark.datafiles(SAMPLES_DIR / "pandas") def test_pandas(datafiles: Path) -> None: """Test that the pandas/numpy is working correctly.""" - output = ru...
cx_Freeze 7.0.0 and PyTorch 2.2.2+cu118: TypeError: argument docstring of add_docstring should be a str **Describe the bug** An error occurs when try to freeze pytorch project with cx-Freeze. ``` copying C:\Project\_build\venv\lib\site-packages\torch\functional.py -> C:\Project\_build\out\lib\torch\functional.py ...
When try to use `pip install --force --no-cache --pre --extra-index-url https://marcelotduarte.github.io/packages/ cx_Freeze` with `cx_Freeze-7.1.0.dev3-cp39-cp39-win_amd64` I get the same error. I noticed also that with `cx_Freeze-7.1.0.dev3` there is an error during freezing: ``` Looking in indexes: https://pypi.o...
2024-04-25T07:35:01
python
Easy
pytest-dev/pytest-django
680
pytest-dev__pytest-django-680
[ "678" ]
c1bdb8d61498f472f27b4233ea50ffa2bce42147
diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -33,35 +33,35 @@ @pytest.fixture(scope="session") -def django_db_modify_db_settings_xdist_suffix(request): +def django_db_modify_db_settings_tox_suffix(request): skip_if_no_dja...
diff --git a/tests/test_db_setup.py b/tests/test_db_setup.py --- a/tests/test_db_setup.py +++ b/tests/test_db_setup.py @@ -288,7 +288,135 @@ def test_a(): assert conn_db2.vendor == 'sqlite' db_name = conn_db2.creation._get_test_db_name() - assert 'test_custom_db_name_g...
Correctly support DB access in parallel Tox testing Hi! Recently, I have migrated some Django projects to run their tests using [Tox](https://tox.readthedocs.io/en/latest/index.html). Because of the number of tests and Tox environments, it was configured to run tests in parallel. This required a similar approach as ...
Yes, it makes sense to use something like `django_db_modify_db_settings_tox_suffix` for this. But maybe there could be a single `*_suffix` then? It should also handle xdist in parallel tox then. I think it depends on how Pytest's fixture resolution order works. If it's deterministic (by design, and this contract won'...
2018-12-17T19:28:35
python
Easy
rigetti/pyquil
203
rigetti__pyquil-203
[ "138" ]
4229a22f98c37967635fbe7b29fcfadde2aea7d8
diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -261,7 +261,7 @@ def format_matrix_element(element): :param element: {int, float, complex, str} The parameterized element to format. """ - if isinstance(element, integer_types...
diff --git a/pyquil/tests/test_quil.py b/pyquil/tests/test_quil.py --- a/pyquil/tests/test_quil.py +++ b/pyquil/tests/test_quil.py @@ -582,3 +582,10 @@ def test_pretty_print_pi(): assert p.out() == 'RZ(0) 0\nRZ(pi) 1\nRZ(-pi) 2\nRZ(2*pi/3) 3\n' \ 'RZ(0.3490658503988659) 4\n' \ ...
Creating a gate with all integers throws an error ```python >>> DefGate("A", np.array([[1, 0], [0, 1]])).out() ``` throws the following error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in out fcols = [...
That is strange, it works for me. ![screen shot 2017-10-09 at 7 05 08 pm](https://user-images.githubusercontent.com/21032071/31340931-6a86d834-ad25-11e7-8bf3-8b46aee3676a.png) What's the different numpy versions? Mine is 1.13.3 Might be a Python version thing. I'm on Python 3, numpy 1.13.3 I'm also affected by thi...
2017-11-27T06:20:43
python
Hard
rigetti/pyquil
221
rigetti__pyquil-221
[ "212" ]
6890be97d997a3c3a38ddb36899cfb5677446194
diff --git a/pyquil/api/__init__.py b/pyquil/api/__init__.py --- a/pyquil/api/__init__.py +++ b/pyquil/api/__init__.py @@ -18,7 +18,7 @@ """ import warnings -__all__ = ['QVMConnection', 'QPUConnection', 'Job', 'get_devices'] +__all__ = ['QVMConnection', 'QPUConnection', 'Job', 'get_devices', 'errors'] from pyqui...
diff --git a/pyquil/tests/test_api.py b/pyquil/tests/test_api.py --- a/pyquil/tests/test_api.py +++ b/pyquil/tests/test_api.py @@ -154,8 +154,8 @@ def test_qpu_connection(): qpu = QPUConnection(device_name='fake_device') program = { - "type": "multishot", - "addresses": [0, 1], + "type"...
Meta-Issue: User Experience We need to improve user experience in the following areas: - [ ] jobs can get stuck indefinitely on 'job is currently running' if there were issues with background workers - [x] errors from the sync QVM are returned as strings, they should throw as exception instead otherwise they could be...
Somewhat related to: https://github.com/rigetticomputing/pyquil/issues/193 - [x] `run_and_measure` and likely other API calls will print periodic status updates that cannot be turned off. It would be nice to either add a flag to `run_and_measure` itself or make this configurable at the `QPUConnection`/`QVMConnection` l...
2017-12-14T00:42:27
python
Hard
marcelotduarte/cx_Freeze
2,204
marcelotduarte__cx_Freeze-2204
[ "2192" ]
7bc86a407b93eef77bfba1d3e7d1f3c18de9f97b
diff --git a/cx_Freeze/freezer.py b/cx_Freeze/freezer.py --- a/cx_Freeze/freezer.py +++ b/cx_Freeze/freezer.py @@ -88,8 +88,8 @@ def __init__( self.path: list[str] | None = self._validate_path(path) self.include_msvcr: bool = include_msvcr self.target_dir = target_dir - self.bin_includ...
diff --git a/tests/test_command_build_exe.py b/tests/test_command_build_exe.py --- a/tests/test_command_build_exe.py +++ b/tests/test_command_build_exe.py @@ -97,20 +97,6 @@ def test_build_exe_asmodule(datafiles: Path): assert output.startswith("Hello from cx_Freeze") -@pytest.mark.skipif(sys.platform != "win3...
api-ms-*.dll are copied regardless of `include_msvcr` value Might be related to #367. Asked bout this behavior in discussion #2171. I run a build workflow on github, as I do not own a microsoft machine. During the build, various api-ms-*.dll are copied from the PATH. I feel that this behavior is unwarranted. Spec...
I can confirm this issue. With VS 2022 and PowerShell, there are new API-ms DLLs to exclude. I'll make a patch.
2024-01-17T00:27:25
python
Easy
HandmadeMath/HandmadeMath
167
HandmadeMath__HandmadeMath-167
[ "141" ]
98748f702c8309e461294e7dbd2474974063f6da
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -52,7 +52,7 @@ #define HMM_ACOSF MyACosF #define HMM_SQRTF MySqrtF #include "HandmadeMath.h" - + By default, it is assumed that your math functions take radians. To use different units, you must define HMM_A...
diff --git a/test/categories/QuaternionOps.h b/test/categories/QuaternionOps.h --- a/test/categories/QuaternionOps.h +++ b/test/categories/QuaternionOps.h @@ -274,3 +274,25 @@ TEST(QuaternionOps, FromAxisAngle) EXPECT_NEAR(result.W, 0.707107f, 0.001f); } } + +TEST(QuaternionOps, RotateVector) +{ + { +...
Rotate point by quaterion Hi. HMM implements few quaterion functions but is missing one for rotating a vec3 position by a quaterion. I believe this is a correct implementation, a sample from a md5 model viewer. Could it be added to this library ? ``` //source: http://tfc.duke.free.fr/coding/src/md5mesh.c void Qua...
Hi if you'd like to write a implementation, and PR it i would accept it. If not i'll get to this the next time i have time. Thanks - Zak
2023-10-29T17:36:05
c
Hard
libssh2/libssh2
219
libssh2__libssh2-219
[ "185" ]
53ff2e6da450ac1801704b35b3360c9488161342
diff --git a/docs/libssh2_channel_request_auth_agent.3 b/docs/libssh2_channel_request_auth_agent.3 new file mode 100644 --- /dev/null +++ b/docs/libssh2_channel_request_auth_agent.3 @@ -0,0 +1,22 @@ +.TH libssh2_channel_request_auth_agent 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual" +.SH NAME +libssh2_channel_request...
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -118,6 +118,7 @@ set(TESTS public_key_auth_succeeds_with_correct_encrypted_rsa_key keyboard_interactive_auth_fails_with_wrong_response keyboard_interactive_auth_succeeds_with_correct_response + ag...
Agent forwarding Is there any interest in implementing agent forwarding functionality in libssh2? At one point a patch was submitted (https://www.libssh2.org/mail/libssh2-devel-archive-2012-03/0114.shtml) but it looks like it wasn't merged in (https://www.libssh2.org/mail/libssh2-devel-archive-2012-03/0121.shtml).
2017-10-20T17:23:19
c
Hard
libssh2/libssh2
1,084
libssh2__libssh2-1084
[ "1084" ]
f4f52ccc4d9a2d132a12df92bcee5e115359c3e3
diff --git a/.github/workflows/appveyor_docker.yml b/.github/workflows/appveyor_docker.yml --- a/.github/workflows/appveyor_docker.yml +++ b/.github/workflows/appveyor_docker.yml @@ -21,6 +21,8 @@ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERW...
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,6 +33,8 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY # OF SUCH DAMAGE. +# +# SPDX-License-Identifier: BSD-3-Clause include...
SPDX identifiers and a CI job to check them all - All files have prominent copyright and SPDX identifier - If not embedded in the file, in the .reuse/dep5 file - All used licenses are in LICENSES/ (not shipped in tarballs) - A new REUSE CI job verify that all files are OK
2023-06-05T11:56:41
c
Hard
HandmadeMath/HandmadeMath
113
HandmadeMath__HandmadeMath-113
[ "99" ]
785f19d4a740ced802fd6f79f065c2982ae4b3d3
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -130,14 +130,23 @@ #pragma warning(disable:4201) #endif -#ifdef __clang__ +#if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#if defined(__GNUC__) && (__G...
diff --git a/test/Makefile b/test/Makefile --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,6 @@ BUILD_DIR=./build -CXXFLAGS+=-g -Wall -Wextra -pthread -Wno-missing-braces -Wno-missing-field-initializers +CXXFLAGS+=-g -Wall -Wextra -pthread -Wno-missing-braces -Wno-missing-field-initializers -Wfloat-equal all: ...
Introduce "safe" float comparison Introduce a safe form of comparing floating point. == and != should not be used when comparing floating numbers. `./HandmadeMath.h:854:31: warning: comparing floating point with == or != is unsafe [-Wfloat-equal] hmm_bool Result = (Left.X == Right.X && Left.Y == Right.Y); ...
Which functions are doing this? Actually these are just the Equals functions. So this warning really isnt valid, might wanna disable this warning on clang That sounds like the better option. I'd imagine this is rarely used anyway, and if it is, it's probably comparing to zero or something. You’re both right, comparing ...
2020-03-27T22:05:39
c
Hard
nginx/njs
796
nginx__njs-796
[ "794" ]
39a2d4bf212346d1487e4d27383453cafefa17ea
diff --git a/src/njs_buffer.c b/src/njs_buffer.c --- a/src/njs_buffer.c +++ b/src/njs_buffer.c @@ -2117,10 +2117,6 @@ njs_buffer_prototype_index_of(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, index = -1; - if (njs_slow_path(array->byte_length == 0)) { - goto done; - } - length = array-...
diff --git a/test/buffer.t.js b/test/buffer.t.js --- a/test/buffer.t.js +++ b/test/buffer.t.js @@ -473,6 +473,20 @@ let indexOf_tsuite = { { buf: Buffer.from('abcdef'), value: 'abc', offset: 1, expected: -1 }, { buf: Buffer.from('abcdef'), value: 'def', offset: 1, expected: 3 }, { buf: Buffer...
NJS 0.8.6 Buffer.indexOf reads out of bounds instead of returning -1. ### Describe the bug NJS since version 0.8.6 Buffer.indexOf reads out of bounds instead of returning -1. Before submitting a bug report, please check the following: - [x] The bug is reproducible with the latest version of njs. - [x] I minimized th...
Hi @ap-wtioit, Thank you for the report. I was able to reproduce the issue, and I am working on it.
2024-10-10T02:22:26
c
Hard
HandmadeMath/HandmadeMath
103
HandmadeMath__HandmadeMath-103
[ "85" ]
21aa828a08693f8d2ae9fe552a3324ce726ebd82
diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,5 @@ compiler: - gcc install: - cd test - - make script: - - build/hmm_test_c - - build/hmm_test_c_no_sse - - build/hmm_test_cpp - - build/hmm_test_cpp_no_sse + - make all diff --git a/HandmadeMath.h b/HandmadeMath.h ---...
diff --git a/test/Makefile b/test/Makefile --- a/test/Makefile +++ b/test/Makefile @@ -1,8 +1,14 @@ -BUILD_DIR=build +BUILD_DIR=./build CXXFLAGS+=-g -Wall -Wextra -pthread -Wno-missing-braces -Wno-missing-field-initializers -all: c c_no_sse cpp cpp_no_sse +all: build_all + $(BUILD_DIR)/hmm_test_c + $(BUILD_DIR)/hm...
Quaternion from Mat4? Is there a way to use a LookAt function and end up with a quaternion? I know HMM_LookAt gives you a mat4, but I don't see a way to convert a mat4 to a quaternion. Ultimately, I'm trying to find a way to construct a quaternion and specify it's Up vector. LookAt seems to be the only available fun...
I think QuaternionFromAxisAngle should get you most of the way there (since you know the axis it should point along), but I suppose that's not exactly the same as specifying an up vector as you would in a LookAt. I'll ponder if we need another function for this case. No, you're right. I think we should have a LookAt fo...
2019-07-18T00:21:34
c
Hard
nginx/njs
909
nginx__njs-909
[ "905" ]
fcb99b68f86a72c96e21b81b3b78251174dbd3bf
diff --git a/external/njs_webcrypto_module.c b/external/njs_webcrypto_module.c --- a/external/njs_webcrypto_module.c +++ b/external/njs_webcrypto_module.c @@ -1532,6 +1532,9 @@ njs_ext_derive(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, break; + case NJS_ALGORITHM_HMAC: + break;...
diff --git a/test/webcrypto/derive.t.mjs b/test/webcrypto/derive.t.mjs --- a/test/webcrypto/derive.t.mjs +++ b/test/webcrypto/derive.t.mjs @@ -3,6 +3,16 @@ includes: [compatFs.js, compatBuffer.js, compatWebcrypto.js, runTsuite.js, webCr flags: [async] ---*/ +function has_usage(usage, x) { + for (let i = 0; i < u...
HMAC not implemented in crypto.subtle.deriveKey ### Describe the bug `deriveKey` only accepts AES options for `derivedKeyAlgorithm`. - [x] The bug is reproducible with the latest version of njs. - [x] I minimized the code and NGINX configuration to the smallest possible to reproduce the issue. ### To reproduce Step...
2025-05-08T05:17:40
c
Hard
nginx/njs
819
nginx__njs-819
[ "813" ]
72f0b5db8595bca740ffbfd2f9213e577718a174
diff --git a/src/njs_promise.c b/src/njs_promise.c --- a/src/njs_promise.c +++ b/src/njs_promise.c @@ -675,27 +675,19 @@ static njs_int_t njs_promise_object_resolve(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t unused, njs_value_t *retval) { - njs_promise_t *promise; - if (njs_slow_path...
diff --git a/test/js/promise_s27.t.js b/test/js/promise_s27.t.js new file mode 100644 --- /dev/null +++ b/test/js/promise_s27.t.js @@ -0,0 +1,34 @@ +/*--- +includes: [] +flags: [async] +---*/ + +var inherits = (child, parent) => { + child.prototype = Object.create(parent.prototype, { + constructor: { + ...
[Bug] Segmentation Fault with Promise function ### Describe the bug A clear and concise description of what the bug is. Before submitting a bug report, please check the following: - [x] The bug is reproducible with the latest version of njs. - [ ] I minimized the code and NGINX configuration to the smallest possible ...
2024-11-08T06:28:52
c
Hard
profanity-im/profanity
1,652
profanity-im__profanity-1652
[ "1624", "1624" ]
5ea7186c27196340c72a1f83736cca79dd9b692d
diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -61,6 +61,7 @@ core_sources = \ src/config/theme.c src/config/theme.h \ src/config/color.c src/config/color.h \ src/config/scripts.c src/config/scripts.h \ + src/config/cafile.c src/config/cafile.h \ src/plugins/plugins.h src/plugins/...
diff --git a/tests/unittests/config/stub_cafile.c b/tests/unittests/config/stub_cafile.c new file mode 100644 --- /dev/null +++ b/tests/unittests/config/stub_cafile.c @@ -0,0 +1,55 @@ +/* + * stub_cafile.c + * vim: expandtab:ts=4:sts=4:sw=4 + * + * Copyright (C) 2022 Steffen Jaeckel <jaeckel-floss@eyet-services.de> + *...
/sendfile does not work with self signed cert <!--- Provide a general summary of the issue in the Title above --> When using /sendfile to upload a file to an xmpp server using tls with a self signed certificate, the operation fails, stating "SSL peer certificate or SSH remote key was not OK". This fails even if the ac...
Seems I've found the culprit. [Looks like it's curl that's throwing the error](https://stackoverflow.com/questions/14192837/ssl-peer-certificate-or-ssh-remote-key-was-not-ok), so perhaps it'd be a good idea to run curl without verifying the peer when uploading and downloading files if the tls option for the account is ...
2022-03-22T10:58:44
c
Hard
HandmadeMath/HandmadeMath
105
HandmadeMath__HandmadeMath-105
[ "92" ]
f376f2a2a7e33f25f627f940b68d3f11b82c9cd3
diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,19 @@ language: cpp +os: + - linux + - osx compiler: - clang - gcc +matrix: + include: + # Windows x64 builds (MSVC) + - os: windows + script: + - ./test.bat travis + +before_install: + - eval "${MATRIX_E...
diff --git a/test/HandmadeTest.h b/test/HandmadeTest.h --- a/test/HandmadeTest.h +++ b/test/HandmadeTest.h @@ -212,9 +212,9 @@ hmt_covercase* _hmt_covercases = 0; hmt_category _hmt_new_category(const char* name) { hmt_category cat = { - .name = name, - .num_tests = 0, - .tests = (hmt_test*)...
No way to run tests on Windows Wondering if there's any interest in making project files (or some other build solution?) for running the test suite in MSVC. I am happy to put them together if they'd be useful. I have VS 2015 and got those projects working there. Not sure if VS 2017 requires a separate solution versi...
Hmm... I think solution files are unique per Visual Studio version (I think they even change with minor patches) and the version of build toolchain the user has on. This might be a case for cMake, just so people can generate "solution" files for any platform I needed to use C99 designated initializers in order to make ...
2019-07-31T17:34:50
c
Hard
nginx/njs
928
nginx__njs-928
[ "530" ]
3a22f42628e57f711bfc328e10388b2345f58647
diff --git a/src/njs_builtin.c b/src/njs_builtin.c --- a/src/njs_builtin.c +++ b/src/njs_builtin.c @@ -759,7 +759,6 @@ njs_global_this_prop_handler(njs_vm_t *vm, njs_object_prop_t *prop, { njs_value_t *value; njs_variable_t *var; - njs_function_t *function; njs_rbtree_node_t *...
diff --git a/test/js/async_closure.t.js b/test/js/async_closure.t.js new file mode 100644 --- /dev/null +++ b/test/js/async_closure.t.js @@ -0,0 +1,24 @@ +/*--- +includes: [] +flags: [async] +---*/ + +async function f() { + await 1; + var v = 2; + + function g() { + return v + 1; + } + + function s(...
SEGV in njs_function_lambda_call ### Environment ``` OS : Linux ubuntu 5.11.10 #1 SMP Sat Oct 30 23:40:08 CST 2021 x86_64 x86_64 x86_64 GNU/Linux Commit : c62a9fb92b102c90a66aa724cb9054183a33a68c Version : 0.7.4 Build : NJS_CFLAGS="$NJS_CFLAGS -fsanitize=address" NJS_CFLAGS="$NJS_C...
2025-06-12T05:43:21
c
Hard
HandmadeMath/HandmadeMath
84
HandmadeMath__HandmadeMath-84
[ "83" ]
f8b3a84cec6a6710ddb7273acd0b17ff74e9bcf9
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1,5 +1,5 @@ /* - HandmadeMath.h v1.5.0 + HandmadeMath.h v1.5.1 This is a single header file with a bunch of useful functions for game and graphics math operations. @@ -166,6 +166,8 @@ (*) Changed internal ...
diff --git a/test/categories/Transformation.h b/test/categories/Transformation.h --- a/test/categories/Transformation.h +++ b/test/categories/Transformation.h @@ -51,3 +51,27 @@ TEST(Transformations, Scale) EXPECT_FLOAT_EQ(scaled.Z, 1.5f); EXPECT_FLOAT_EQ(scaled.W, 1.0f); } + +TEST(Transformations, LookAt) +...
HMM_LookAt Using/Returning Partially Uninitialized Matrix Hi there. I was struggling to debug an issue and traced it back to `HMM_LookAt`... The issue has been marked below with comments. hmm_mat4 Result; // uninitialized hmm_vec3 F = HMM_NormalizeVec3(HMM_SubtractVec3(Center, Eye)); hmm_ve...
I swear I fixed that before...sorry about that. Fix version incoming.
2018-03-14T14:02:30
c
Hard
libssh2/libssh2
987
libssh2__libssh2-987
[ "582", "987" ]
5e560020555ada31c393092e07dd581bfc29a728
diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -536,7 +536,8 @@ struct transportpacket packet_length + padding_length + 4 + mac_length. */ unsigned char *payload; /* this is a pointer to a LIB...
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -117,6 +117,9 @@ foreach(test hmac-sha1-96 hmac-sha2-256 hmac-sha2-512 + hmac-sha1-etm@openssh.com + hmac-sha2-256-etm@openssh.com + hmac-sha2-512-etm@openssh.com ) add_test(NAME test_${test...
Implement HMAC -SHA-2 EtM **Describe the bug** libssh2 does not implement the `hmac-sha2-256-etm@openssh.com` or `hmac-sha2-512-etm@openssh.com` algorithms. **To Reproduce** Attempt to connect to a server supporting only those algorithms as MACs and notice it fails. **Expected behavior** libssh2 should connect...
I have ETM working on my private branch but as I've noted before, it's a bit of a hack. Specifically `_libssh2_transport_read` needs to support ETM and also further down the road `chacha20` needs to decrypt the full packet to get the size which also further complicates this function. It should probably branch to helpe...
2023-04-20T01:01:04
c
Hard
nginx/njs
747
nginx__njs-747
[ "743" ]
9d4bf6c60aa60a828609f64d1b5c50f71bb7ef62
diff --git a/src/njs_extern.c b/src/njs_extern.c --- a/src/njs_extern.c +++ b/src/njs_extern.c @@ -236,11 +236,9 @@ njs_external_prop_handler(njs_vm_t *vm, njs_object_prop_t *self, return NJS_ERROR; } - if (slots != NULL) { - prop->writable = slots->writable; - prop->configurable = slot...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -21819,6 +21819,11 @@ static njs_unit_test_t njs_webcrypto_test[] = { njs_str("let buf = new Uint32Array(4);" "buf === crypto.getRandomValues(buf)"), njs_str("tru...
The properties of `global.crypto` can lead to undefined behavior/crash ### Describe the bug Upon the first access, the `global.crypto` object contains both the `getRandomValues` function and the `subtle` property, which itself contains multiple cryptographic methods. However, on the second access, the `subtle` propert...
Hi @0xbigshaq, Regarding the first question, what you found is a bug and not an undefined-behaviour. The 'subtle' property is not deleted, but becomes hidden, due to improper enumerated flag copied [here](https://github.com/nginx/njs/blob/master/src/njs_extern.c#L239). For example ```js crypto.subtle; ...
2024-06-27T01:39:01
c
Hard
nginx/njs
950
nginx__njs-950
[ "939" ]
d93680e26b6f60226a0cc89fcc48db72d68a226c
diff --git a/src/njs_vm.h b/src/njs_vm.h --- a/src/njs_vm.h +++ b/src/njs_vm.h @@ -8,7 +8,7 @@ #define _NJS_VM_H_INCLUDED_ -#define NJS_MAX_STACK_SIZE (64 * 1024) +#define NJS_MAX_STACK_SIZE (160 * 1024) typedef struct njs_frame_s njs_frame_t;
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -21856,6 +21856,7 @@ njs_unit_test(njs_unit_test_t tests[], size_t num, njs_str_t *name, options.module = opts->module; options.unsafe = opts->unsafe; options.back...
EarleyBoyer: RangeError: Maximum call stack size exceeded ### Describe the bug v8-v7 EarleyBoyer test run fails [run.zip](https://github.com/user-attachments/files/21028584/run.zip) ### To reproduce - JS script ```js function f(n) { console.log(n) f(n + 1) } f(0) ``` ### Expected behavior njs sets a stack s...
2025-08-11T23:36:49
c
Hard
profanity-im/profanity
1,355
profanity-im__profanity-1355
[ "1236" ]
8c9aee22e81804bda6590ba80e9450ca90f56d14
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -195,6 +195,7 @@ static Autocomplete omemo_sendfile_ac; #endif static Autocomplete connect_property_ac; static Autocomplete tls_property_ac; +static Autocomplete auth_property_ac; static Autocomplete al...
diff --git a/tests/unittests/config/stub_accounts.c b/tests/unittests/config/stub_accounts.c --- a/tests/unittests/config/stub_accounts.c +++ b/tests/unittests/config/stub_accounts.c @@ -128,6 +128,7 @@ void accounts_set_pgp_keyid(const char * const account_name, const char * const void accounts_set_script_start(const...
Profanity should allow legacy auth when explicitly requested Some servers still require legacy auth and worked great with libstrophe < 1.9.3.
Are you talking about [XEP-0078](https://xmpp.org/extensions/xep-0078.html)? As this is obsolete you should rather ask the server operator to not require this. No doubt, the server should get updated. For some corporate setups that's rather involved though. I think he is talking about legacy auth, that was disabled b...
2020-06-04T21:18:46
c
Hard
HandmadeMath/HandmadeMath
41
HandmadeMath__HandmadeMath-41
[ "28" ]
90198604b875184079e46ed33ddc10ac67e2fe0d
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -393,6 +393,8 @@ HMMDEF hmm_mat4 HMM_MultiplyMat4f(hmm_mat4 Matrix, float Scalar); HMMDEF hmm_vec4 HMM_MultiplyMat4ByVec4(hmm_mat4 Matrix, hmm_vec4 Vector); HMMDEF hmm_mat4 HMM_DivideMat4f(hmm_mat4 Matrix, float Scalar); +HMMD...
diff --git a/test/hmm_test.cpp b/test/hmm_test.cpp --- a/test/hmm_test.cpp +++ b/test/hmm_test.cpp @@ -206,6 +206,41 @@ TEST(VectorOps, DotVec4) EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 70.0f); } +TEST(MatrixOps, Transpose) +{ + hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16 + + // Fill the matrix + int Counter...
No matrix transpose function We do not have a function for transposing `hmm_mat4`s. Adding one seems like the responsible thing to do! Probably call it `HMM_Transpose(hmm_mat4 Matrix)`.
What does a matrix Transpose function do? Transposing a matrix [swaps its rows and columns](https://chortle.ccsu.edu/VectorLessons/vmch13/vmch13_14.html) Heh if you know how to write one off the top of your head it'd be awesome if you could do it. If not then i will figure it out
2016-08-31T00:20:44
c
Hard
HandmadeMath/HandmadeMath
114
HandmadeMath__HandmadeMath-114
[ "112" ]
785f19d4a740ced802fd6f79f065c2982ae4b3d3
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -33,6 +33,16 @@ ============================================================================= + If you would prefer not to use the HMM_ prefix on function names, you can + + #define HMM_PREFIX + + To use a custom prefix ...
diff --git a/test/HandmadeMathDifferentPrefix.cpp b/test/HandmadeMathDifferentPrefix.cpp new file mode 100644 --- /dev/null +++ b/test/HandmadeMathDifferentPrefix.cpp @@ -0,0 +1,12 @@ +#define HMM_PREFIX(name) WOW_##name + +#define HANDMADE_MATH_IMPLEMENTATION +#define HANDMADE_MATH_NO_INLINE +#include "../HandmadeMath...
Add ability to change or remove the HMM_ prefix We should add the ability to change the function prefixes in case people think HMM_Whatever is too verbose and they can afford to change it in their own project. Ryan Fleury recommended that we could take an approach like stb_sprintf: https://github.com/nothings/stb/bl...
Yeah that'd be okay 👍
2020-03-27T22:46:01
c
Hard
profanity-im/profanity
2,053
profanity-im__profanity-2053
[ "2054" ]
bda6dabbd972584b585620c66a31375ec0d6245d
diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -124,6 +124,7 @@ unittest_sources = \ src/event/server_events.c src/event/server_events.h \ src/event/client_events.c src/event/client_events.h \ src/ui/tray.h src/ui/tray.c \ + tests/prof_cmocka.h \ tests/unittests/xmpp/stub_vcard.c ...
diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -1,10 +1,7 @@ -#include <stdarg.h> #include <stdio.h> #include <unistd.h> #include <fcntl.h> -#include <stddef.h> -#include <se...
Slashguard spams console until I type something ``` Profanity, version 0.15.0dev.master.edda887a Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>. Copyright (C) 2019 - 2025 Michael Vetter <jubalh@iodoru.org>. License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html> This is free so...
2025-07-28T09:29:01
c
Hard
nginx/njs
748
nginx__njs-748
[ "737" ]
9d4bf6c60aa60a828609f64d1b5c50f71bb7ef62
diff --git a/src/njs_object.c b/src/njs_object.c --- a/src/njs_object.c +++ b/src/njs_object.c @@ -2231,6 +2231,10 @@ njs_object_prototype_create_constructor(njs_vm_t *vm, njs_object_prop_t *prop, found: + if (njs_flathsh_is_empty(&vm->constructors[index].object.shared_hash)) { + index = NJS_OBJ_TYPE_OBJ...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -7450,6 +7450,9 @@ static njs_unit_test_t njs_test[] = "[i.next(), i.next(), i.next(), i.next()].map((x) => x.value)"), njs_str("1,2,3,") }, + { njs_str("[].value...
AddressSanitizer: SEGV src/njs_function.c:399 in njs_function_lambda_frame ### Describe the bug AddressSanitizer: SEGV src/njs_function.c:399 in njs_function_lambda_frame ==4237==ABORTING- [ok ] The bug is reproducible with the latest version of njs. - [ ok] I minimized the code and NGINX configuration to the s...
2024-06-27T01:58:47
c
Hard
HandmadeMath/HandmadeMath
175
HandmadeMath__HandmadeMath-175
[ "174" ]
bdc7dd2a516b08715a56f8b8eecefe44c9d68f40
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1431,10 +1431,10 @@ static inline HMM_Mat3 HMM_MulM3F(HMM_Mat3 Matrix, float Scalar) return Result; } -COVERAGE(HMM_DivM3, 1) +COVERAGE(HMM_DivM3F, 1) static inline HMM_Mat3 HMM_DivM3F(HMM_Mat3 Matrix, float Scalar) { -...
diff --git a/test/Makefile b/test/Makefile --- a/test/Makefile +++ b/test/Makefile @@ -2,77 +2,123 @@ BUILD_DIR=./build CXXFLAGS+=-g -Wall -Wextra -pthread -Wno-missing-braces -Wno-missing-field-initializers -Wfloat-equal -all: c c_no_simd cpp cpp_no_simd build_c_without_coverage build_cpp_without_coverage - -buil...
HMM_Div C11 Generic Macro Contains HMM_DivM2, HMM_DivM3, HMM_DivM4, and HMM_DivQ Which Don't Exist The `HMM_Div` macro contains some function names that don't exist when compiling in C mode using C11 _Generics: ```c #define HMM_Div(A, B) _Generic((B), \ float: _Generic((A), \ HMM_Mat2: HMM_DivM2F, \ ...
This might be related or the cause, but the `COVERAGE` and `ASSERT_COVERED` macros also have the wrong names. For example: ```c COVERAGE(HMM_DivM3, 1) //Missing F suffix! static inline HMM_Mat3 HMM_DivM3F(HMM_Mat3 Matrix, float Scalar) { ASSERT_COVERED(HMM_DivM3); //Missing F suffix! ... } ``` EDIT: ...
2025-02-24T02:15:04
c
Hard
HandmadeMath/HandmadeMath
25
HandmadeMath__HandmadeMath-25
[ "21" ]
c58043db844ed95c6088364580d264c9b1d8cd78
diff --git a/.gitignore b/.gitignore new file mode 100644 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# C...
diff --git a/test/HandmadeMath.cpp b/test/HandmadeMath.cpp new file mode 100644 --- /dev/null +++ b/test/HandmadeMath.cpp @@ -0,0 +1,5 @@ + +#define HANDMADE_MATH_IMPLEMENTATION +#define HANDMADE_MATH_CPP_MODE +#define HANDMADE_MATH_NO_INLINE +#include "../HandmadeMath.h" diff --git a/test/Makefile b/test/Makefile new ...
Needs unit testing Just wanted to open up the discussion about how unit testing should be implemented for Handmade Math. We could use a full C++ unit testing framework like [Google Test](https://github.com/google/googletest), or maybe just roll our own thing with asserts. I personally would lean toward a full framewor...
I think for right now just having our own unit thing right now would be fine as i really dont have the money to setup a Travis of Jenkins server for automated build tests. Although i do think Travis or Jenkins would be the way to go for this. Wait is Travis CL free now ? Travis CI is [free for open-source projects]...
2016-08-29T04:21:00
c
Hard
nginx/njs
920
nginx__njs-920
[ "918" ]
0c0d4e50ec4d582b345bc64c12b737b109b7bc03
diff --git a/src/njs_generator.c b/src/njs_generator.c --- a/src/njs_generator.c +++ b/src/njs_generator.c @@ -5491,7 +5491,7 @@ njs_generate_reference_error(njs_vm_t *vm, njs_generator_t *generator, ref_err->type = NJS_OBJ_TYPE_REF_ERROR; - njs_lexer_entry(vm, node->u.reference.atom_id, &entry); + njs_a...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -3923,6 +3923,9 @@ static njs_unit_test_t njs_test[] = { njs_str("delete this !== true"), njs_str("false") }, + { njs_str("undefined[Symbol()]"), + njs_str("TypeError:...
njs_process_script_fuzzer: ASAN error in njs_vsprintf ### Describe the bug We found a crashing test case when running the njs_process_script_fuzzer with ASAN. - [x] The bug is reproducible with the latest version of njs. - [x] I minimized the code to the smallest possible to reproduce the issue. ### To reproduce St...
2025-05-28T16:20:09
c
Hard
profanity-im/profanity
1,847
profanity-im__profanity-1847
[ "1846" ]
faccf24c759d7bddb4d3062c7f044e0c7640ffe7
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6575,7 +6575,8 @@ cmd_reconnect(ProfWin* window, const char* const command, gchar** args) int intval = 0; char* err_msg = NULL; if (g_strcmp0(value, "now") == 0) { - sessi...
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -54,6 +54,10 @@ void session_process_events(void) { } +void +connection_disconnect(void) +{ +} const char* connection_get_fulljid(void) {
`/reconnect now` doesn't work At this point command `/reconnect now` doesn't work. The problem is that the command causes program to enter invalid state (nor connected, nor disconnected). ``` prof: DBG: Input received: /reconnect now prof: DBG: Attempting reconnect with account <account> prof: INF: Connecting wit...
2023-05-10T15:26:46
c
Hard
profanity-im/profanity
1,260
profanity-im__profanity-1260
[ "1068" ]
8fba8a8958146a0fa42d649339b66604defd6297
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -114,7 +114,7 @@ static char* _logging_autocomplete(ProfWin *window, const char *const input, gbo static char* _color_autocomplete(ProfWin *window, const char *const input, gboolean previous); static char...
diff --git a/tests/unittests/config/stub_accounts.c b/tests/unittests/config/stub_accounts.c --- a/tests/unittests/config/stub_accounts.c +++ b/tests/unittests/config/stub_accounts.c @@ -14,7 +14,7 @@ char * accounts_find_all(char *prefix) return NULL; } -char * accounts_find_enabled(char *prefix) +char * accou...
OMEMO: Autocomplete suggests fingerprints not belonging to the selected contact The OMEMO autocomplete feature suggests fingerprints not belonging to the selected contact. Steps to reproduce: 1. Enable omemo (set policy to automatic / always - not tested if this is needed to reproduce...) 2. Show the fingerprint l...
Yes so far it's all the fingerprints we get. AFAICT we don't have access to the first argument of a command from the autocompletion command. So I can't filter out fingerprints easily. @pasis, @boothj5 can you confirm? If we don't solve this (ever or for 0.7.0) then we should document the usage at https://profanity-i...
2020-01-31T09:15:02
c
Hard
HandmadeMath/HandmadeMath
117
HandmadeMath__HandmadeMath-117
[ "116" ]
68d2af495ce8a106d1ed5d063f168d5a10ae4420
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,6 @@ # Understanding the structure of Handmade Math -Most of the functions in Handmade Math are very short, and are the kind of functions you want to have inlined. Because of this, most functions in Handmade Math ar...
diff --git a/test/HandmadeMath.c b/test/HandmadeMath.c --- a/test/HandmadeMath.c +++ b/test/HandmadeMath.c @@ -2,6 +2,4 @@ #include "HandmadeTest.h" #endif -#define HANDMADE_MATH_IMPLEMENTATION -#define HANDMADE_MATH_NO_INLINE #include "../HandmadeMath.h" diff --git a/test/test.bat b/test/test.bat --- a/test/test....
Remove the implementation section, shove it all in the header I know we've gone back and forth on this before (#57) but I don't think we need to have a separate implementation section in Handmade Math. Most of the function implementations are inline, since that gives the compiler the most context for optimizations (...
I’m fully onboard for this. LETS DO IT 👍
2020-04-10T00:56:36
c
Hard
libssh2/libssh2
1,072
libssh2__libssh2-1072
[ "1056" ]
e5c03043332bfed6b56b0300a5f8059d37b74018
diff --git a/Makefile.mk b/Makefile.mk --- a/Makefile.mk +++ b/Makefile.mk @@ -211,15 +211,16 @@ prebuild: $(OBJ_DIR) $(OBJ_DIR)/version.inc example: $(TARGETS_EXAMPLES) -# Get DOCKER_TESTS, STANDALONE_TESTS, SSHD_TESTS, TESTS_WITH_LIB_STATIC, +# Get DOCKER_TESTS, DOCKER_TESTS_STATIC, STANDALONE_TESTS, STANDALONE_...
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,9 +39,11 @@ include(CopyRuntimeDependencies) list(APPEND LIBRARIES ${SOCKET_LIBRARIES}) transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") -# Get 'DOCKER_TESTS',...
`make check` fails with `--disable-static` **Describe the bug** `make check` fails with `--disable-static`. **To Reproduce** ``` ./configure --prefix=/usr --disable-static && make && make check ``` It produces: ``` /usr/bin/ld: test_auth_keyboard_info_request.o: in function `main': test_auth_keyboard...
This function shouldn't be exported, but also should be available for use in unit tests. Hum.
2023-05-31T07:28:06
c
Hard
nginx/njs
936
nginx__njs-936
[ "934" ]
34b80511acfd44a5cbbbce835d7540081e5d7527
diff --git a/external/njs_regex.c b/external/njs_regex.c --- a/external/njs_regex.c +++ b/external/njs_regex.c @@ -114,6 +114,11 @@ njs_regex_escape(njs_mp_t *mp, njs_str_t *text) for (p = start; p < end; p++) { switch (*p) { + case '\\': + p += 1; + + break; + case...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -11969,6 +11969,48 @@ static njs_unit_test_t njs_test[] = { njs_str("/[]a/.test('a')"), njs_str("false") }, + { njs_str("/[#[]/.test('[')"), + njs_str("true") }, + + ...
Failed to run v8-v7 test ### Describe the bug [run.zip](https://github.com/user-attachments/files/20789860/run.zip) One of the regular expressions in the v8-v7 tests doesn't seem to parse correctly ``` var re37 = /\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g; ``` ``` Thrown: SyntaxError: pcre_compile2("\s*([+>~\s])\s*([a-...
2025-07-01T01:46:11
c
Hard
profanity-im/profanity
1,944
profanity-im__profanity-1944
[ "1940" ]
605ee6e99a226565125ab72e7f16951930d8d6ee
diff --git a/src/event/server_events.c b/src/event/server_events.c --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -58,6 +58,7 @@ #include "ui/window.h" #include "tools/bookmark_ignore.h" #include "xmpp/xmpp.h" +#include "xmpp/iq.h" #include "xmpp/muc.h" #include "xmpp/chat_session.h" #include ...
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -450,6 +450,11 @@ iq_mam_request(ProfChatWin* win, GDateTime* enddate) { } +void +iq_feature_retrieval_complete_handler(void) +{ +} + void publish_user_...
Wrong error about server not supporting MAM. <!--- Provide a general summary of the issue in the Title above --> On startup profanity shows the error `Server doesn't support MAM (urn:xmpp:mam:2).` although the server supports MAM. <!--- More than 50 issues open? Please don't file any new feature requests --> <!--...
Did you try the patch I shared? Does it happen for you on first connect as well or only on reconnect? Going to open a PR with it when I have the time, maybe still today. Yes, the patch worked. Just created the issue to assure it's not getting forgotten.
2023-12-28T18:14:43
c
Hard
nginx/njs
749
nginx__njs-749
[ "734" ]
9d4bf6c60aa60a828609f64d1b5c50f71bb7ef62
diff --git a/src/njs_builtin.c b/src/njs_builtin.c --- a/src/njs_builtin.c +++ b/src/njs_builtin.c @@ -783,13 +783,14 @@ njs_global_this_object(njs_vm_t *vm, njs_object_prop_t *self, njs_object_prop_t *prop; njs_lvlhsh_query_t lhq; + if (retval == NULL) { + return NJS_DECLINED; + } + nj...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -12885,6 +12885,9 @@ static njs_unit_test_t njs_test[] = { njs_str("var ex; try {({}) instanceof this} catch (e) {ex = e}; ex"), njs_str("TypeError: right argument is not callab...
memmove-vec-unaligned-erms Testcase ```js delete this.global ``` ASAN ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==82143==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fee4e4e813f bp 0x7ffe41ff2930 sp 0x7ffe41ff20b8 T0) ==...
2024-06-27T02:16:56
c
Hard
nginx/njs
731
nginx__njs-731
[ "730" ]
e9f8cdfa139d6bbf7d7855e7e197f27a43486998
diff --git a/src/njs_parser.c b/src/njs_parser.c --- a/src/njs_parser.c +++ b/src/njs_parser.c @@ -2827,7 +2827,7 @@ njs_parser_arguments(njs_parser_t *parser, njs_lexer_token_t *token, return njs_parser_stack_pop(parser); } - parser->scope->in_args = 1; + parser->scope->in_args++; njs_pars...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -19938,19 +19938,19 @@ static njs_unit_test_t njs_test[] = { njs_str("(async function() {console.log('Number: ' + await 111)})"), njs_str("SyntaxError: await in arguments not su...
heap-use-after-free src/njs_value.h:992:27 Testcase ```js let c = []; async function Float32Array(){ new Promise(Float32Array); Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.isFrozen(Object.i...
2024-06-08T04:51:25
c
Hard
HandmadeMath/HandmadeMath
91
HandmadeMath__HandmadeMath-91
[ "90" ]
e095aefaf7d103cfdb8ecb715bc654c505eae228
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1,5 +1,5 @@ /* - HandmadeMath.h v1.6.0 + HandmadeMath.h v1.7.0 This is a single header file with a bunch of useful functions for game and graphics math operations. @@ -172,6 +172,10 @@ (*) Added array subs...
diff --git a/test/categories/SSE.h b/test/categories/SSE.h --- a/test/categories/SSE.h +++ b/test/categories/SSE.h @@ -8,10 +8,10 @@ TEST(SSE, LinearCombine) hmm_mat4 MatrixTwo = HMM_Mat4d(4.0f); hmm_mat4 Result; - Result.Rows[0] = HMM_LinearCombineSSE(MatrixOne.Rows[0], MatrixTwo); - Result.Rows[...
Mat4 SSE definition looks row-major Our definition of hmm_mat4 has an SSE variable called `Rows`. This should really be `Columns`, since our matrices are column-major. Apparently we're doing all the math correctly, but we should probably rename the variable to avoid confusion. @StrangeZak is this ok to do, or am I m...
Totally okay to do
2018-08-14T18:27:50
c
Hard
HandmadeMath/HandmadeMath
67
HandmadeMath__HandmadeMath-67
[ "66" ]
98fffbd7cc5643125c851fb93372167734fea9ca
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1,5 +1,5 @@ /* - HandmadeMath.h v1.2.0 + HandmadeMath.h v1.3.0 This is a single header file with a bunch of useful functions for basic game math operations. @@ -20,22 +20,6 @@ =================================...
diff --git a/test/HandmadeMath.c b/test/HandmadeMath.c --- a/test/HandmadeMath.c +++ b/test/HandmadeMath.c @@ -1,4 +1,3 @@ - #define HANDMADE_MATH_IMPLEMENTATION #define HANDMADE_MATH_NO_INLINE #include "../HandmadeMath.h" diff --git a/test/HandmadeTest.h b/test/HandmadeTest.h --- a/test/HandmadeTest.h +++ b/test/Ha...
HANDMADE_MATH_CPP_MODE instructions? The instructions for HANDMADE_MATH_CPP_MODE are as follows: ``` For overloaded and operator overloaded versions of the base C functions, you MUST #define HANDMADE_MATH_CPP_MODE in EXACTLY one C or C++ file that includes this header, BEFORE the include...
Yeah, I'm not sure about those instructions either. I've always just #defined HANDMADE_MATH_CPP_MODE everywhere I include it. @StrangeZak, is it really possible to use C++ functions without defining HANDMADE_MATH_CPP_MODE everywhere? Is that just some very drastic difference between MSVC and other compilers? @bvisne...
2017-08-01T16:26:41
c
Hard
HandmadeMath/HandmadeMath
81
HandmadeMath__HandmadeMath-81
[ "71" ]
77914405c3e8da906c4a61d6068d031110fcb129
diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,4 @@ *.exe *.out *.app -hmm_test -hmm_test* +test/build diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ install: - cd test - make script: - - ./hmm_test_c - - ./hmm_test_c_no_sse - ...
diff --git a/test/HandmadeTest.h b/test/HandmadeTest.h --- a/test/HandmadeTest.h +++ b/test/HandmadeTest.h @@ -1,104 +1,263 @@ +/* + HandmadeTest.h + + This is Handmade Math's test framework. It is fully compatible with both C + and C++, although it requires some compiler-specific features. + + The basic way of cre...
Making unit tests embeddable Hello all, I am using handmade math in a project, using a unity build. I'd like to keep this structure. My project also has a mechanism for running unit tests. I'd like to fold the HMM unit tests in so they run seamlessly in my build. This could be accomplished by splitting test/hm...
@bvisness The unit test system is all yours. Take this 😋 @revivalizer I'm frankly not sure why you need to run our unit tests in your build, since we guarantee that all of our tests pass when we release a new version. I also don't think it makes sense to heavily modify our unit test setup to work with other people's ...
2018-02-15T06:24:11
c
Hard
HandmadeMath/HandmadeMath
58
HandmadeMath__HandmadeMath-58
[ "57" ]
67b84dece73fd8351c026260dd04bcbf388dabff
diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ *.out *.app hmm_test +hmm_test* diff --git a/.gitmodules b/.gitmodules --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "externals/googletest"] - path = externals/googletest - url = https://github.com/google/googl...
diff --git a/test/HandmadeMath.c b/test/HandmadeMath.c new file mode 100644 --- /dev/null +++ b/test/HandmadeMath.c @@ -0,0 +1,4 @@ + +#define HANDMADE_MATH_IMPLEMENTATION +#define HANDMADE_MATH_NO_INLINE +#include "../HandmadeMath.h" diff --git a/test/HandmadeTest.h b/test/HandmadeTest.h new file mode 100644 --- /dev/...
Doesn't build in C (non-C++) mode It currently doesn't build in C mode, because `NLerp` uses `HMM_Normalize()` instead of `HMM_NormalizeQuaternion()`. I also doubt that a compiler enforcing real C99 mode would be very happy about your usage of inline in the implementation. Having function declarations like `exter...
Ack. This is what we get for only running our tests in C++ mode. I'll dig into these issues and see what I can do. Great, thank you! Regarding the C99 thing, it may make sense to test with -std=c99 and using two 2 .c files, so only one of them has #define HANDMADE_MATH_IMPLEMENTATION and the other can't "see" the fu...
2017-04-03T00:18:16
c
Hard
profanity-im/profanity
1,796
profanity-im__profanity-1796
[ "1797" ]
f618b9cc16c37aa832202340f2f4cf2b29348026
diff --git a/src/common.c b/src/common.c --- a/src/common.c +++ b/src/common.c @@ -355,33 +355,32 @@ prof_occurrences(const char* const needle, const char* const haystack, int offse return *result; } - gchar* haystack_curr = g_utf8_offset_to_pointer(haystack, offset); - if (g_str_has_prefix(haysta...
diff --git a/tests/unittests/test_common.c b/tests/unittests/test_common.c --- a/tests/unittests/test_common.c +++ b/tests/unittests/test_common.c @@ -535,6 +535,28 @@ _lists_equal(GSList* a, GSList* b) return TRUE; } +void +prof_occurrences_of_large_message_tests(void** state) +{ + GSList* actual = NULL; + ...
OMEMO QR code is not compatible with conversations Profanity creates a QR with content in the form `xmpp:user@example.org?omemo-sid-1032437584=67214ab8-a25fd7a9-44ed1ea6-4276f18d-ff92fae9-23f8ebab-5b218d0d-4ceedc4` which doesn't work with conversations. Removing the dashes makes it work: `xmpp:user@example.org?omemo-s...
2023-03-10T10:45:51
c
Hard
HandmadeMath/HandmadeMath
107
HandmadeMath__HandmadeMath-107
[ "31" ]
a9b08b9147a7f3a80f23b4ed6c1bc81735930f17
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -4,6 +4,8 @@ This is a single header file with a bunch of useful functions for game and graphics math operations. + All angles are in radians. + =========================================================================...
diff --git a/test/categories/Projection.h b/test/categories/Projection.h --- a/test/categories/Projection.h +++ b/test/categories/Projection.h @@ -15,7 +15,7 @@ TEST(Projection, Orthographic) TEST(Projection, Perspective) { - hmm_mat4 projection = HMM_Perspective(90.0f, 2.0f, 5.0f, 15.0f); + hmm_mat4 projecti...
Inconsistent use of radians vs. degrees The trigonometric functions in Handmade Math use radians for angles. `HMM_Perspective`, on the other hand, uses degrees. We should make this usage consistent between the two, or find a way to clarify which uses radians and which uses degrees.
Oh, i was not aware of this but i really think degrees, just because i dont want to have to convert what im passing in to a function every single time to radians. @bvisness If you could handle this bug that would be awesome because im not sure of all of the use cases that have this error As I'm thinking about it mo...
2019-08-03T06:22:56
c
Hard
HandmadeMath/HandmadeMath
101
HandmadeMath__HandmadeMath-101
[ "100" ]
45c91702a910f7b8df0ac90f84667f6d94ffb9d3
diff --git a/HandmadeMath.h b/HandmadeMath.h --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1186,10 +1186,12 @@ HMM_INLINE hmm_mat4 HMM_Perspective(float FOV, float AspectRatio, float Near, fl { hmm_mat4 Result = HMM_Mat4(); - float TanThetaOver2 = HMM_TanF(FOV * (HMM_PI32 / 360.0f)); + // See https://www....
diff --git a/test/categories/Projection.h b/test/categories/Projection.h --- a/test/categories/Projection.h +++ b/test/categories/Projection.h @@ -20,16 +20,16 @@ TEST(Projection, Perspective) { hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -15.0f); hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projecti...
Bug in HMM_Perspecive Values in projection matrix are in the wrong places, apart from that if we decided to use tangens instead of cotangents in the [0][0] position aspect ratio also have to be inverted so: float TanThetaOver2 = HMM_TanF(FOV * (HMM_PI32 / 360.0f)); Result.Elements[0][0] = 1.0f / AspectRa...
I've successfully used HMM_Perspective in a couple projects, and I recently ported the exact same math over to Rust for another project of mine without issue, so I'm surprised to hear that something wouldn't be working. Could you be more specific about which values are in the wrong place? I also ran into this just toda...
2019-07-09T22:11:34
c
Hard
nginx/njs
805
nginx__njs-805
[ "802" ]
198539036deacc8d263005a14849fd93c5d314f4
diff --git a/external/njs_fs_module.c b/external/njs_fs_module.c --- a/external/njs_fs_module.c +++ b/external/njs_fs_module.c @@ -160,6 +160,8 @@ static njs_int_t njs_fs_read_file(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t calltype, njs_value_t *retval); static njs_int_t njs_fs_readdir(njs_vm...
diff --git a/test/fs/methods.t.js b/test/fs/methods.t.js --- a/test/fs/methods.t.js +++ b/test/fs/methods.t.js @@ -435,6 +435,56 @@ let realpathP_tsuite = { get tests() { return realpath_tests() }, }; +async function readlink_test(params) { + let lname = params.args[0]; + try { fs.unlinkSync(lname); } cat...
fs.readlink / fs.readlinkSync Hello, it appears fs implementation in njs does not includes `fs.readlink` nor `fs.readlinkSync`, possible to add it please? thanks
2024-10-19T05:02:54
c
Hard
nginx/njs
757
nginx__njs-757
[ "755" ]
b593dd4aba0f5c730c1d90072cdee7dd9a93beed
diff --git a/src/njs_parser.c b/src/njs_parser.c --- a/src/njs_parser.c +++ b/src/njs_parser.c @@ -6699,23 +6699,32 @@ njs_parser_labelled_statement_after(njs_parser_t *parser, { njs_int_t ret; uintptr_t unique_id; + njs_parser_node_t *node; const njs_lexer_entry_...
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -3494,6 +3494,22 @@ static njs_unit_test_t njs_test[] = "} catch(e) {c = 10;}; [c, fin]"), njs_str("1,1") }, + { njs_str("function v1() {" + "f...
SEGV njs_function.c:780:17 in njs_function_capture_closure Testcase ```js function v1(){ function v0(){ } v2:; new v3(); } new v1(); ``` ASAN ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==2336==ERROR: AddressSanitizer: SEGV on unknown ...
2024-07-05T18:34:23
c
Hard
nfrechette/acl
248
nfrechette__acl-248
[ "235", "247" ]
4b325ee08ff4779cbff8f06c73910e58df7046f8
diff --git a/docs/compressing_a_raw_clip.md b/docs/compressing_a_raw_clip.md --- a/docs/compressing_a_raw_clip.md +++ b/docs/compressing_a_raw_clip.md @@ -30,7 +30,7 @@ settings.range_reduction = RangeReductionFlags8::AllTracks; settings.segmenting.enabled = true; settings.segmenting.range_reduction = RangeReductionF...
diff --git a/test_data/configs/uniformly_sampled_quant_bind_relative.config.sjson b/test_data/configs/uniformly_sampled_quant_bind_relative.config.sjson new file mode 100644 --- /dev/null +++ b/test_data/configs/uniformly_sampled_quant_bind_relative.config.sjson @@ -0,0 +1,24 @@ +version = 1 + +algorithm_name = "Unifor...
Refactor the error metric and introduce pose caching Right now, because we use a virtual function and a custom implementation to transform from local space to object space, it is not possible to cache the object space transforms. This requires us to calculate them over and over when very often, they do not change. By e...
2019-12-08T00:50:33
cpp
Hard
nfrechette/acl
230
nfrechette__acl-230
[ "215" ]
c083b7306d0a887a2f9b755ef3e88174994a73e3
diff --git a/includes/acl/core/bit_manip_utils.h b/includes/acl/core/bit_manip_utils.h --- a/includes/acl/core/bit_manip_utils.h +++ b/includes/acl/core/bit_manip_utils.h @@ -26,25 +26,20 @@ #include "acl/core/compiler_utils.h" #include "acl/core/error.h" +#include "acl/math/math.h" #include <cstdint> #if !de...
diff --git a/tests/sources/core/test_bit_manip_utils.cpp b/tests/sources/core/test_bit_manip_utils.cpp --- a/tests/sources/core/test_bit_manip_utils.cpp +++ b/tests/sources/core/test_bit_manip_utils.cpp @@ -26,8 +26,6 @@ #include <acl/core/bit_manip_utils.h> -//#include <cstring> - using namespace acl; TEST_CA...
Enable popcount support for Windows ARM `_mm_popcnt_u*` and `__builtin_popcount*` aren't supported by MSVC. Find the correct header and intrinsic to use for that platform.
See this commit and comments for details: https://github.com/nfrechette/acl/commit/610c424dcf99005dc880726e0388af010ae4e9c9
2019-11-01T04:48:11
cpp
Hard
nfrechette/acl
300
nfrechette__acl-300
[ "168" ]
640a1aa7f1f7e44462f1cb896598c56b248a25fd
diff --git a/cmake/CMakeCompiler.cmake b/cmake/CMakeCompiler.cmake --- a/cmake/CMakeCompiler.cmake +++ b/cmake/CMakeCompiler.cmake @@ -60,6 +60,12 @@ macro(setup_default_compiler_flags _project_name) target_compile_options(${_project_name} PRIVATE -Wshadow) # Enable shadowing warnings target_compile_options(${_...
diff --git a/test_data/reference.config.sjson b/test_data/reference.config.sjson --- a/test_data/reference.config.sjson +++ b/test_data/reference.config.sjson @@ -12,22 +12,6 @@ rotation_format = "quatf_full" translation_format = "vector3f_full" scale_format = "vector3f_full" -// Threshold angle value to use when d...
Unify naming convention to something closer to the C++ stdlib Change CamelCase class/struct names to lowest_case equivalents and typedef the old names. The old names will be removed in 2.0.
2020-07-09T18:02:19
cpp
Hard
nfrechette/acl
219
nfrechette__acl-219
[ "214" ]
575ba0d9d1c3d6641f70130168824b38f24c8878
diff --git a/includes/acl/compression/stream/sample_streams.h b/includes/acl/compression/stream/sample_streams.h --- a/includes/acl/compression/stream/sample_streams.h +++ b/includes/acl/compression/stream/sample_streams.h @@ -195,8 +195,7 @@ namespace acl } // Pack and unpack at our desired bit rate - uint8_t...
diff --git a/tests/sources/math/test_vector4_impl.h b/tests/sources/math/test_vector4_impl.h --- a/tests/sources/math/test_vector4_impl.h +++ b/tests/sources/math/test_vector4_impl.h @@ -562,6 +562,29 @@ void test_vector4_impl(const Vector4Type& zero, const QuatType& identity, const REQUIRE(vector_get_y(vector_sign(t...
Decay quantization values to avoid LHS Right now when we iterate to optimize the quantization bit rates, we don't modify the tracks in place. Instead, we quantize the samples on demand over and over. To do so, we pack the value on the stack, and unpack it. This is needlessly slow. Instead we should just decay the value...
2019-08-16T02:12:24
cpp
Hard
nfrechette/acl
443
nfrechette__acl-443
[ "441" ]
40ca64550ef4cb708c3b49b0c68253d7751d4d33
diff --git a/includes/acl/compression/impl/clip_context.h b/includes/acl/compression/impl/clip_context.h --- a/includes/acl/compression/impl/clip_context.h +++ b/includes/acl/compression/impl/clip_context.h @@ -127,23 +127,64 @@ namespace acl uint32_t m_bone_index; }; + // Metadata per transform struct t...
diff --git a/tests/sources/core/test_iterator.cpp b/tests/sources/core/test_iterator.cpp --- a/tests/sources/core/test_iterator.cpp +++ b/tests/sources/core/test_iterator.cpp @@ -31,22 +31,25 @@ using namespace acl; -TEST_CASE("iterator", "[core][iterator]") +TEST_CASE("array_iterator", "[core][iterator]") { - co...
Use object space shell distance to detect constant and default sub-tracks instead of threshold Partially implemented through #373, we need to push further and make sure to remove the constant sub-track thresholds in the compression settings.
2023-01-14T03:23:13
cpp
Hard
nfrechette/acl
206
nfrechette__acl-206
[ "195" ]
b7e5fb87e9fe1bb8e588ac3dbf435df3026600b3
diff --git a/cmake/Toolchain-Android.cmake b/cmake/Toolchain-Android.cmake --- a/cmake/Toolchain-Android.cmake +++ b/cmake/Toolchain-Android.cmake @@ -4,3 +4,6 @@ set(CMAKE_SYSTEM_NAME Android) # Use the clang tool set because it's support for C++11 is superior set(CMAKE_GENERATOR_TOOLSET DefaultClang) + +# Make su...
diff --git a/tests/main_android/CMakeLists.txt b/tests/main_android/CMakeLists.txt --- a/tests/main_android/CMakeLists.txt +++ b/tests/main_android/CMakeLists.txt @@ -4,8 +4,8 @@ project(acl_unit_tests) set(CMAKE_CXX_STANDARD 11) set(CMAKE_ANDROID_ARCH armv7-a) -set(CMAKE_ANDROID_API_MIN 21) -set(CMAKE_ANDROID_API ...
Use switch instead of loop for sample decompression Vs2015 often fails to unroll the loops, use switch without breaks up to 4 No need to support 1/3, only 2/4.
2019-05-11T16:53:19
cpp
Hard
nfrechette/acl
217
nfrechette__acl-217
[ "71" ]
eb64595d10a386bd8b2f9186b68b308cbe931368
diff --git a/.gitmodules b/.gitmodules --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,7 @@ [submodule "external/catch2"] path = external/catch2 url = https://github.com/catchorg/Catch2 +[submodule "external/rtm"] + path = external/rtm + url = https://github.com/nfrechette/rtm.git + branch = develop diff --git a/cm...
diff --git a/test_data/README.md b/test_data/README.md --- a/test_data/README.md +++ b/test_data/README.md @@ -7,7 +7,8 @@ This directory is to contain all the relevant data to perform regression testing Find the latest test data zip file located on Google Drive and save it into this directory. If your data ever becom...
Implement non-hierarchical track support It is common to have animation clips also add animated data that isn't a bone. Things like IK weights, blend shape weights, etc. We should support compressing stand-alone tracks of type: float1, float2, float3, float4. No segmenting support for now. API description: * ...
Progress in on-going and this should land in develop sometime in August.
2019-08-15T03:57:08
cpp
Hard
nfrechette/acl
251
nfrechette__acl-251
[ "250" ]
e51de59fa6f3c8a0775e0dad63fe0c28aaf8874e
diff --git a/docs/compressing_a_raw_clip.md b/docs/compressing_a_raw_clip.md --- a/docs/compressing_a_raw_clip.md +++ b/docs/compressing_a_raw_clip.md @@ -8,10 +8,6 @@ The compression level used will dictate how much time to spend optimizing the va While we support various [rotation and vector quantization formats](...
diff --git a/test_data/configs/uniformly_sampled_mixed_var_0.config.sjson b/test_data/configs/uniformly_sampled_mixed_var_0.config.sjson new file mode 100644 --- /dev/null +++ b/test_data/configs/uniformly_sampled_mixed_var_0.config.sjson @@ -0,0 +1,11 @@ +version = 2 + +algorithm_name = "uniformly_sampled" + +level = ...
Remove range reduction from compression settings Range reduction should be controlled by the algorithm entirely. It served only to debug by being exposed but the code is now very stable. Cleaning this up will reduce the maintenance burden and avoid potentially using an invalid setting combination by simplifying the API...
2019-12-11T05:32:47
cpp
Hard
nfrechette/acl
538
nfrechette__acl-538
[ "536" ]
16aec74ff32df522a97c1d006e2e8e4984bad89f
diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -9,243 +9,6 @@ on: - '**/*.md' jobs: - linux-xenial: - runs-on: ubuntu-latest - strategy: - matrix: - ...
diff --git a/tests/main_android/app/src/main/cpp/CMakeLists.txt b/tests/main_android/app/src/main/cpp/CMakeLists.txt --- a/tests/main_android/app/src/main/cpp/CMakeLists.txt +++ b/tests/main_android/app/src/main/cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.6) +cmake_minimum_required(VERSION 3.2...
Upgrade minimum cmake version to compile with cmake 4 Hi, I'm currently trying to integrate acl into [o3de](https://github.com/o3de/o3de). Currently I use cmake 4.0.3 and I was stuck with the following error: ``` CMake Error at build/windows/_deps/acl-src/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with ...
Hello and thanks for reaching out! ACL is a header only library and so you shouldn't need to run it with CMake in order to use it as an end user. CMake is exclusively used by the tools and test harness for internal development. CMake does not produce binaries or artifacts that you would need to use for non-development...
2025-08-16T11:52:33
cpp
Hard
nfrechette/acl
240
nfrechette__acl-240
[ "170" ]
9fa7ad1ad1dbc11136329a17d368acd045c27a99
diff --git a/cmake/CMakeCompiler.cmake b/cmake/CMakeCompiler.cmake --- a/cmake/CMakeCompiler.cmake +++ b/cmake/CMakeCompiler.cmake @@ -20,7 +20,6 @@ macro(setup_default_compiler_flags _project_name) target_compile_options(${_project_name} PRIVATE "/arch:AVX") endif() else() - add_definitions(-DACL_NO_INTR...
diff --git a/tests/main_android/CMakeLists.txt b/tests/main_android/CMakeLists.txt --- a/tests/main_android/CMakeLists.txt +++ b/tests/main_android/CMakeLists.txt @@ -54,7 +54,7 @@ add_definitions(-DRTM_ON_ASSERT_THROW) # Disable SIMD if not needed if(NOT USE_SIMD_INSTRUCTIONS) - add_definitions(-DACL_NO_INTRINSICS...
Integrate and switch to Realtime Math The ACL math code has been moved into its own depot Realtime Math (https://github.com/nfrechette/rtm) for easier maintenance and added flexibility. The types and naming convention changed a bit which will break compilation as such a complete refactor is required and a major versio...
2019-11-22T03:19:43
cpp
Hard
nfrechette/acl
239
nfrechette__acl-239
[ "139" ]
4774c3a2dffe5b171a2259cd5680c948e7a4e1e4
diff --git a/tools/acl_compressor/main_android/AndroidManifest.xml b/tools/acl_compressor/main_android/AndroidManifest.xml --- a/tools/acl_compressor/main_android/AndroidManifest.xml +++ b/tools/acl_compressor/main_android/AndroidManifest.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:andr...
diff --git a/tests/main_android/AndroidManifest.xml b/tests/main_android/AndroidManifest.xml --- a/tests/main_android/AndroidManifest.xml +++ b/tests/main_android/AndroidManifest.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - pack...
Change android package names for tools Because they all have the same `com.acl` package name, when we deploy to a phone, they get constantly overwritten which is annoying.
2019-11-19T02:57:26
cpp
Hard
nfrechette/acl
453
nfrechette__acl-453
[ "360" ]
68aac1a9ddeb456c39bce64b70622c4597b21ff8
diff --git a/includes/acl/compression/compression_settings.h b/includes/acl/compression/compression_settings.h --- a/includes/acl/compression/compression_settings.h +++ b/includes/acl/compression/compression_settings.h @@ -131,6 +131,56 @@ namespace acl error_result is_valid() const; }; + ///////////////////////...
diff --git a/test_data/configs/uniformly_sampled_keyframe_stripping.config.sjson b/test_data/configs/uniformly_sampled_keyframe_stripping.config.sjson new file mode 100644 --- /dev/null +++ b/test_data/configs/uniformly_sampled_keyframe_stripping.config.sjson @@ -0,0 +1,15 @@ +version = 2 + +algorithm_name = "uniformly...
Allow frame stripping per clip Frame stripping is currently only implemented at the database level. But, we could also support it per clip very easily. We should expose a new flag in the compression settings to optionally drop whole key frames up to some percentage. We should always remove whole key frames that kee...
> We should always remove whole key frames that keep us below the current error threshold. If you're actively working on this part now, we're happy to wait for 2.1. Otherwise, I can take a stab at it. LMK. I haven't begun working towards 2.1 yet so go ahead! I will begin work on this shortly, stay tuned!
2023-03-18T02:27:21
cpp
Hard
nfrechette/acl
327
nfrechette__acl-327
[ "119" ]
597e0a7c7ef54ac4e871bf73d5f029393c56535f
diff --git a/includes/acl/compression/impl/animated_track_utils.h b/includes/acl/compression/impl/animated_track_utils.h --- a/includes/acl/compression/impl/animated_track_utils.h +++ b/includes/acl/compression/impl/animated_track_utils.h @@ -84,137 +84,45 @@ namespace acl get_num_sub_tracks(segment, animated_group...
diff --git a/tests/main_android/app/src/main/cpp/CMakeLists.txt b/tests/main_android/app/src/main/cpp/CMakeLists.txt --- a/tests/main_android/app/src/main/cpp/CMakeLists.txt +++ b/tests/main_android/app/src/main/cpp/CMakeLists.txt @@ -8,7 +8,7 @@ set(PROJECT_ROOT_DIR "${PROJECT_SOURCE_DIR}/../../../..") include_dire...
Add staged rotation decompression When decompressing, a number of things happen: * Data is unpacked * Rotations are converted to their final format (W reconstructed) * Interpolation between two samples (rotations are normalized here as well) * We write the data into the output buffer Being able to break do...
A good first pass has been made with very promising results. This is clearly the way forward but more work remains.
2021-02-09T22:13:12
cpp
Hard
nfrechette/acl
203
nfrechette__acl-203
[ "192" ]
b5992efd597fa7e527d61d16d24f777688463646
diff --git a/includes/acl/compression/stream/write_decompression_stats.h b/includes/acl/compression/stream/write_decompression_stats.h --- a/includes/acl/compression/stream/write_decompression_stats.h +++ b/includes/acl/compression/stream/write_decompression_stats.h @@ -130,7 +130,9 @@ namespace acl cache_flush...
diff --git a/tests/sources/math/test_vector4_impl.h b/tests/sources/math/test_vector4_impl.h --- a/tests/sources/math/test_vector4_impl.h +++ b/tests/sources/math/test_vector4_impl.h @@ -350,15 +350,20 @@ void test_vector4_impl(const Vector4Type& zero, const QuatType& identity, const REQUIRE(scalar_near_equal(vector_...
Look into ARM NEON fused multiply-add: vfmaq_f32 `vfmaq_f32(...)`
Decompression is about 2% faster on my Pixel 3.
2019-05-04T04:15:25
cpp
Hard
nfrechette/acl
408
nfrechette__acl-408
[ "396" ]
60041175b9f15996b22a4d1da25ea315aa5e5755
diff --git a/docs/README.md b/docs/README.md --- a/docs/README.md +++ b/docs/README.md @@ -12,6 +12,7 @@ ACL aims to support a few core algorithms that are well suited for production us * [Compressing tracks](compressing_raw_tracks.md) * [Decompressing tracks](decompressing_a_track_list.md) * [Handling looping pl...
diff --git a/tests/sources/core/test_interpolation_utils.cpp b/tests/sources/core/test_interpolation_utils.cpp --- a/tests/sources/core/test_interpolation_utils.cpp +++ b/tests/sources/core/test_interpolation_utils.cpp @@ -358,4 +358,18 @@ TEST_CASE("interpolation utils", "[core][utils]") CHECK(scalar_near_equal(find...
Add support for per sub-track sample rounding mode In certain circumstances, tracks need different rounding modes when sampling. For example, an IK target might move and we would like to not interpolate between certain samples or any of its samples. Another case might be a looping clip that has root motion where wrappi...
2022-04-14T02:58:32
cpp
Hard
cpputest/cpputest
1,785
cpputest__cpputest-1785
[ "1784" ]
49bae1944af67053f7560df3e99cbefc3e120b83
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -78,7 +78,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - run: brew install automake + - run: brew install automake libtool ...
diff --git a/tests/AllTests.vcproj b/tests/AllTests.vcproj --- a/tests/AllTests.vcproj +++ b/tests/AllTests.vcproj @@ -45,7 +45,7 @@ Name="VCCLCompilerTool" Optimization="0" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\include,..\include\Platforms\VisualCpp" + AdditionalIncludeDir...
Can't compile CppUTest with GCC when `-Werror=missing-include-dirs` is set Hi, it seems that CppUTest is not able to compile with GCC when `-Werror=missing-include-dirs` is set, as the directory `include/Platforms/Gcc` does not exist: ``` cc1plus.exe: error: C:/mydir/.build/gcc-x86_64-w64-mingw32/Release/_deps/cpput...
2024-04-23T03:03:32
cpp
Easy
cpputest/cpputest
1,620
cpputest__cpputest-1620
[ "1616" ]
9137c6f2d52c6a9a5f9fb6c83fda191ca63c879f
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -108,7 +108,6 @@ jobs: -B build -S . -D CMAKE_CXX_STANDARD=${{ matrix.cpp_version }} - -D WERROR=ON if: ${{ matrix.cpp_version ...
diff --git a/tests/CppUTest/CMakeLists.txt b/tests/CppUTest/CMakeLists.txt --- a/tests/CppUTest/CMakeLists.txt +++ b/tests/CppUTest/CMakeLists.txt @@ -56,6 +56,6 @@ add_executable(CppUTestTests ${CppUTestTests_src}) cpputest_normalize_test_output_location(CppUTestTests) target_link_libraries(CppUTestTests ${CppUTestL...
CMake options not "scoped" to CppUTest I'm trying to integrate CppUTest into my project using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake), but unfortunately the CMake [options specified in `CMakeLists.txt`](https://github.com/cpputest/cpputest/blob/v4.0/CMakeLists.txt#L60-L77) are not scoped to the CppUTest pro...
There are a bunch of CMake PRs open and will gradually be integrated. Did these also solve this? I don't have any PRs that address this yet. Fixing this would technically be a breaking change (for CMake users).
2022-08-20T04:01:50
cpp
Easy
cpputest/cpputest
1,502
cpputest__cpputest-1502
[ "1497" ]
2e177fa09f2f46f6bd936227433fc56a7b4292b7
diff --git a/include/CppUTest/CommandLineArguments.h b/include/CppUTest/CommandLineArguments.h --- a/include/CppUTest/CommandLineArguments.h +++ b/include/CppUTest/CommandLineArguments.h @@ -47,6 +47,7 @@ class CommandLineArguments bool isColor() const; bool isListingTestGroupNames() const; bool isListin...
diff --git a/tests/CppUTest/CommandLineTestRunnerTest.cpp b/tests/CppUTest/CommandLineTestRunnerTest.cpp --- a/tests/CppUTest/CommandLineTestRunnerTest.cpp +++ b/tests/CppUTest/CommandLineTestRunnerTest.cpp @@ -269,6 +269,16 @@ TEST(CommandLineTestRunner, listTestGroupAndCaseNamesShouldWorkProperly) STRCMP_CONTAIN...
Request: Option to display source file and line numbers for each test I am working with someone on a Visual Studio Code Extension for cpputest. One option it has is to be able to click on a test in the gui and it brings you to the source code for that test. It currently does this by running objdump on the binary. ...
It would be something that I would accept a pull request from. It should be trivial as this info is already stored. We also already have two other command line options (the -l ones) that list things without executing the code.
2021-11-05T13:37:57
cpp
Easy
cpputest/cpputest
1,842
cpputest__cpputest-1842
[ "1822" ]
ed6176f611f18c5d06fa01c562935a1a8d4c702d
diff --git a/CppUTest.vcproj b/CppUTest.vcproj --- a/CppUTest.vcproj +++ b/CppUTest.vcproj @@ -947,6 +947,10 @@ RelativePath=".\include\CppUTest\MemoryLeakDetector.h" > </File> + <File + RelativePath=".\include\CppUTest\MemoryLeakDetectorForceInclude.h" + > + </File> <File RelativePath=...
diff --git a/tests/AllTests.vcproj b/tests/AllTests.vcproj --- a/tests/AllTests.vcproj +++ b/tests/AllTests.vcproj @@ -136,7 +136,7 @@ WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="4" - ForcedIncludeFiles="CppUTest/MemoryLeakDetectorMallocMacros.h,CppUTest/MemoryLeakDetectorNew...
old Visual C++ builds are broken. #1808 broke the old Visual C++ builds in AppVeyor. I didn't notice when I opened the MR. Since it merged all pipelines are failing. I don't have a Windows machine or know Visual C++ well enough to understand why it broke or how to fix it. https://ci.appveyor.com/project/basvodde/...
2025-01-22T03:40:17
cpp
Easy
cpputest/cpputest
1,554
cpputest__cpputest-1554
[ "1545" ]
3ba61abc3ab033b02667a5799d4cb66e2fd72c07
diff --git a/cmake/Modules/CppUTestConfigurationOptions.cmake b/cmake/Modules/CppUTestConfigurationOptions.cmake --- a/cmake/Modules/CppUTestConfigurationOptions.cmake +++ b/cmake/Modules/CppUTestConfigurationOptions.cmake @@ -63,13 +63,13 @@ if (LONGLONG) set(CPPUTEST_USE_LONG_LONG 1) endif (LONGLONG) -if (HAS...
diff --git a/tests/CppUTest/UtestTest.cpp b/tests/CppUTest/UtestTest.cpp --- a/tests/CppUTest/UtestTest.cpp +++ b/tests/CppUTest/UtestTest.cpp @@ -60,21 +60,33 @@ static volatile double zero = 0.0; TEST(UtestShell, compareDoubles) { - double not_a_number = zero / zero; - double infinity = 1 / zero; CHECK...
Borland v5.4 throws a runtime error on division by zero: tests\CppUTest\UtestTest.cpp This is similar to #1544 The Borland v5.4 compiler does not have a NaN or Inf . if one wants the program to catch the division by zero error, and not crash, it has to contain an signal handler that catches the exception and deal w...
There are in fact only three of those CHECKs that have any chance of passing. ``` CHECK(doubles_equal(1.0, 1.001, 0.01)); CHECK(!doubles_equal(1.0, 1.1, 0.05)); double a = 1.2345678; CHECK(doubles_equal(a, a, 0.000000001)); ``` Perhaps split the test in NaN, infinity and others ? Then have a check...
2022-03-24T07:44:21
cpp
Easy
GothenburgBitFactory/timewarrior
566
GothenburgBitFactory__timewarrior-566
[ "205" ]
910acafbc0a2fc7d0c1f77b30831173f34871bd6
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,6 +14,8 @@ set (timew_SRCS AtomicFile.cpp AtomicFile.h DatetimeParser.cpp DatetimeParser.h Exclusion.cpp Exclusion.h Extensions.cpp Extensions.h + ...
diff --git a/test/summary.t b/test/summary.t --- a/test/summary.t +++ b/test/summary.t @@ -352,15 +352,14 @@ W\d{1,2} \d{4}-\d{2}-\d{2} .{3} ?0:00:00 0:00:00 0:00:00 0:00:00 [ ]+0:00:00 """) - def test_multibyte_char_annotation_truncated(self): - """Summary correctly truncates long annotation contai...
Wrap annotations in summary Please wrap the annotation into multiple colums, otherwise it doesn't make too much sense if you can't read it in the summary: ```  timew summary :annotations :id oas Wk Date Day ID Tags Annotation Start End Time Total W6 2019-02-07 Thu @1 +123, oas Wor...
While you are at it, it will also be useful to allow the summary report to be wider. This will be very useful if the report contains more or longer fields as shown above (numerous tags and annotations). Perhaps this relates to all timew output which might be premised on a standard screen width. A wider screen wi...
2023-10-29T10:36:37
cpp
Easy