instance_id
stringlengths
10
57
file_changes
listlengths
1
15
repo
stringlengths
7
53
base_commit
stringlengths
40
40
problem_statement
stringlengths
11
52.5k
patch
stringlengths
251
7.06M
asottile__setup-cfg-fmt-48
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "setup_cfg_fmt.py:format_file" ], "edited_modules": [ "setup_cfg_fmt.py:format_file" ] }, "file": "setup_cfg_fmt.py" } ]
asottile/setup-cfg-fmt
696ec3afe7956eb032dfbafa33efadb12ebb8079
normalize dashed-keys to underscored_keys setuptools apparently allows both, but canonically spells them with underscores found in https://github.com/pfmoore/editables/pull/2
diff --git a/setup_cfg_fmt.py b/setup_cfg_fmt.py index b1967b2..d541a70 100644 --- a/setup_cfg_fmt.py +++ b/setup_cfg_fmt.py @@ -398,11 +398,11 @@ def format_file( if section not in cfg: continue - new_section = { - k: cfg[section].pop(k) for k in key_order if k in cfg[section]...
asottile__setup-cfg-fmt-51
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "setup_cfg_fmt.py:_format_python_requires", "setup_cfg_fmt.py:_to_ver", "setup_cfg_fmt.py:_v", "setup_cfg_fmt.py:_parse_python_requires", "setup_cfg_fmt.py:_python_require...
asottile/setup-cfg-fmt
dff9e90e8ee5d1eb883efab50137a45be666cca2
python_requires>=3.6.1 should be detected as needing classifiers for 3.6+ currently I think `setup-cfg-fmt` ignores this?
diff --git a/setup.cfg b/setup.cfg index d93b1b6..a8c0cb8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,6 +16,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 [options] py_mo...
asottile__setup-cfg-fmt-52
[ { "changes": { "added_entities": [ "setup_cfg_fmt.py:_tox_envlist", "setup_cfg_fmt.py:_imp_classifiers" ], "added_modules": [ "setup_cfg_fmt.py:_tox_envlist", "setup_cfg_fmt.py:_imp_classifiers" ], "edited_entities": [ "setup_cfg_fmt.py:_pyth...
asottile/setup-cfg-fmt
f53fc7144d52d8214b8129b4dc145193d9c8a3b6
Add Implementation :: tags ``` Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy ``` can probably use `tox.ini` as a heuristic
diff --git a/setup_cfg_fmt.py b/setup_cfg_fmt.py index d12d92c..44d3cb3 100644 --- a/setup_cfg_fmt.py +++ b/setup_cfg_fmt.py @@ -4,7 +4,9 @@ import glob import io import os.path import re +import string from typing import Dict +from typing import Generator from typing import List from typing import Match from ty...
asottile__setup-cfg-fmt-54
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup_cfg_fmt.py" } ]
asottile/setup-cfg-fmt
289b5f4aead119c0ebadbbcb092573e63509c019
Wrongly formating "compatible release" clause ```diff diff --git a/setup.cfg b/setup.cfg index efc3a0f..662e52c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,15 +43,15 @@ console_scripts = [options.extras_require] doc = furo - sphinx~=3.0 - sphinx-autodoc-typehints~=1.10 - sphinxcontrib-autop...
diff --git a/setup_cfg_fmt.py b/setup_cfg_fmt.py index 44d3cb3..d9f84c8 100644 --- a/setup_cfg_fmt.py +++ b/setup_cfg_fmt.py @@ -236,7 +236,7 @@ def _normalize_req(req: str) -> str: return f'{normalized};{envs}' -BASE_NAME_REGEX = re.compile(r'[^!=><\s@]+') +BASE_NAME_REGEX = re.compile(r'[^!=><\s@~]+') REQ_R...
asottile__yesqa-23
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "yesqa.py:_rewrite_noqa_comm...
asottile/yesqa
a499839b7d41f54e5af455d7fbc9eb7fe3972942
flake8 3.7 allows `# noqa:C123` without a space make yesqa understand this too!
diff --git a/setup.py b/setup.py index a2b2475..944c90c 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], - install_requires=['flake8', 'tokenize-rt>=2.1'],...
asottile__yesqa-27
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "yesqa.py:_remove_comments" ], "edited_modules": [ "yesqa.py:_remove_comments" ] }, "file": "yesqa.py" } ]
asottile/yesqa
ad85b55968036d30088048335194733ecaf06c13
Skip # noqa check on typing I have a usecase that pep8 `max-line-length` is set to `79` and at the same time I have a type annotation that exceeds `79` characters. For example: ``` # type: () -> Optional[List[Tuple[str, str, None, None, None, None, None]]] ``` I tried to search for multiline annotatio...
diff --git a/yesqa.py b/yesqa.py index 5beb9c7..919b7f5 100644 --- a/yesqa.py +++ b/yesqa.py @@ -39,13 +39,11 @@ def _remove_comment(tokens, i): def _remove_comments(tokens): tokens = list(tokens) for i, token in tokenize_rt.reversed_enumerate(tokens): - if ( - token.name == 'COMMENT' a...
asottile__yesqa-4
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "yesqa.py:_rewrite_noqa_comment" ], "edited_modules": [ "yesqa.py:_rewrite_noqa_comment" ] }, "file": "yesqa.py" } ]
asottile/yesqa
52da14636029e7e8cc70c6a61912c14fa27ca50e
False positive: removes `noqa` on multi-line string ```python """ aaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb """ # noqa ``` ```console $ flake8 test.py $ yesqa test.py Rewriting test.py $ flake8 test.py test.py:2:80: E501 line too long (82 > 79 characters) ```
diff --git a/yesqa.py b/yesqa.py index 008dc57..40cf153 100644 --- a/yesqa.py +++ b/yesqa.py @@ -43,14 +43,28 @@ def _remove_comments(tokens): def _rewrite_noqa_comment(tokens, i, flake8_results): + # find logical lines that this noqa comment may affect + lines = set() + j = i + while j >= 0 and tokens...
asottile__yesqa-41
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "yesqa.py:_rewrite_noqa_comment" ], "edited_modules": [ "yesqa.py:_rewrite_noqa_comment" ] }, "file": "yesqa.py" } ]
asottile/yesqa
45017e8d68c03701e03e0cf5c4054dfd14c0014f
Can convert limited noqa's to generic noqa's If you have a line of code that has a flake8 error, but different from the one listed in a noqa comment, the tool will convert `# noqa: X000` to `# noqa:` which then masks the other error. Example: ``` if x==2: # noqa: E101 pass ``` becomes: ``` if x==2: # no...
diff --git a/yesqa.py b/yesqa.py index 478cbe3..431a8f8 100644 --- a/yesqa.py +++ b/yesqa.py @@ -72,18 +72,25 @@ def _rewrite_noqa_comment( match = NOQA_RE.search(token.src) assert match is not None + def _remove_noqa() -> None: + assert match is not None + if match.group() == token.src: + ...
asottile__yesqa-44
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "yesqa.py:_run_flake8" ], "edited_modules": [ "yesqa.py:_run_flake8" ] }, "file": "yesqa.py" } ]
asottile/yesqa
b13a51aa54142c59219c764e9f9362c049b439ed
yesqa fails with ValueError if show-source is enabled When the `flake8` option `show-source` is set to `True`, `yesqa` fails with `ValueError`. ``` Traceback (most recent call last): File ".../bin/yesqa", line 10, in <module> sys.exit(main()) File ".../lib/python3.7/site-packages/yesqa.py", line 158, in ...
diff --git a/yesqa.py b/yesqa.py index 431a8f8..860cb44 100644 --- a/yesqa.py +++ b/yesqa.py @@ -27,8 +27,13 @@ def _run_flake8(filename: str) -> Dict[int, Set[str]]: out, _ = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate() ret: Dict[int, Set[str]] = collections.defaultdict(set) for line in o...
asottile__yesqa-69
[ { "changes": { "added_entities": [ "yesqa.py:_mask_noqa_comment" ], "added_modules": [ "yesqa.py:_mask_noqa_comment" ], "edited_entities": [ "yesqa.py:_remove_comments" ], "edited_modules": [ "yesqa.py:_remove_comments" ] }, ...
asottile/yesqa
5d8ec12119e236f2f8ed61e29902ed5242ec6126
yesqa turns `# noqa: F821,E501` into `# noqa: F821`, but then flake8 reports it Here's an example: ```console $ cat t.py def foo(w: Sequence[int], x: Sequence[int], y: int, z: int) -> bar: ... # noqa: F821,E501 $ yesqa t.py Rewriting t.py $ cat t.py def foo(w: Sequence[int], x: Sequence[int], y: int, z: int)...
diff --git a/yesqa.py b/yesqa.py index 18ad40f..a0a49eb 100644 --- a/yesqa.py +++ b/yesqa.py @@ -7,6 +7,7 @@ import sys import tempfile from typing import Dict from typing import List +from typing import Match from typing import Optional from typing import Sequence from typing import Set @@ -49,12 +50,24 @@ def _...
asphalt-framework__asphalt-119
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/asphalt/core/_component.py:ContainerComponent.start" ], "edited_modules": [ "src/asphalt/core/_component.py:ContainerComponent" ] }, "file": "src/asphalt/core/_comp...
asphalt-framework/asphalt
248348d57b604f3fd2a14edb99616c47688bbd1a
More information with timeout Currently, when a component requests a resource that never comes, the application times out without any information as to which component failed to get the resource: ``` ERROR:asphalt.core.runner:Timeout waiting for the root component to start ``` I'm not sure if it's currently possibl...
diff --git a/docs/versionhistory.rst b/docs/versionhistory.rst index 3d5bdfd..1883fac 100644 --- a/docs/versionhistory.rst +++ b/docs/versionhistory.rst @@ -9,6 +9,8 @@ This library adheres to `Semantic Versioning 2.0 <https://semver.org/>`_. * Asphalt now runs via AnyIO, rather than asyncio, although the asyncio ...
asphalt-framework__asphalt-50
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/asphalt/core/cli.py:run" ], "edited_modules": [ "src/asphalt/core/cli.py:run" ] }, "file": "src/asphalt/core/cli.py" } ]
asphalt-framework/asphalt
39ff21a7aa0785f7cdb28eebabd011277080f108
Configuration through the command line Asphalt can currently be configured through YAML files, but it would be great to also support configuration through CLI arguments and options, that would take precedence over YAML files.
diff --git a/docs/userguide/deployment.rst b/docs/userguide/deployment.rst index 6736615..7f9fd45 100644 --- a/docs/userguide/deployment.rst +++ b/docs/userguide/deployment.rst @@ -17,17 +17,18 @@ Running the launcher is very straightfoward: .. code-block:: bash - asphalt run yourconfig.yaml [your-overrides.yml...
aspuru-guzik-group__selfies-116
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "selfies/utils/smiles_utils.py:_derive_smiles_from_fragment" ], "edited_modules": [ "selfies/utils/smiles_utils.py:_derive_smiles_from_fragment" ] }, "file": "selfies/ut...
aspuru-guzik-group/selfies
c5e2d7852a4da0035fb0ec410bb1051c85db5d36
Decoding failure for SELFIES string This string causes a `RecursionError` (maximum recursion depth exceeded) on the latest published SELFIES version: ``` [C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C][C...
diff --git a/selfies/utils/smiles_utils.py b/selfies/utils/smiles_utils.py index bd514c2..87b99bb 100644 --- a/selfies/utils/smiles_utils.py +++ b/selfies/utils/smiles_utils.py @@ -442,39 +442,49 @@ def _derive_smiles_from_fragment( root, ring_log, attribution_maps, attribution_index=0): - ...
aspuru-guzik-group__selfies-125
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "selfies/constants.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "selfies/mol_gra...
aspuru-guzik-group/selfies
b81a8e9407e1bf9a1539594c87d44fe711fc68be
Kekulization Failure When trying to run this line of code: `sf.encoder('Cc1ccc(NC(=O)c2ccc(-c3[c]n(Br)ccs[nH]3)c(C(F)(F)F)c2)cc1Nc1nccc(-c2cccnc2)n1')` I get this error even though RDKit smiles parser is able to produce a Mol object from the same smiles string EncoderError: kekulization failed SMILES: Cc1ccc...
diff --git a/selfies/constants.py b/selfies/constants.py index 597ff5e..0fcd597 100644 --- a/selfies/constants.py +++ b/selfies/constants.py @@ -21,6 +21,13 @@ AROMATIC_VALENCES = { "O": (2, 4), "S": (2, 4), "Se": (2, 4), "Te": (2, 4) } +VALENCE_ELECTRONS = { + "B": 3, "Al": 3, + "C": 4, "Si": 4, + "N"...
aspuru-guzik-group__selfies-78
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "selfies/utils/smiles_utils.py:_derive_mol_from_tokens", "selfies/utils/smiles_utils.py:_attach_atom" ], "edited_modules": [ "selfies/utils/smiles_utils.py:_derive_mol_from_to...
aspuru-guzik-group/selfies
cea9f28851e72857eea71c41cf9e2124949338c5
Feature request: Retrieve mapping betwewen SMILES and SELFIES tokens Is it possible to get a map which SMILES tokens were used to generate which SELFIES tokens (or v.v.)? I am looking for a feature like this: ```py >>>smiles = 'CCO' >>>encoder(smiles, get_mapping=True) ([C][C][O], [0,1,2]) ``` In this simple ...
diff --git a/selfies/utils/smiles_utils.py b/selfies/utils/smiles_utils.py index a93bfeb..c3d6aed 100644 --- a/selfies/utils/smiles_utils.py +++ b/selfies/utils/smiles_utils.py @@ -227,7 +227,6 @@ def _derive_mol_from_tokens(mol, smiles, tokens, i): prev_stack.append(tok) while tokens: tok = tokens.p...
assertpy__assertpy-117
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "assertpy/base.py:BaseMixin.is_equal_to", "assertpy/base.py:BaseMixin.is_not_equal_to", "assertpy/base.py:BaseMixin.is_same_as", "assertpy/base.py:BaseMixin.is_not_same_as", ...
assertpy/assertpy
1249d667b4749d088448ba21a1c927378daa5d41
ContainsMixin - missing return of an AssertionBuilder instance if verification fails. I've found that some methods in `ContainsMixin` (` is_in`, `contains_sequence`,` contains_duplicates`, `does_not_contain_duplicates`) doesn't return the instance of the AssertionBuilder chain if the verification fail. There is an '...
diff --git a/README.md b/README.md index a180a80..5c1b782 100644 --- a/README.md +++ b/README.md @@ -941,7 +941,7 @@ from assertpy import add_extension def is_5(self): if self.val != 5: - self.error(f'{self.val} is NOT 5!') + return self.error(f'{self.val} is NOT 5!') return self add_exten...
astamminger__zotero-bibtize-19
[ { "changes": { "added_entities": [ "zotero_bibtize/zotero_bibtize.py:BibEntry._is_balanced" ], "added_modules": null, "edited_entities": [ "zotero_bibtize/zotero_bibtize.py:BibEntry.bibtex_entry_contents" ], "edited_modules": [ "zotero_bibtize/zotero_b...
astamminger/zotero-bibtize
8433104b8ad5b61726996951e342e3cc354fd427
Assumed BibTex termination sequence for entry fields is incomplete Currently every entry field of a BibTex entry is assumed to be terminated by the sequence `,\n` and the entries are split accordingly. This leads to issues, especially for abstract fields which likely may contain this sequence, leading to a erroneous sp...
diff --git a/zotero_bibtize/zotero_bibtize.py b/zotero_bibtize/zotero_bibtize.py index 2acf9e5..7c98628 100644 --- a/zotero_bibtize/zotero_bibtize.py +++ b/zotero_bibtize/zotero_bibtize.py @@ -57,11 +57,24 @@ class BibEntry(object): unescaped = self.unescape_bibtex_entry_string(raw_entry_string) unesc...
astanin__python-tabulate-139
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tabulate.py:_normalize_tabular_data" ], "edited_modules": [ "tabulate.py:_normalize_tabular_data" ] }, "file": "tabulate.py" } ]
astanin/python-tabulate
b2c26bcb70e497f674b38aa7e29de12c0123708a
tabulate prints "f i r s t r o w" as headers for empty data I have a use case where i get data about errors received. In that, I keep the headers in the data itself, and use the `firstrow` feature to print. But there are times when there is no error, so the entire data is empty (even the headers are not added). In that...
diff --git a/tabulate.py b/tabulate.py index 0579fb3..0a23f3c 100644 --- a/tabulate.py +++ b/tabulate.py @@ -1189,6 +1189,8 @@ def _normalize_tabular_data(tabular_data, headers, showindex="default"): headers = rows[0] headers = list(map(_text_type, headers)) # headers should be strings r...
astanin__python-tabulate-151
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "tabulate.py" } ]
astanin/python-tabulate
792bfdd1557d99fda5bc99453ccb3b96889083a1
Proposed new tablefmt "fancy" THANK YOU for an awesome library. I'm proposing a PR I'd like to write for you: I like the existing tablefmt="fancy_grid". But the horizontal lines between each table row take up a lot of vertical space. How would you feel if I were to submit a PR adding a new table format, like "fancy_...
diff --git a/README.md b/README.md index 7378a76..37fbdbe 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,15 @@ Supported table formats are: - "simple" - "github" - "grid" +- "simple\_grid" +- "rounded\_grid" +- "double\_grid" - "fancy\_grid" +- "outline" +- "simple\_outline" +- "rounded\_...
astanin__python-tabulate-152
[ { "changes": { "added_entities": [ "tabulate.py:_isnumber_with_thousands_separator" ], "added_modules": [ "tabulate.py:_isnumber_with_thousands_separator" ], "edited_entities": [ "tabulate.py:_afterpoint" ], "edited_modules": [ "tabulate....
astanin/python-tabulate
b2c26bcb70e497f674b38aa7e29de12c0123708a
Float with comma formatting are mis-aligned When using commas in `floatfmt`, like `,.2f`, alignment is off: ``` In [32]: print(tabulate([("a", 3456.321), ("b", 982.6513)], floatfmt=".2f")) - ------- a 3456.32 b 982.65 - ------- In [33]: print(tabulate([("a", 3456.321), ("b", 982.6513)], floatfmt=",.2f")) ...
diff --git a/tabulate.py b/tabulate.py index 0579fb3..4afcd0d 100644 --- a/tabulate.py +++ b/tabulate.py @@ -572,6 +572,10 @@ _invisible_codes_link = re.compile( _ansi_color_reset_code = "\033[0m" +_float_with_thousands_separators = re.compile( + r"^(([+-]?[0-9]{1,3})(?:,([0-9]{3}))*)?(?(1)\.[0-9]*|\.[0-9]+)?$"...
astanin__python-tabulate-21
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tabulate.py:tabulate" ], "edited_modules": [ "tabulate.py:tabulate" ] }, "file": "tabulate.py" } ]
astanin/python-tabulate
e7daa576ff444f95c560b18ef0bb22b3b1b67b57
Custom TableFormat gives: TypeError: unhashable type: 'list' Cloned tabulate from master (433dfc69f2abba1c463763d33e1fb3bcdd3afe37) and tried to use custom TableFormat: Script: ``` from tabulate import tabulate, TableFormat, Line, DataRow tablefmt = TableFormat( lineabove = Line("", "-", " ",...
diff --git a/tabulate.py b/tabulate.py index 92164fb..99b6118 100755 --- a/tabulate.py +++ b/tabulate.py @@ -1423,7 +1423,11 @@ def tabulate( has_invisible = re.search(_invisible_codes, plain_text) enable_widechars = wcwidth is not None and WIDE_CHARS_MODE - if tablefmt in multiline_formats and _is_multi...
astanin__python-tabulate-221
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tabulate/__init__.py:_normalize_tabular_data", "tabulate/__init__.py:tabulate", "tabulate/__init__.py:_format_table" ], "edited_modules": [ "tabulate/__init__.py:_nor...
astanin/python-tabulate
83fd4fb98926c8a6fdf45caa1b91ee8913b64dcb
Feature Request: Enable alignment for header Existing code supports numalign and stralign for aligning numbers and strings. It would be helpful if the header is allowed to have a alignment. Example: ``` +---------------------+-------------+ | message id | occur | +---------------------+-----------...
diff --git a/README.md b/README.md index d64b99a..07ab28c 100644 --- a/README.md +++ b/README.md @@ -666,18 +666,31 @@ Ver2 19.2 ### Custom column alignment -`tabulate` allows a custom column alignment to override the above. The -`colalign` argument can be a list or a tuple of `stralign` named -arguments. Possibl...
astanin__python-tabulate-243
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tabulate/__init__.py:_type", "tabulate/__init__.py:_format" ], "edited_modules": [ "tabulate/__init__.py:_type", "tabulate/__init__.py:_format" ] }, "fi...
astanin/python-tabulate
cecb08e9a34d7179a8e952d8d44555637aabe8d0
Ignore empty strings when deducing column types An empty cell (not a cell containing None, but containing `""` or `b""`) forces the column type to be `str`, even if the rest of the cells contain eg. numeric data. A cell containing None is ignored for type deduction; and, is later replaced by the `missingval` value (su...
diff --git a/tabulate/__init__.py b/tabulate/__init__.py index c349a79..8642c8d 100644 --- a/tabulate/__init__.py +++ b/tabulate/__init__.py @@ -933,8 +933,13 @@ def _isbool(string): def _type(string, has_invisible=True, numparse=True): """The least generic type (type(None), int, float, str, unicode). + Trea...
astanin__python-tabulate-76
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "tabulate.py" } ]
astanin/python-tabulate
2552e6dfb23cac990aeabb27b86745878d62247e
Support hyperlinks encoded as terminal escape sequences Some terminals support [clickable text](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) via escape sequences. If we use the escape sequence ```python >>> import tabulate >>> >>> def encode_url(text: str, target:str): ... return f"\u0...
diff --git a/tabulate.py b/tabulate.py index 5d57167..cbeb766 100755 --- a/tabulate.py +++ b/tabulate.py @@ -535,10 +535,10 @@ multiline_formats = { _multiline_codes = re.compile(r"\r|\n|\r\n") _multiline_codes_bytes = re.compile(b"\r|\n|\r\n") _invisible_codes = re.compile( - r"\x1b\[\d+[;\d]*m|\x1b\[\d*\;\d*\;\...
astanin__python-tabulate-79
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tabulate.py:_align_column_choose_padfn", "tabulate.py:_align_column", "tabulate.py:tabulate" ], "edited_modules": [ "tabulate.py:_align_column_choose_padfn", ...
astanin/python-tabulate
62203dea1a5cdea16d70099b94a56d9007cc81e8
PRESERVE_WHITESPACE should be made an argument It's currently a module-level global variable. This is assuming that all users of tabulate uses the same PRESERVE_WHITESPACE setting. This will not work well if different use of tabulate needs different settings. Having an argument for this setting would be more general...
diff --git a/tabulate.py b/tabulate.py index 55b896e..541cf29 100644 --- a/tabulate.py +++ b/tabulate.py @@ -68,9 +68,6 @@ __version__ = "0.8.10" # minimum extra space in headers MIN_PADDING = 2 -# Whether or not to preserve leading/trailing whitespace in data. -PRESERVE_WHITESPACE = False - _DEFAULT_FLOATFMT = "g...
astanin__python-tabulate-96
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tabulate.py:_normalize_tabular_data" ], "edited_modules": [ "tabulate.py:_normalize_tabular_data" ] }, "file": "tabulate.py" } ]
astanin/python-tabulate
2552e6dfb23cac990aeabb27b86745878d62247e
Shift headers wrongly when do tabulate(headers="keys", showindex=False) with pandas.DataFrame with named index ```python import pandas as pd from tabulate import tabulate df = pd.DataFrame({"a": [0,1,2]}, index=pd.Index([1,2,3], name="b")) print(tabulate(df, headers="keys", showindex=False)) ``` Expected result...
diff --git a/tabulate.py b/tabulate.py index 5d57167..d611dc1 100755 --- a/tabulate.py +++ b/tabulate.py @@ -1022,7 +1022,7 @@ def _normalize_tabular_data(tabular_data, headers, showindex="default"): elif hasattr(tabular_data, "index"): # values is a property, has .index => it's likely a pandas.Da...
astarte-platform__astarte-device-sdk-python-198
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/crypto.py:device_has_certificate", "astarte/device/crypto.py:certificate_is_valid" ], "edited_modules": [ "astarte/device/crypto.py:device_has_certificate", ...
astarte-platform/astarte-device-sdk-python
a70bcc69a9d710ce0846f980a1b4653a4a6ce4c5
When changing credentials old cache prevents connection The old persistency of a device might prevent device connection when the credential secret has been changed. To replicate: - Connect a device to MQTT using a credential secret. - Disconnect and destroy the device. - While disconnected, wipe the device creden...
diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9c7fb..76b857f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added Support for `astarte-message-hub` version `0.6.1`. +### Fixed +- Client certificates are now valida...
astarte-platform__astarte-device-sdk-python-22
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/interface.py:Interface.__init__" ], "edited_modules": [ "astarte/device/interface.py:Interface" ] }, "file": "astarte/device/interface.py" } ]
astarte-platform/astarte-device-sdk-python
905f8d1fff8c9ea1dbe010d5c9c1285dfb5cac25
Avoid adding an interface with major and minor version number both at zero - Add check to astarte_device_add_interface
diff --git a/astarte/device/interface.py b/astarte/device/interface.py index 94bac25..e15716a 100644 --- a/astarte/device/interface.py +++ b/astarte/device/interface.py @@ -60,10 +60,19 @@ class Interface: interface_definition: dict An Astarte Interface definition in the form of a Python dictionar...
astarte-platform__astarte-device-sdk-python-36
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/device.py:Device.__is_interface_type_properties" ], "edited_modules": [ "astarte/device/device.py:Device" ] }, "file": "astarte/device/device.py" }, ...
astarte-platform/astarte-device-sdk-python
48275c207ea4c6f3d09cdb590e2714c345ea6b10
Broken unset property function The `__is_interface_type_properties` function still uses the previous Device class structure. Update it to be like the `__is_interface_aggregate` function
diff --git a/astarte/device/device.py b/astarte/device/device.py index 4008462..7a29995 100644 --- a/astarte/device/device.py +++ b/astarte/device/device.py @@ -354,17 +354,12 @@ class Device: return interface.is_aggregation_object() def __is_interface_type_properties(self, interface_name): - if ...
astarte-platform__astarte-device-sdk-python-82
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/crypto.py:generate_csr", "astarte/device/crypto.py:import_device_certificate", "astarte/device/crypto.py:certificate_is_valid" ], "edited_modules": [ "...
astarte-platform/astarte-device-sdk-python
d339fb07260d5d674fd3206f37f23206e17b2820
backends arguments can be removed for cryptography As stated in the documentation of the `cryptography` module, backend arguments are optional. They could be removed. https://cryptography.io/en/35.0.0/hazmat/backends/
diff --git a/astarte/device/crypto.py b/astarte/device/crypto.py index 5a8df4a..d12c3db 100644 --- a/astarte/device/crypto.py +++ b/astarte/device/crypto.py @@ -20,7 +20,6 @@ from datetime import datetime from os import path from cryptography import x509 -from cryptography.hazmat.backends import default_backend fr...
astarte-platform__astarte-device-sdk-python-87
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/device.py:Device.__init__", "astarte/device/device.py:Device.__setup_crypto", "astarte/device/device.py:Device.connect", "astarte/device/device.py:Device.send", ...
astarte-platform/astarte-device-sdk-python
b07a458e3a4de40b57f02fbac71a4ba5cd683320
`get_interface` called too many times The function `get_interface` gets called too many times in some methods of the `Device` class. One example is the `send` method which calls it three times with the same parameter returning the same interface object. This can be seen in its unit tests. https://github.com/astarte...
diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 198d903..3fb2ea7 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -31,13 +31,13 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install -e .[static] -...
astarte-platform__astarte-device-sdk-python-91
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/interface.py:Interface.__init__", "astarte/device/interface.py:Interface.is_server_owned" ], "edited_modules": [ "astarte/device/interface.py:Interface" ...
astarte-platform/astarte-device-sdk-python
13632828382142c241b8d419223b4bcc97889d12
Mapping class is missing checks over initialization Initializing a `Mapping` class from a dictionary containing incorrect formatting is now very easy. For example, the `explicit_timestamp` entry is accepted also for properties. A check on correctness over the passed dictionary should be implemented returning/raising...
diff --git a/astarte/device/interface.py b/astarte/device/interface.py index 35737e2..c2c54b1 100644 --- a/astarte/device/interface.py +++ b/astarte/device/interface.py @@ -74,27 +74,46 @@ class Interface: ValueError if both version_major and version_minor numbers are set to 0 """ - ...
astarte-platform__astarte-device-sdk-python-92
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/device.py:Device.__on_message" ], "edited_modules": [ "astarte/device/device.py:Device" ] }, "file": "astarte/device/device.py" }, { "changes": {...
astarte-platform/astarte-device-sdk-python
f9977f4d19e78cd41aaf0d7d43a088ec9034b178
Unsetting of all properties is allowed There seems to be no check on which property is unsettable (which endpoint has the option `allow_unset` set to true). Furthermore, the `allow_unset` option is not stored in the mapping object.
diff --git a/astarte/device/device.py b/astarte/device/device.py index 6704fdf..5dce033 100644 --- a/astarte/device/device.py +++ b/astarte/device/device.py @@ -641,20 +641,28 @@ class Device: # pylint: disable=too-many-instance-attributes ------- """ + # Check correct base topic if...
astarte-platform__astarte-device-sdk-python-98
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astarte/device/device.py:Device.__send_generic" ], "edited_modules": [ "astarte/device/device.py:Device" ] }, "file": "astarte/device/device.py" } ]
astarte-platform/astarte-device-sdk-python
eafef00aab916233f575042231c6ade3cc6720d6
Sending empty payloads unsets properties Sending an empty payload through the `send` function for interfaces of type property sends an unset command. The bug originates here: https://github.com/astarte-platform/astarte-device-sdk-python/blob/60a3f88e7ca5089aedc91e29f87a2cc463929a10/astarte/device/device.py#L500-L504 ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d9f3a..5aae20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Vers...
astropenguin__azely-55
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "azely/azel.py:compute", "azely/azel.py:_compute" ], "edited_modules": [ "azely/azel.py:compute", "azely/azel.py:_compute" ] }, "file": "azely/azel.py" ...
astropenguin/azely
c241e47b94b70c253f303866211687023dcb3cd2
Update object module
diff --git a/azely/azel.py b/azely/azel.py index ee3dc58..2331be2 100644 --- a/azely/azel.py +++ b/azely/azel.py @@ -1,49 +1,3 @@ -"""Azely's azel module (high-level API). - -This module mainly provides ``compute`` function as a high-level API for users -which computes azimuth/elevation of an astronomical object under ...
astropenguin__morecopy-24
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "morecopy/__init__.py" } ]
astropenguin/morecopy
b3996c81ade68e1b90b697201017b140f2927fd7
Release v0.2.3
diff --git a/morecopy/__init__.py b/morecopy/__init__.py index 0733491..751ba1d 100644 --- a/morecopy/__init__.py +++ b/morecopy/__init__.py @@ -1,5 +1,5 @@ # type: ignore -__version__ = "0.2.2" +__version__ = "0.2.3" # submodules diff --git a/pyproject.toml b/pyproject.toml index 42e1457..fedb88d 100644 --- a/py...
astropenguin__morecopy-29
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "morecopy/__init__.py" } ]
astropenguin/morecopy
7832e20187844b82c4a15793e2e60c4fbf9c07cf
Release v0.2.4
diff --git a/morecopy/__init__.py b/morecopy/__init__.py index 751ba1d..052ddf4 100644 --- a/morecopy/__init__.py +++ b/morecopy/__init__.py @@ -1,5 +1,5 @@ # type: ignore -__version__ = "0.2.3" +__version__ = "0.2.4" # submodules diff --git a/pyproject.toml b/pyproject.toml index fedb88d..80788a7 100644 --- a/py...
astropenguin__morecopy-38
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "morecopy/__init__.py" } ]
astropenguin/morecopy
2f7815a1a9a9baaae4afb46b8c39cfe66c23e421
Release v0.4.0
diff --git a/CITATION.cff b/CITATION.cff index 1f994d2..9904ffe 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,8 +3,8 @@ message: "If you use this software, please cite it as below." title: "morecopy" abstract: "Copy even immutable objects as much as possible" -version: 0.3.0 -date-released: 2023-07-15 +version...
astropenguin__pandas-dataclasses-104
[ { "changes": { "added_entities": [ "pandas_dataclasses/core/mixins.py:get_creator", "pandas_dataclasses/core/mixins.py:get_return" ], "added_modules": [ "pandas_dataclasses/core/mixins.py:get_creator", "pandas_dataclasses/core/mixins.py:get_return" ], ...
astropenguin/pandas-dataclasses
487293b39d1f8d74f158842fceac2b4cdb416a96
Fix runtime pandas data creator
diff --git a/pandas_dataclasses/core/mixins.py b/pandas_dataclasses/core/mixins.py index 0e21fe2..74b32f7 100644 --- a/pandas_dataclasses/core/mixins.py +++ b/pandas_dataclasses/core/mixins.py @@ -3,9 +3,9 @@ __all__ = ["As", "AsDataFrame", "AsSeries"] # standard library from copy import copy -from functools import...
astropenguin__pandas-dataclasses-109
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edi...
astropenguin/pandas-dataclasses
5a2e8c3dad5615eb18c8928d9155a4cbafc5bace
Update asdata module - [x] Rename `core.asdata` module to `core.aspandas` (because the former is ambiguous) - [x] Rename `*dataframe*` to `*frame*` in functions and type hints - [x] Add aliases for the backward compatibility
diff --git a/README.md b/README.md index 61461ac..f9bf148 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ pandas-dataclass makes it easy to create [pandas] data (DataFrame and Series) by ```python from dataclasses import dataclass -from pandas_dataclasses import AsDataFrame, Data, Index +from pandas_data...
astropenguin__pandas-dataclasses-120
[ { "changes": { "added_entities": [ "pandas_dataclasses/core/typing.py:is_union_type" ], "added_modules": [ "pandas_dataclasses/core/typing.py:is_union_type" ], "edited_entities": [ "pandas_dataclasses/core/typing.py:get_dtype" ], "edited_modules"...
astropenguin/pandas-dataclasses
018349844877e1984a527ce664bf11a2f2285413
Support for union type in type hints Update typing module to allow users to use union type in `Data` and `Index`: ```python @dataclass class Weather(AsFrame): """Weather information.""" year: Index[int] month: Index[int] temp: Data[float | None] wind: Data[float | None] ``` See also #115...
diff --git a/pandas_dataclasses/core/typing.py b/pandas_dataclasses/core/typing.py index a97a6a0..161ce48 100644 --- a/pandas_dataclasses/core/typing.py +++ b/pandas_dataclasses/core/typing.py @@ -2,6 +2,7 @@ __all__ = ["Attr", "Column", "Data", "Index", "Other"] # standard library +import types from dataclasses ...
astropenguin__pandas-dataclasses-122
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/core/specs.py:Spec.from_dataclass", "pandas_dataclasses/core/specs.py:convert_field" ], "edited_modules": [ "pandas_dataclasses/core/specs.py:Field", ...
astropenguin/pandas-dataclasses
a1fc6cee161dbb71942b963a53c8e5bebf197272
Update specifications for pandas data creation (Fields, Spec)
diff --git a/pandas_dataclasses/core/specs.py b/pandas_dataclasses/core/specs.py index 87f9276..46fa65e 100644 --- a/pandas_dataclasses/core/specs.py +++ b/pandas_dataclasses/core/specs.py @@ -2,17 +2,20 @@ __all__ = ["Spec"] # standard library -from dataclasses import dataclass, replace -from dataclasses import F...
astropenguin__pandas-dataclasses-139
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/core/specs.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "e...
astropenguin/pandas-dataclasses
d1ff5cd357abeafcaa77179610170d24d35abe93
Drop support for Python 3.7
diff --git a/pandas_dataclasses/core/specs.py b/pandas_dataclasses/core/specs.py index 46fa65e..398047a 100644 --- a/pandas_dataclasses/core/specs.py +++ b/pandas_dataclasses/core/specs.py @@ -11,11 +11,11 @@ from dataclasses import ( replace, ) from functools import lru_cache -from typing import Any, Callable, ...
astropenguin__pandas-dataclasses-151
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/__init__.py" }, { "changes": { "added_entities": [ "pandas_dataclasses/core/specs.py:Fields.filter", "pandas_...
astropenguin/pandas-dataclasses
909eb1c63cdb7ad59fc26cda2a06a41f37619f1d
Update the tagging method for type hints
diff --git a/pandas_dataclasses/__init__.py b/pandas_dataclasses/__init__.py index 925a8c1..590fca2 100644 --- a/pandas_dataclasses/__init__.py +++ b/pandas_dataclasses/__init__.py @@ -7,8 +7,8 @@ __all__ = [ "Column", "Data", "Index", - "Other", "Spec", + "Tag", "asdataframe", "asfr...
astropenguin__pandas-dataclasses-152
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "panda...
astropenguin/pandas-dataclasses
04bcdf568f873f831efb50636fc1614585dc74be
Support for multiple items received in a single field This issue will introduce a new type hint, `Multiple[T]`, an alias of `dict[str, T]` with a dedicated tag, `Tag.MULTIPLE`. Combined with other type hints (e.g. `Multiple[Data[Any]]`), it will enable the corresponding field receive a dictionary of data, indexes, or a...
diff --git a/pandas_dataclasses/__init__.py b/pandas_dataclasses/__init__.py index 590fca2..a5d2e9d 100644 --- a/pandas_dataclasses/__init__.py +++ b/pandas_dataclasses/__init__.py @@ -7,6 +7,7 @@ __all__ = [ "Column", "Data", "Index", + "Multiple", "Spec", "Tag", "asdataframe", diff --...
astropenguin__pandas-dataclasses-158
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/__init__.py" }, { "changes": { "added_entities": [ "pandas_dataclasses/core/api.py:items", "pandas_dataclasse...
astropenguin/pandas-dataclasses
f9f8a6f4e0101194557004fd3bfa408a90939c43
Update specs module
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e1ac8b2..19e247c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,22 +5,26 @@ "dockerfile": "Dockerfile" }, "postCreateCommand": "poetry install", - "extensions": [ - ...
astropenguin__pandas-dataclasses-161
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/core/api.py:asframe", "pandas_dataclasses/core/api.py:asseries", "pandas_dataclasses/core/api.py:get_columns", "pandas_dataclasses/core/api.py:get_index", ...
astropenguin/pandas-dataclasses
409534cddf7fbaf8b7f8d4674f1a4d04196a28bd
Fix function for deriving columns
diff --git a/pandas_dataclasses/core/api.py b/pandas_dataclasses/core/api.py index 33753cf..265b988 100644 --- a/pandas_dataclasses/core/api.py +++ b/pandas_dataclasses/core/api.py @@ -11,7 +11,7 @@ import numpy as np import pandas as pd from pandas.api.types import is_list_like from typing_extensions import get_ori...
astropenguin__pandas-dataclasses-23
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edi...
astropenguin/pandas-dataclasses
43eb642b575ee027d556622d3e661bad89653dfa
Rename dataspec module - [x] Rename module (`dataspec` → `specs`) - [x] Rename test script (`test_dataspec.py` → `test_specs.py`)
diff --git a/pandas_dataclasses/__init__.py b/pandas_dataclasses/__init__.py index 7a5a5be..f6b4111 100644 --- a/pandas_dataclasses/__init__.py +++ b/pandas_dataclasses/__init__.py @@ -4,12 +4,12 @@ __version__ = "0.1.0" # submodules -from . import dataspec from . import series +from . import specs from . import...
astropenguin__pandas-dataclasses-29
[ { "changes": { "added_entities": [ "pandas_dataclasses/typing.py:get_collection" ], "added_modules": [ "pandas_dataclasses/typing.py:Collection", "pandas_dataclasses/typing.py:get_collection" ], "edited_entities": [ "pandas_dataclasses/typing.py:get_...
astropenguin/pandas-dataclasses
a3fe3d75a59cabf25d7e456804251b313cc94737
Update typing module - [x] Support union in data and index fields - [x] Support [pandas extended data types](https://pandas.pydata.org/docs/reference/arrays.html)
diff --git a/pandas_dataclasses/typing.py b/pandas_dataclasses/typing.py index 89f913e..0741001 100644 --- a/pandas_dataclasses/typing.py +++ b/pandas_dataclasses/typing.py @@ -4,11 +4,23 @@ __all__ = ["Attr", "Data", "Index", "Name", "Other"] # standard library from dataclasses import Field from enum import Enum -f...
astropenguin__pandas-dataclasses-39
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/specs.py:get_fieldspec" ], "edited_modules": [ "pandas_dataclasses/specs.py:get_fieldspec" ] }, "file": "pandas_dataclasses/specs.py" }, { "c...
astropenguin/pandas-dataclasses
5d2fca7857149e98cd50529f11fc385af42e5754
Fix support for union type in dataclass fields
diff --git a/pandas_dataclasses/specs.py b/pandas_dataclasses/specs.py index 7b81e76..d9e5830 100644 --- a/pandas_dataclasses/specs.py +++ b/pandas_dataclasses/specs.py @@ -17,7 +17,7 @@ from .typing import ( AnyField, DataClass, FType, - deannotate, + get_annotated, get_dtype, get_ftype,...
astropenguin__pandas-dataclasses-47
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/core.py:get_data", "pandas_dataclasses/core.py:get_index" ], "edited_modules": [ "pandas_dataclasses/core.py:get_data", "pandas_dataclasses/core.py...
astropenguin/pandas-dataclasses
7470f78e464553c4d881d1ac45f0ebc95a61b901
Update specs module
diff --git a/pandas_dataclasses/core.py b/pandas_dataclasses/core.py index 27dc5c5..fb91019 100644 --- a/pandas_dataclasses/core.py +++ b/pandas_dataclasses/core.py @@ -52,7 +52,7 @@ def get_data(obj: DataClass) -> Optional[AnyDict]: for key, spec in dataspec.specs.of_data.items(): dataset[spec.name] = as...
astropenguin__pandas-dataclasses-54
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "pandas_dataclasses/specs.py:ArraySpec", "pandas_dataclasses/specs.py:ScalarSpec" ] }, "file": "pandas_dataclasses/specs.py" }, { "changes": { ...
astropenguin/pandas-dataclasses
f7069cc25b2822e85b214c4fd88276e8f5586ad0
Update specification of name
diff --git a/pandas_dataclasses/specs.py b/pandas_dataclasses/specs.py index 7e35111..4c52020 100644 --- a/pandas_dataclasses/specs.py +++ b/pandas_dataclasses/specs.py @@ -4,7 +4,7 @@ __all__ = ["DataSpec"] # standard library from dataclasses import dataclass, field, fields from functools import lru_cache -from typ...
astropenguin__pandas-dataclasses-71
[ { "changes": { "added_entities": [ "pandas_dataclasses/core/parsers.py:ensure" ], "added_modules": [ "pandas_dataclasses/core/parsers.py:ensure" ], "edited_entities": [ "pandas_dataclasses/core/parsers.py:asdataframe", "pandas_dataclasses/core/parser...
astropenguin/pandas-dataclasses
20dc7d5eb4ae2cbcb2c8853891447b469862f9be
Update parsers module
diff --git a/pandas_dataclasses/core/parsers.py b/pandas_dataclasses/core/parsers.py index 1ba26ec..4b3ebe8 100644 --- a/pandas_dataclasses/core/parsers.py +++ b/pandas_dataclasses/core/parsers.py @@ -2,7 +2,7 @@ __all__ = ["asdataframe", "asseries"] # standard library -from typing import Any, Dict, Hashable, Iter...
astropenguin__pandas-dataclasses-76
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/core/parsers.py:ensure" ], "edited_modules": [ "pandas_dataclasses/core/parsers.py:ensure" ] }, "file": "pandas_dataclasses/core/parsers.py" }, {...
astropenguin/pandas-dataclasses
bb6efe533ecedd6087da6a4736c544278b4d3314
Add support for extension array and dtype
diff --git a/README.md b/README.md index 90e72d2..f4cc3c3 100644 --- a/README.md +++ b/README.md @@ -408,9 +408,9 @@ where `obj` is a dataclass object that is expected to have `obj.name`. Release version | Features --- | --- -v0.4.0 | Support for hierarchical column -v0.5.0 | Support for dynamic naming -v1.0.0 | In...
astropenguin__pandas-dataclasses-84
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/core/parsers.py:asdataframe", "pandas_dataclasses/core/parsers.py:get_attrs", "pandas_dataclasses/core/parsers.py:get_columns", "pandas_dataclasses/core/parser...
astropenguin/pandas-dataclasses
6466becc8588648c7072371ab33bce0d7777a2b9
Add type hint for column fields
diff --git a/pandas_dataclasses/core/parsers.py b/pandas_dataclasses/core/parsers.py index b377449..9afa87a 100644 --- a/pandas_dataclasses/core/parsers.py +++ b/pandas_dataclasses/core/parsers.py @@ -42,7 +42,7 @@ def asdataframe(obj: Any, *, factory: Any = None) -> Any: attrs = get_attrs(spec) data = get_da...
astropenguin__pandas-dataclasses-90
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandas_dataclasses/core/asdata.py:asdataframe", "pandas_dataclasses/core/asdata.py:get_columns" ], "edited_modules": [ "pandas_dataclasses/core/asdata.py:asdataframe", ...
astropenguin/pandas-dataclasses
7179c6ccef3943a42b20fac686c75397ed91ebea
Fix wrong returns of get_columns
diff --git a/pandas_dataclasses/core/asdata.py b/pandas_dataclasses/core/asdata.py index 1b31a11..57a0226 100644 --- a/pandas_dataclasses/core/asdata.py +++ b/pandas_dataclasses/core/asdata.py @@ -41,8 +41,12 @@ def asdataframe(obj: Any, *, factory: Any = None) -> Any: if not issubclass(factory, pd.DataFrame): ...
astropenguin__pandas-dataclasses-98
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pandas_dataclasses/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edi...
astropenguin/pandas-dataclasses
5c30606969a0ce5ed7d214924f837e0367b49bf6
Add support for mypy
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index fede756..0d31077 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim +FROM python:3.10.6-slim ENV PATH=$PATH:/root/.local/bin ENV POETRY_VIRTUALENVS_CREATE=false diff --git a/pandas_datacla...
astropenguin__xarray-dataclasses-107
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xarray_dataclasses/dataarray.py:AsDataArray.empty", "xarray_dataclasses/dataarray.py:AsDataArray.zeros", "xarray_dataclasses/dataarray.py:AsDataArray.ones", "xarray_dataclasses/d...
astropenguin/xarray-dataclasses
ac6b3d279d236fe63a3cf084c41cebc1208586f5
Update NumPy-like zeros, ones, ... to be compatible with sizes
diff --git a/xarray_dataclasses/dataarray.py b/xarray_dataclasses/dataarray.py index 3db7135..6cce9a1 100644 --- a/xarray_dataclasses/dataarray.py +++ b/xarray_dataclasses/dataarray.py @@ -24,7 +24,7 @@ P = ParamSpec("P") TDataArray = TypeVar("TDataArray", bound=xr.DataArray) TDataArray_ = TypeVar("TDataArray_", boun...
astropenguin__xarray-dataclasses-108
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xarray_dataclasses/dataarray.py:AsDataArray.empty", "xarray_dataclasses/dataarray.py:AsDataArray.zeros", "xarray_dataclasses/dataarray.py:AsDataArray.ones", "xarray_dataclasses/d...
astropenguin/xarray-dataclasses
6c96e8e22d914164c066f75492f611f940cd466a
Update README and docstrings - Use type aliases (`X = Literal["x"]`, `Y = Literal["y"]`) for simplicity - Remove `[xarray-dataclasses](#xarray-dataclasses)` - Fix example of `xarray_dataclasses.typing.Coordof` - Fix parameters of `xarray_dataclasses.dataarray.asdataarray`
diff --git a/README.md b/README.md index 18b04c1..7f5efcc 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,17 @@ from typing import Literal from xarray_dataclasses import AsDataArray, Coord, Data +X = Literal["x"] +Y = Literal["y"] + + @dataclass class Image(AsDataArray): - """Specifications of images."""...
astropenguin__xarray-dataclasses-110
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xarray_dataclasses/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edi...
astropenguin/xarray-dataclasses
c600c5efd3f1b6e89abb18bd0ee74d2ede9ab3d7
Release v0.7.0
diff --git a/pyproject.toml b/pyproject.toml index 90fb876..66429b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xarray-dataclasses" -version = "0.6.1" +version = "0.7.0" description = "xarray extension for typed DataArray and Dataset creation" authors = ["Akio Taniguchi <t...
astropenguin__xarray-dataclasses-115
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xarray_dataclasses/__init__.py" } ]
astropenguin/xarray-dataclasses
68c25913e2db303cfa597e94383e9a7ec2d969c5
Release v0.8.0
diff --git a/pyproject.toml b/pyproject.toml index 66429b4..1ca5469 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xarray-dataclasses" -version = "0.7.0" +version = "0.8.0" description = "xarray extension for typed DataArray and Dataset creation" authors = ["Akio Taniguchi <t...
astropenguin__xarray-dataclasses-118
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xarray_dataclasses/dataarray.py:asdataarray", "xarray_dataclasses/dataarray.py:AsDataArray.empty", "xarray_dataclasses/dataarray.py:AsDataArray.zeros", "xarray_dataclasses/dataar...
astropenguin/xarray-dataclasses
64959df80777755f40e610e331e326ae541113b4
Use name-field value as data-variable name
diff --git a/xarray_dataclasses/dataarray.py b/xarray_dataclasses/dataarray.py index c24d46c..6140f39 100644 --- a/xarray_dataclasses/dataarray.py +++ b/xarray_dataclasses/dataarray.py @@ -113,21 +113,23 @@ def asdataarray( pass model = DataModel.from_dataclass(dataclass) - dataarray = dataoptions.fa...
astropenguin__xarray-dataclasses-126
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xarray_dataclasses/__init__.py" } ]
astropenguin/xarray-dataclasses
c5a47be41e03852deb98bfbb5c5fd267e73e1822
Release v0.9
diff --git a/pyproject.toml b/pyproject.toml index 1ca5469..c1a8428 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xarray-dataclasses" -version = "0.8.0" +version = "0.9.0" description = "xarray extension for typed DataArray and Dataset creation" authors = ["Akio Taniguchi <t...
astropenguin__xarray-dataclasses-140
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xarray_dataclasses/__init__.py" } ]
astropenguin/xarray-dataclasses
b97fa4a71d79c1977a845cecadfbd735e67971e7
Release v1.0.0-rc.1
diff --git a/pyproject.toml b/pyproject.toml index 123aa1f..ea17ee3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xarray-dataclasses" -version = "0.9.0" +version = "1.0.0-rc.1" description = "xarray extension for typed DataArray and Dataset creation" authors = ["Akio Taniguc...
astropenguin__xarray-dataclasses-203
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xarray_dataclasses/datamodel.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "ed...
astropenguin/xarray-dataclasses
102c962a7dfb1651d66b3156348dff1edcd3f21e
Fix import of Literal and Protocol Import `Literal` (and `Protocol`) not from `typing_extensions` but from `typing`. Use of `typing_extensions.Literal` fails `get_dims(tp)` in Python 3.8 and 3.9.
diff --git a/xarray_dataclasses/datamodel.py b/xarray_dataclasses/datamodel.py index 06fb0e0..5d8b7d1 100644 --- a/xarray_dataclasses/datamodel.py +++ b/xarray_dataclasses/datamodel.py @@ -4,13 +4,24 @@ __all__ = ["DataModel"] # standard library from dataclasses import dataclass, field, is_dataclass -from typing im...
astropy__asdf-astropy-253
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "asdf_astropy/converters/coordinates/angle.py:AngleConverter", "asdf_astropy/converters/coordinates/angle.py:LatitudeConverter", "asdf_astropy/converters/coo...
astropy/asdf-astropy
0a68c556945ee0a411974f7d4e828eb450297146
Support MaskedQuantity Astropy (v5.0+) has the `Masked` class (https://docs.astropy.org/en/stable/utils/masked/index.html), which can produce `MaskedQuantity`. It would be great if ASDF could serialize Masked objects.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e0288..f8730e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,8 +68,9 @@ jobs: # Any env name which does not start with `pyXY` will use this Python version. default_python: '3.13' envs: | - ...
astropy__asdf-astropy-81
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf_astropy/converters/coordinates/frame.py:FrameConverter.__init__", "asdf_astropy/converters/coordinates/frame.py:FrameConverter.tags" ], "edited_modules": [ "asdf_astropy...
astropy/asdf-astropy
5029c9390737f706cd999f6dc9185ee9e9ce7df6
Add support for multiple tags in a single FrameConverter Don't assume that `tag` is always a string.
diff --git a/CHANGES.rst b/CHANGES.rst index e042f01..24510a6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,7 @@ - Add converter for the new ``Schechter1D`` model. [#67] - Add CITATION file. [#71] - Add migration and quick-start documentation guides, and update minimum Python version [#77] +- Update ``FrameC...
astropy__astropy-16620
[ { "changes": { "added_entities": [ "astropy/units/format/base.py:Base._fraction_formatters", "astropy/units/format/base.py:Base._format_inline_fraction" ], "added_modules": null, "edited_entities": [ "astropy/units/format/base.py:Base._format_fraction", "a...
astropy/astropy
9a7002fcf4de719116a6bf3b9752fcb41f5a44f2
Possible speed-ups for `get_grouped_by_powers` This function uses `.append`. It looks like with a simple helper function (defined externally to this function) we could use a list comprehension instead. I wonder if that would be faster — `append` versus function call overhead. _Originally posted by @nstarman in https...
diff --git a/astropy/units/format/base.py b/astropy/units/format/base.py index 1c417d92cd..5644f11581 100644 --- a/astropy/units/format/base.py +++ b/astropy/units/format/base.py @@ -4,10 +4,12 @@ from __future__ import annotations from typing import TYPE_CHECKING +from astropy.utils import classproperty + from ....
astropy__astropy-16878
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/units/quantity_helper/helpers.py:get_converter" ], "edited_modules": [ "astropy/units/quantity_helper/helpers.py:get_converter" ] }, "file": "astropy/units/quan...
astropy/astropy
9e64811f96d6cde14e57920b91497053d0fa86ef
erfa.p2s does not accept units except for distance ### Description In https://github.com/liberfa/pyerfa/issues/149, @maxnoe reported the following error, which had him puzzled (transferred here since `astropy.units.quantity_helpers.erfa` is responsible for making `pyerfa` work with units). ```python from erfa.ufun...
diff --git a/astropy/units/quantity_helper/helpers.py b/astropy/units/quantity_helper/helpers.py index 4c05dafc5f..d47d28e5a0 100644 --- a/astropy/units/quantity_helper/helpers.py +++ b/astropy/units/quantity_helper/helpers.py @@ -7,6 +7,7 @@ In particular, this implements the logic that determines scaling and result ...
astropy__astropy-17705
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/fits/connect.py:write_table_fits" ], "edited_modules": [ "astropy/io/fits/connect.py:write_table_fits" ] }, "file": "astropy/io/fits/connect.py" } ]
astropy/astropy
f6bcea33cf16f3d5e06d860022b82b307d951565
Path handling in FITS broke benchmark code @neutrinoceros , I vaguely remember you did some Path support on this recently. Are you able to assist with debugging? Thanks! I see this when I apply `benchmark` label on a PR that did not touch FITS code (#17689). Example log: https://github.com/astropy/astropy/actions/runs...
diff --git a/astropy/io/fits/connect.py b/astropy/io/fits/connect.py index ae315c9d06..0f318ff699 100644 --- a/astropy/io/fits/connect.py +++ b/astropy/io/fits/connect.py @@ -435,7 +435,7 @@ def write_table_fits(input, output, overwrite=False, append=False): ---------- input : Table The table to writ...
astropy__astropy-17776
[ { "changes": { "added_entities": [ "astropy/units/quantity_helper/erfa.py:check_no_time_units", "astropy/units/quantity_helper/erfa.py:helper_apco13" ], "added_modules": [ "astropy/units/quantity_helper/erfa.py:check_no_time_units", "astropy/units/quantity_helpe...
astropy/astropy
d25189968192281971d6089291b53156b6b22bb2
Erfa function apco13 is unsupported? ### Description In https://github.com/astropy/astropy/pull/17729#discussion_r1946538474, it was shown that if one passes in `Quantity` to `erfa.apco13`, it raises ``` TypeError: unknown ufunc apco13. If you believe this ufunc should be supported, please raise an i... ``` Indeed, t...
diff --git a/astropy/units/quantity_helper/erfa.py b/astropy/units/quantity_helper/erfa.py index e88307d6da..75a0ec2210 100644 --- a/astropy/units/quantity_helper/erfa.py +++ b/astropy/units/quantity_helper/erfa.py @@ -22,8 +22,8 @@ erfa_ufuncs = ( "s2c", "s2p", "c2s", "p2s", "pm", "pdp", "pxp", "rxp", "cpv", "p2p...
astropy__astropy-6458
[ { "changes": { "added_entities": [ "astropy/io/ascii/fastbasic.py:FastBasic.make_table", "astropy/io/ascii/fastbasic.py:FastCommentedHeader.make_table" ], "added_modules": null, "edited_entities": [ "astropy/io/ascii/fastbasic.py:FastBasic.read", "astropy/...
astropy/astropy
2fbe399ebf4972834d30bfc69a67325e862ef1f9
ascii.read stalls out when reading large files @hamogu - I am trying to use ascii.read() to reduce a large (~6Gb) ASCII dataset into a processed binary file in which I have applied some cuts. The strategy I have been taking is to the use data_start and data_end keywords in a loop over chunks of the file, so that only ~...
diff --git a/CHANGES.rst b/CHANGES.rst index 1c5d9a53d0..c2bf8ad745 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -271,6 +271,9 @@ astropy.extern astropy.io.ascii ^^^^^^^^^^^^^^^^ +- Added support for reading very large tables in chunks to reduce memory + usage. [#6458] + astropy.io.fits ^^^^^^^^^^^^^^^ diff -...
astropy__astropy-6821
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/fits/column.py:Column._convert_to_valid_data_type" ], "edited_modules": [ "astropy/io/fits/column.py:Column" ] }, "file": "astropy/io/fits/column.py" }, ...
astropy/astropy
7bfd9137c54e556b2f513e2fbea1842cf38846c0
Table unicode sandwich follow-up: allow Table FITS reader to return bytestrings Currently in Py3 one gets unicode character arrays when reading string data from a FITS file. This translation is done in the the machinery within io.fits that [lazily auto-converts](https://github.com/astropy/astropy/blob/02c237987dd6f8bb...
diff --git a/CHANGES.rst b/CHANGES.rst index 01e38237df..8d9420e22e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -43,6 +43,19 @@ astropy.io.fits - Added ``ver`` attribute to set the ``EXTVER`` header keyword to ``ImageHDU`` and ``TableHDU``. [#6454] +- The performance for reading FITS tables has been significant...
astropy__astropy-6831
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/fits/connect.py:write_table_fits" ], "edited_modules": [ "astropy/io/fits/connect.py:write_table_fits" ] }, "file": "astropy/io/fits/connect.py" }, { ...
astropy/astropy
9c2cf1d1fa59ce2f2a01b7ea19724604d1e56619
Table indexing cannot be used to update a table If I have an index on a column, I can use it to retrieve a list of rows with `.loc`, but then it seems there is no way to update the corresponding rows in the source table: ```python In [1]: %astropy Numpy 1.12.0 Astropy 2.0.dev18049 In [2]: t = Table([list('abcde'...
diff --git a/CHANGES.rst b/CHANGES.rst index e59f386808..ea6b620909 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -55,9 +55,6 @@ astropy.io.fits in particular for cases where the tables contain one or more string columns and when done through ``Table.read``. [#6821] -- The performance for writing tables from ``...
astropy__astropy-6856
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/coordinates/baseframe.py:FrameMeta.__new__", "astropy/coordinates/baseframe.py:BaseCoordinateFrame._get_representation_info" ], "edited_modules": [ "astropy/coordinat...
astropy/astropy
1c4c585626442ca83007128e3488c92b30f3c726
Clearer naming of velocities in coordinates? Inspired by #6425: would it make sense to have a default name for velocities in coordinates that is clearer than, e.g., `d_phi`? This comes directly from the `Differential`, where it is logical, since the differential need not be a first-order time derivative. But for coordi...
diff --git a/CHANGES.rst b/CHANGES.rst index d7b0f3fea7..eba28c998b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -32,6 +32,11 @@ astropy.coordinates - SkyCoord objects now support storing and tranforming differentials - i.e., both radial velocities and proper motions. [#6944] +- All frame classes now automatical...
astropy__astropy-6944
[ { "changes": { "added_entities": [ "astropy/coordinates/baseframe.py:_get_diff_cls" ], "added_modules": [ "astropy/coordinates/baseframe.py:_get_diff_cls" ], "edited_entities": [ "astropy/coordinates/baseframe.py:BaseCoordinateFrame.__init__" ], ...
astropy/astropy
6d15232fd0e1f0a99629f5fa6cab7f689e18950b
SkyCoord should support velocities The velocity machinery added in v2.0 should get SkyCoord support. cc @adrn
diff --git a/CHANGES.rst b/CHANGES.rst index e54f01820e..f3cc6b3eab 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -26,6 +26,9 @@ astropy.coordinates a ``CartesianDifferential``, the 2D proper motion as a ``Quantity``, and the radial or line-of-sight velocity as a ``Quantity``. [#6869] +- SkyCoord objects now su...
astropy__astropy-6957
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/units/core.py:UnitBase.compose" ], "edited_modules": [ "astropy/units/core.py:UnitBase" ] }, "file": "astropy/units/core.py" } ]
astropy/astropy
e9f92d2c706bf6ac577943cb84c17078d2518a7f
Can't compose units from equivalent units that have prefixes For example, the following works: ``` python >>> u.m.compose(units=[u.pc]) [Unit("3.24078e-17 pc")] ``` but this does not work: ``` python >>> u.m.compose(units=[u.kpc]) ERROR: UnitsError: Cannot represent unit m in terms of the given units [astropy.units....
diff --git a/CHANGES.rst b/CHANGES.rst index 6a7d944032..80561595a0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -130,6 +130,10 @@ astropy.time astropy.units ^^^^^^^^^^^^^ +- In ``UnitBase.compose()``, if a sequence (list|tuple) is passed in to + ``units``, the default for ``include_prefix_units`` is set to + `T...
astropy__astropy-7004
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/coordinates/angles.py:Angle.__str__", "astropy/coordinates/angles.py:Angle._repr_latex_" ], "edited_modules": [ "astropy/coordinates/angles.py:Angle" ] }, ...
astropy/astropy
18ca704d048b0b2a0adba6f8db730b4f782d40e7
Very poor performance with Angle.__str__ and Angle._repr_latex_ The following illustrates very poor performance with ``Angle.__str__`` and ``Angle._repr_latex_`` with arrays: ```python In [15]: a = Angle(np.ones(1000000), u.deg) In [16]: %time a.__repr__() CPU times: user 324 µs, sys: 23 µs, total: 347 µs Wall...
diff --git a/CHANGES.rst b/CHANGES.rst index 726da29cae..6ec929c2ec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -179,8 +179,8 @@ astropy.utils - ``JsonCustomEncoder`` is expanded to handle ``Quantity`` and ``UnitBase``. [#5471] -- Added a ``dcip_xy`` method to IERS that interpolates along the dX_2000A and - d...
astropy__astropy-7103
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/ascii/ui.py:read" ], "edited_modules": [ "astropy/io/ascii/ui.py:read" ] }, "file": "astropy/io/ascii/ui.py" } ]
astropy/astropy
034ab9d4131539bf9f5dcad01b11d2afb4bbb8bb
Unicode decode error when trying to read in ascii table I thought that in Python 3, astropy.io.ascii worked with non-ASCII characters, but I am having issues with the following table: https://raw.githubusercontent.com/mrwilson/strictly-come-dancing-results/master/results.csv ```python In [4]: from astropy.table ...
diff --git a/CHANGES.rst b/CHANGES.rst index af71930710..12b89030f1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -256,6 +256,10 @@ astropy.extern astropy.io.ascii ^^^^^^^^^^^^^^^^ +- Fix a unicode decode error when reading a table with non-ASCII characters. + The fast C reader cannot handle unicode so the code no...
astropy__astropy-7107
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/table/row.py:Row.__getitem__", "astropy/table/row.py:Row.__setitem__" ], "edited_modules": [ "astropy/table/row.py:Row" ] }, "file": "astropy/table/row....
astropy/astropy
bc14e38716f49c54a1e9239ae7e7dd84875187e7
Incorrect result when slicing a row by multiple columns In the following example: ``` In [1]: from astropy.table import Table In [2]: t = Table() In [3]: t['a'] = [1,2,3] In [4]: t['b'] = [3,4,5] In [5]: row = t[0] In [6]: row['a', 'b'] Out[6]: <Column name='a' dtype='int64' length=3> 1 2 3 ``...
diff --git a/CHANGES.rst b/CHANGES.rst index 3b4300034d..3b5ab48eec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -478,6 +478,7 @@ astropy.table - Allow updating of table by indices through the property ``astropy.table.Table.loc``. [#6831] - Enable tab-completion for column names with IPython 5 and later. [#7071] +...
astropy__astropy-7148
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/coordinates/angle_utilities.py:sexagesimal_to_string" ], "edited_modules": [ "astropy/coordinates/angle_utilities.py:sexagesimal_to_string" ] }, "file": "astrop...
astropy/astropy
b1f05b51957150331faee7cca3e033019620bfec
Bug in rounded negative sexagesimal output There is a bug in sexagesimal_to_string in astropy.coordinates.angle_utilities. If a coordinate is negative, and is rounded by carrying a 60 up to the next field, the sign is not handled correctly. For example: ```python >>> from astropy import coordinates as coo >>> ...
diff --git a/CHANGES.rst b/CHANGES.rst index 06782ec985..a177c50ef0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -955,6 +955,9 @@ astropy.coordinates - Working around a bug in Numpy 1.14.0 that broke some coordinate transformations. [#7105] +- Fixed a bug where negative angles could be rounded wrongly when conve...
astropy__astropy-7213
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/registry.py:read" ], "edited_modules": [ "astropy/io/registry.py:read" ] }, "file": "astropy/io/registry.py" } ]
astropy/astropy
5b3e07fa10482baee19fadbb41d6b07408d01525
Table's subclass break with serialization With the serialization of astropy objects to FITS (#6912), I just noticed that it breaks the use of our `Table` subclass. When writing and reading back a FITS file with this subclass, `io.registry.read` now fails because the reader return a `QTable`, for which my class is not a...
diff --git a/CHANGES.rst b/CHANGES.rst index a29607457c..6e2947a749 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -291,6 +291,8 @@ astropy.io.misc astropy.io.registry ^^^^^^^^^^^^^^^^^^^ +- Fix reading files with serialized metadata when using a Table subclass. [#7213] + astropy.io.votable ^^^^^^^^^^^^^^^^^^ di...
astropy__astropy-7222
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/modeling/core.py:Model.prepare_outputs", "astropy/modeling/core.py:_prepare_outputs_model_set", "astropy/modeling/core.py:_validate_input_shapes" ], "edited_modules":...
astropy/astropy
5b3e07fa10482baee19fadbb41d6b07408d01525
Can't evaluate model sets over common co-ordinate array for model_set_axis > 0 Related to last week's #7142 & #7143, I'm still not 100% clear on the intended usage of `model_set_axis` myself -- but shouldn't one be able to do `some_model(x, model_set_axis=False)` when `some_model` was created with a `model_set_axis` ot...
diff --git a/CHANGES.rst b/CHANGES.rst index a29607457c..2e3ae7062c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -299,6 +299,8 @@ astropy.io.votable astropy.modeling ^^^^^^^^^^^^^^^^ +- Fix model set evaluation over common input when model_set_axis > 0. [#7222] + astropy.nddata ^^^^^^^^^^^^^^ diff --git a/astr...
astropy__astropy-7234
[ { "changes": { "added_entities": [ "astropy/coordinates/angles.py:Angle._str_helper" ], "added_modules": null, "edited_entities": [ "astropy/coordinates/angles.py:Angle.__str__", "astropy/coordinates/angles.py:Angle._repr_latex_" ], "edited_modules": [...
astropy/astropy
e18445a09b8be902fbacfb7f0e50093e8fd3a8db
TST: New failures in "numpy-dev" job? I don't see how these are related to the `einsum` thingy that is known. Example: https://travis-ci.org/astropy/astropy/jobs/342443502 ``` _________________________________ test__str__ __________________________________ # non-scalar array angles arrangle = Angl...
diff --git a/CHANGES.rst b/CHANGES.rst index e37aea279f..73afe9f636 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -276,8 +276,6 @@ astropy.io.registry astropy.io.votable ^^^^^^^^^^^^^^^^^^ -- Fix lookup fields by ID. [#7208] - astropy.modeling ^^^^^^^^^^^^^^^^ @@ -788,6 +786,8 @@ astropy.coordinates - Add a ...
astropy__astropy-7283
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/votable/table.py:parse", "astropy/io/votable/table.py:validate", "astropy/io/votable/table.py:is_votable" ], "edited_modules": [ "astropy/io/votable/table....
astropy/astropy
3fd96d61d2b3329024cdfbb2516d0f4cafedc510
TypeError when using astropy.io.votable.validate( ... , xmllint=True) When xmllint = True, validation goes through **astropy.io.votable.table.py** line 306 ``` if xmllint and os.path.exists(filename): from ...utils.xml import validate if votable is None: version = "1.1" ...
diff --git a/CHANGES.rst b/CHANGES.rst index 0f832f100c..1c7022eb7c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -290,6 +290,8 @@ astropy.io.registry astropy.io.votable ^^^^^^^^^^^^^^^^^^ +- Fix validate with xmllint=True. [#7255, #7283] + astropy.modeling ^^^^^^^^^^^^^^^^ diff --git a/astropy/io/votable/table...
astropy__astropy-7303
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/convolution/convolve.py:convolve" ], "edited_modules": [ "astropy/convolution/convolve.py:convolve" ] }, "file": "astropy/convolution/convolve.py" } ]
astropy/astropy
e96db6855d9d42de5f1a75bfb282f042dd36698e
astropy.convolution.convolve won't accept pandas.Series as input The issue: Pandas Series can be passed to numpy functions just as if they were a numpy array. However, astropy.convolution.convolve won't accept them. The workaround: pass the Pandas series to convolve() with .as_matrix(), so that it is sent as a num...
diff --git a/CHANGES.rst b/CHANGES.rst index db622f8750..8a98fe0219 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,9 @@ astropy.constants astropy.convolution ^^^^^^^^^^^^^^^^^^^ +- ``convolve`` now accepts any array-like input, not just ``numpy.ndarray`` or + lists. [#7303] + astropy.coordinates ^^^^^^^...
astropy__astropy-7453
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/time/core.py:Time.__init__" ], "edited_modules": [ "astropy/time/core.py:Time" ] }, "file": "astropy/time/core.py" } ]
astropy/astropy
a3ece74b1b42b146f9024f633ed737e04eb7823e
Passing a Time instance to a subclass of Time errors We recently implemented a subclass of Time in SunPy (for backwards compatibility reasons) and we have encounted an issue when passing an instance of `astropy.time.Time` to our subclass: ```python >>> from astropy.time import Time >>> class _Time(Time): ... pass ...
diff --git a/CHANGES.rst b/CHANGES.rst index 474bd7ed15..13f272307f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -984,6 +984,9 @@ astropy.tests astropy.time ^^^^^^^^^^^^ +- Fixed a bug in Time that raised an error when initializing a subclass of Time + with a Time object. [#7453] + astropy.units ^^^^^^^^^^^^^ ...
astropy__astropy-7470
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/utils/diff.py:report_diff_values" ], "edited_modules": [ "astropy/utils/diff.py:report_diff_values" ] }, "file": "astropy/utils/diff.py" } ]
astropy/astropy
e074d3f8f81c1176df937feabe7466195a2d6fc1
Refactor utils.diff.report_diff_values @mcara suggested some refactoring in https://github.com/astropy/astropy/pull/7444#issuecomment-387896174 . While you are at it, also maybe investigate whether https://github.com/astropy/astropy/pull/7444#discussion_r186866768 is possible without breaking regression. p.s. As lon...
diff --git a/CHANGES.rst b/CHANGES.rst index 978a25f16c..fe20e981c8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -337,6 +337,9 @@ astropy.units astropy.utils ^^^^^^^^^^^^^ +- Fixed a bug due to which ``report_diff_values()`` was reporting incorrect + number of differences when comparing two ``numpy.ndarray``. [#7...
astropy__astropy-7486
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/table/column.py:MaskedColumn.__new__" ], "edited_modules": [ "astropy/table/column.py:MaskedColumn" ] }, "file": "astropy/table/column.py" } ]
astropy/astropy
4cdd8dcb8d5ba097dd266b79e434824e73cde3fd
Mask from MaskedColumn is not copied When copying a masked table, the mask of MaskedColumn objects is not copied, which leads to weird result: ``` In [1]: %astropy Numpy 1.14.2 Astropy 3.1.dev21681 In [2]: t = Table([[2,4,1,3,6], [3.,2.,np.nan,4,6]], names=('a', 'b'), masked=True) In [3]: t['b'] = np.ma.mas...
diff --git a/.circleci/config.yml b/.circleci/config.yml index 5682ca2454..cdc2f339b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: - checkout - run: name: Install dependencies - command: /opt/python/cp36-cp36m/bin/pip install numpy scipy pytest-ast...
astropy__astropy-7540
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/table/table.py:Table.add_columns" ], "edited_modules": [ "astropy/table/table.py:Table" ] }, "file": "astropy/table/table.py" } ]
astropy/astropy
e074d3f8f81c1176df937feabe7466195a2d6fc1
astropy.table.Table.add_columns crash if rename_duplicate=True when there are no duplicates When adding columns to an astropy table with add_columns (or add_column), an error occurs if using rename_duplicate=True when there are in fact no duplicates. From the description of rename_duplicate in the documentation, it see...
diff --git a/CHANGES.rst b/CHANGES.rst index 978a25f16c..1f7fa7f28b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1074,6 +1074,9 @@ astropy.stats astropy.table ^^^^^^^^^^^^^ +- Fixed a bug in ``add_columns`` method where ``rename_duplicate=True`` would + cause an error if there were no duplicates. [#7540] + astr...
astropy__astropy-8237
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/config/configuration.py:ConfigItem.set", "astropy/config/configuration.py:ConfigItem.reload", "astropy/config/configuration.py:ConfigItem.__call__", "astropy/config/confi...
astropy/astropy
ec864232350c5282a56af52a35945e9e43861556
Consider providing template config file in docs instead of writing to disk If no config file exists in the user's home directory, we currently create one. We also have logic to check if the config file is still the default one and update it if astropy is updated. However, having a config file, even set to defaults, can...
diff --git a/CHANGES.rst b/CHANGES.rst index 461ccecacd..1c699a1bd4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,10 @@ New Features astropy.config ^^^^^^^^^^^^^^ +- The config and cache directories and the name of the config file are now + customizable. This allows affiliated packages to put their configu...
astropy__astropy-8253
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/stats/sigma_clipping.py:_nanmean", "astropy/stats/sigma_clipping.py:_nanmedian", "astropy/stats/sigma_clipping.py:_nanstd" ], "edited_modules": [ "astropy/sta...
astropy/astropy
b371de17560e2980162bdb31f4765bfdf50e7342
sigma_clipped_stats fails with quantity input Just what the title says really: ``` >>> stats.sigma_clipped_stats(np.random.randn(100)*u.kpc) ... UnitConversionError: 'kpc(1/2)' and 'kpc' (length) are not convertible During handling of the above exception, another exception occurred: ... UnitConversionError: Ca...
diff --git a/astropy/stats/sigma_clipping.py b/astropy/stats/sigma_clipping.py index afcaa853fc..5d94bb4d77 100644 --- a/astropy/stats/sigma_clipping.py +++ b/astropy/stats/sigma_clipping.py @@ -12,6 +12,7 @@ from astropy.utils.exceptions import AstropyUserWarning try: import bottleneck # pylint: disable=W0611 ...
astropy__astropy-8511
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/ascii/fixedwidth.py:FixedWidthHeader.get_cols" ], "edited_modules": [ "astropy/io/ascii/fixedwidth.py:FixedWidthHeader" ] }, "file": "astropy/io/ascii/fixedw...
astropy/astropy
a1e72dd7b8eca5fc95c9f40557e8ceaae30d4d81
FixedWidthNoHeader table not splitting on first data line Is the following routine giving correct behavior? Output: ``` A B C --- --- --- 1 2 3 4 5 6 A B C --- --- --- 1 2 3 -- 4 5 6 -- ``` I thought the `fixed_width_no_header` reader was supposed to split the first data line...
diff --git a/CHANGES.rst b/CHANGES.rst index 3bf050a8f5..73d1d59f4d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2582,6 +2582,9 @@ astropy.stats astropy.table ^^^^^^^^^^^^^ +- Fix ``FixedWidthNoHeader`` to pay attention to ``data_start`` keyword when + finding first data line to split columns [#8485, #8511] + a...
astropy__astropy-8560
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/stats/bayesian_blocks.py:FitnessFunc.fit" ], "edited_modules": [ "astropy/stats/bayesian_blocks.py:FitnessFunc" ] }, "file": "astropy/stats/bayesian_blocks.py" ...
astropy/astropy
f2acca5546fdfba0cea758ef9ba7d1573c626e9f
Bayesian blocks returns a single edge I stumbled on an edge case which is causing problems in my app. First, here's an example of expected behavior: ```python import numpy as np from astropy.stats import bayesian_blocks np.random.seed(0) values = np.concatenate([np.random.rand(100), 0.5 * np.random.rand(100)])...
diff --git a/CHANGES.rst b/CHANGES.rst index 7035d4a298..f1a92dbe57 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -476,6 +476,8 @@ astropy.samp astropy.stats ^^^^^^^^^^^^^ +- Fixed a bug where ``bayesian_blocks`` returned a single edge. [#8560] + astropy.table ^^^^^^^^^^^^^ diff --git a/astropy/stats/bayesian_b...
astropy__astropy-8666
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/fits/convenience.py:_makehdu" ], "edited_modules": [ "astropy/io/fits/convenience.py:_makehdu" ] }, "file": "astropy/io/fits/convenience.py" }, { "ch...
astropy/astropy
81a793974dd4dcef424b8d29f0da04e214e860c8
Primary HDU checksum data must be np.array? I have some code which attempts to update the FITS checksums: output = "out.fits" with fits.open(self.filepath, do_not_scale_image_data=True) as hdus: for hdu in hdus: fits.append(output, hdu.data, hdu.header, checksum=True) ...
diff --git a/CHANGES.rst b/CHANGES.rst index 1026ed63b1..13bf5e6d75 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -311,10 +311,6 @@ astropy.uncertainty astropy.units ^^^^^^^^^^^^^ -- Add support for the ``clip`` ufunc, which in numpy 1.17 is used to implement - ``np.clip``. As part of that, remove the ``Quantity....
astropy__astropy-8713
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/fits/header.py:Header.fromfile" ], "edited_modules": [ "astropy/io/fits/header.py:Header" ] }, "file": "astropy/io/fits/header.py" }, { "changes": { ...
astropy/astropy
69b4bf9d2b88c7b370f4c69727a0c925517301be
UnicodeDecodeError during fits.Header.fromfile() MWE: ``` import numpy as np from astropy.io import fits fn = 'test.fits' data = np.random.randn(1, 1) hdu = fits.HDUList(fits.PrimaryHDU(data)) hdu.writeto(fn, overwrite=True) header = fits.Header.fromfile(fn) ``` produces: ``` -------------------------...
diff --git a/CHANGES.rst b/CHANGES.rst index 6a32d019f3..ce23900e33 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2254,6 +2254,8 @@ astropy.io.fits - Fix ``Header.update`` which was dropping the comments when passed a ``Header`` object. [#8840] +- Fix ``Header.fromfile`` to work on FITS files. [#8713] + astropy...
astropy__astropy-8840
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/io/fits/header.py:Header.update" ], "edited_modules": [ "astropy/io/fits/header.py:Header" ] }, "file": "astropy/io/fits/header.py" } ]
astropy/astropy
3bb50be091cb1b73ba2d4973fb17cbdc6293682b
FITS I/O : Comment dropped when writing a keyword and comment header entry in BinTableHDU extension I am trying to add a header keyword with a float value and a comment. I want to add it to the BinTable extension of my fits file. However, for some reason fits is not writing the comment and just writing the value. He...
diff --git a/CHANGES.rst b/CHANGES.rst index 84bc59d0bd..536a10160a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2248,6 +2248,9 @@ astropy.io.ascii astropy.io.fits ^^^^^^^^^^^^^^^ +- Fix ``Header.update`` which was dropping the comments when passed + a ``Header`` object. [#8840] + astropy.io.misc ^^^^^^^^^^^^^...
astropy__astropy-9116
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "astropy/units/quantity_helper/function_helpers.py" } ]
astropy/astropy
50775e20799b435875d2b51c218f6f82b8a2528c
TST: np.alen is deprecated, use len instead How to best fix this one? Is deleting the test sufficient, @mhvk ? ``` ________________________ TestShapeInformation.test_alen ________________________ self = <astropy.units.tests.test_quantity_non_ufuncs.TestShapeInformation object at 0x7fc9a7f16c50> def test_a...
diff --git a/astropy/units/quantity_helper/function_helpers.py b/astropy/units/quantity_helper/function_helpers.py index 69b48c96f8..b9d363abf1 100644 --- a/astropy/units/quantity_helper/function_helpers.py +++ b/astropy/units/quantity_helper/function_helpers.py @@ -67,7 +67,7 @@ UNSUPPORTED_FUNCTIONS = set() """Funct...
astropy__astropy-9188
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "astropy/units/quantity.py:Quantity.__new__" ], "edited_modules": [ "astropy/units/quantity.py:Quantity" ] }, "file": "astropy/units/quantity.py" } ]
astropy/astropy
3237e94e79841461db988c1fe8c7a739df2b0e62
Quantity(column_with_log_unit, subok=True) should work As found in #8424, the following does not currently work: ``` from astropy.table import Column from astropy import units as u c = Column([1.,2.,3.], unit=u.dex(u.AA)) u.Quantity(c, subok=True) # UnitTypeError: Quantity instances require <class 'astropy.unit...
diff --git a/CHANGES.rst b/CHANGES.rst index 9054d21db2..93d04f1d59 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -69,7 +69,6 @@ astropy.modeling - Significant reorganization of the documentation. [#9078, #9171] - Add ``Tabular1D.inverse`` [#9083] -- Significant reorganization of the documentation. [#9078, #9171] ...
astropy__astropy-9229
[ { "changes": { "added_entities": [ "astropy/io/fits/hdu/compressed.py:CompImageHeader.__new__" ], "added_modules": null, "edited_entities": [ "astropy/io/fits/hdu/compressed.py:CompImageHeader.__init__" ], "edited_modules": [ "astropy/io/fits/hdu/compr...
astropy/astropy
7480e0d6a6f0f322769f99a64de14fdfa41df4aa
Fits Header does not preserve subclasses in copying and slicing. I have a subclass of `io.fits.Header` and noticed that the copying and slicing does not by default return instances of my subclasses but rather of `Header`. This is because the class is hardcoded in those methods. In principle, this is incorrect, and corr...
diff --git a/CHANGES.rst b/CHANGES.rst index 0bd78b86ac..e3020fffc2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -205,6 +205,10 @@ astropy.io.fits - Masked column handling has changed, see ``astropy.table`` entry below. [#8789] +- ``io.fits.Header`` has been made safe for subclasses for copying and slicing. + As...