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 |
|---|---|---|---|---|---|
beetbox__beets-3508 | [
{
"changes": {
"added_entities": [
"beets/dbcore/types.py:Integer.normalize"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"beets/dbcore/types.py:Integer"
]
},
"file": "beets/dbcore/types.py"
}
] | beetbox/beets | 545c65d903e38d37fd2c1734ec69eac609bea035 | Integers are not normalized
## The Curse of the Floating BPM Value
### Problem
Beets currently allows the Model to set and the library to store any value for a field which is declared as `types.INTEGER` in the Item class. This behaviour however is not supported by MediaFile and for fields (such as bpm) which are ... | diff --git a/beets/dbcore/db.py b/beets/dbcore/db.py
index 3195b52c9..b13f2638a 100755
--- a/beets/dbcore/db.py
+++ b/beets/dbcore/db.py
@@ -189,7 +189,7 @@ class LazyConvertDict(object):
class Model(object):
"""An abstract object representing an object in the database. Model
- objects act like dictionaries ... |
beetbox__beets-3554 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beetsplug/lyrics.py:Genius.lyrics_from_song_api_path"
],
"edited_modules": [
"beetsplug/lyrics.py:Genius"
]
},
"file": "beetsplug/lyrics.py"
}
] | beetbox/beets | 939bc269b8a868e49b5e0301ab3e3ae4949dc41a | genius: Tolerate missing lyrics div in Genius scraper
```
File "/home/greg/.local/lib/python3.7/site-packages/beetsplug/lyrics.py", line 410, in fetch
return self.lyrics_from_song_api_path(song_api_path)
File "/home/greg/.local/lib/python3.7/site-packages/beetsplug/lyrics.py", line 376, in lyrics_from_song_a... | diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py
index 0e797d5a3..00b8820f4 100644
--- a/beetsplug/lyrics.py
+++ b/beetsplug/lyrics.py
@@ -373,7 +373,14 @@ class Genius(Backend):
# At least Genius is nice and has a tag called 'lyrics'!
# Updated css where the lyrics are based in HTML.
- ... |
beetbox__beets-3688 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/dbcore/db.py:FormattedMapping._get_formatted"
],
"edited_modules": [
"beets/dbcore/db.py:FormattedMapping"
]
},
"file": "beets/dbcore/db.py"
}
] | beetbox/beets | a2f66a042727964e18d698a7b1676a802b5f7050 | Sanitize colons in drive-letter-like positions in Windows filenames like path separators
I have an album containing an artist named "F:A.R.". When doing any activity that involves moving this artist, the file is not moved to "M:\F:A.R." (I'm using unicode replacements instead of underscores), but to "M:\F:\A.R.".
##... | diff --git a/beets/config_default.yaml b/beets/config_default.yaml
index 0fd6eb592..c75778b80 100644
--- a/beets/config_default.yaml
+++ b/beets/config_default.yaml
@@ -44,6 +44,7 @@ replace:
'^\s+': ''
'^-': _
path_sep_replace: _
+drive_sep_replace: _
asciify_paths: false
art_filename: cover
max_filename... |
beetbox__beets-3702 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "beetsplug/the.py"
}
] | beetbox/beets | 4e9346942136d86b2250b9299bcb6e616a57c41f | "the" plugin uses incorrect regex
### Problem
Running this command:
```sh
~ ❯ beet move artist:trance -p
Moving 40 items.
M:\TET - Travailleur En Trance\[2008] Cobra Coded Escalation\01-01 - Cobra Reporting In.mp3
-> M:\‒ Travailleur En Trance, TET\[2008] Cobra Coded Escalation\01-01 - Cobra Reporting In.mp... | diff --git a/beetsplug/the.py b/beetsplug/the.py
index 238aec32f..dfc58817d 100644
--- a/beetsplug/the.py
+++ b/beetsplug/the.py
@@ -23,7 +23,7 @@ from beets.plugins import BeetsPlugin
__author__ = 'baobab@heresiarch.info'
__version__ = '1.1'
-PATTERN_THE = u'^[the]{3}\\s'
+PATTERN_THE = u'^the\\s'
PATTERN_A = u'^... |
beetbox__beets-3725 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beetsplug/mpdstats.py:MPDClientWrapper.currentsong",
"beetsplug/mpdstats.py:MPDStats.on_stop",
"beetsplug/mpdstats.py:MPDStats.on_play"
],
"edited_modules": [
"beetsp... | beetbox/beets | ff445ed2f8ee17f8bd963691518198622cca06e5 | mpdstats records a skip when stopping playback
<!--
Describe your problem, feature request, or discussion topic here.
Please fill out this and the "Setup" section below and remember to include
enough detail so that other people can reproduce the problem.
-->
### Problem
I am using the mpdstats plugin. Runn... | diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py
index f232d87e9..39b045f9b 100644
--- a/beetsplug/mpdstats.py
+++ b/beetsplug/mpdstats.py
@@ -108,8 +108,9 @@ class MPDClientWrapper(object):
return self.get(command, retries=retries - 1)
def currentsong(self):
- """Return the path to the... |
beetbox__beets-3805 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beetsplug/keyfinder.py:KeyFinderPlugin.find_key"
],
"edited_modules": [
"beetsplug/keyfinder.py:KeyFinderPlugin"
]
},
"file": "beetsplug/keyfinder.py"
}
] | beetbox/beets | 9657919968989d67f3d09a72ef045e5b9d057939 | keyfinder: Output parsing error
### Problem
Running this command in verbose (`-vv`) mode:
``` sh
$ beet -vv keyfinder anything
```
Led to this problem:
```
user configuration: /home/diomekes/.config/beets/config.yaml
data directory: /home/diomekes/.config/beets
plugin paths:
Sending event: pluginload
inline: adding... | diff --git a/beetsplug/keyfinder.py b/beetsplug/keyfinder.py
index a75b8d972..702003f0f 100644
--- a/beetsplug/keyfinder.py
+++ b/beetsplug/keyfinder.py
@@ -76,7 +76,14 @@ class KeyFinderPlugin(BeetsPlugin):
item.path)
continue
- key_raw = output.rsplit(Non... |
beetbox__beets-3863 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/autotag/mb.py:track_info"
],
"edited_modules": [
"beets/autotag/mb.py:track_info"
]
},
"file": "beets/autotag/mb.py"
},
{
"changes": {
"added_entiti... | beetbox/beets | 5b6dff34a16d1c0a666877e375c7b30c5104187c | Fetch MusicBrainz track disambiguation field
I download a lot of singletons, and I use the track disambiguation notes frequently. I saw that Beets has a way to note the **album** disambig, but not the **track** disambig. Can this be inserted into a future release? This way, my beets.yaml config could look something lik... | diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py
index 03ea5b382..3ca5463c2 100644
--- a/beets/autotag/mb.py
+++ b/beets/autotag/mb.py
@@ -223,6 +223,8 @@ def track_info(recording, index=None, medium=None, medium_index=None,
if recording.get('length'):
info.length = int(recording['length']) / (1000.... |
beetbox__beets-3868 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beetsplug/web/__init__.py:_rep"
],
"edited_modules": [
"beetsplug/web/__init__.py:_rep"
]
},
"file": "beetsplug/web/__init__.py"
}
] | beetbox/beets | 461fee45ec7cb29d562d6a90e64a1adca916c1be | web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set
### Problem
`beet web` provides GET operations to fetch track items and albums. By default this removes paths
from the returned data, but the config setting INCLUDE_PATHS should allow the paths to be returned.
This works correctly for GET /item/...... | diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 2a8b3a784..ecb7e03dd 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
- python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
+ pyt... |
beetbox__beets-3877 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beetsplug/web/__init__.py:resource",
"beetsplug/web/__init__.py:resource_query",
"beetsplug/web/__init__.py:WebPlugin.__init__",
"beetsplug/web/__init__.py:WebPlugin.commands"
... | beetbox/beets | 84f6d374c4cb918bb77bccb11593cd4765ebfa54 | web: add readonly config setting
### Use case
I want to use the web plugin to allow queries of my music on my LAN, but I want to maintain full control over updates, with no updates or deletions allowed using the web API.
Of course, I am not exposing the beets web API to the internet, but I don't even want to risk... | diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py
index c8f979fa6..c74cd0748 100644
--- a/beetsplug/web/__init__.py
+++ b/beetsplug/web/__init__.py
@@ -116,12 +116,19 @@ def resource(name, patchable=False):
entities = [entity for entity in entities if entity]
if get_method()... |
beetbox__beets-3982 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/library.py:DefaultTemplateFunctions.tmpl_ifdef"
],
"edited_modules": [
"beets/library.py:DefaultTemplateFunctions"
]
},
"file": "beets/library.py"
}
] | beetbox/beets | 5fad8ee0b2db11557a1beb492f526ac42d4c8eba | %ifdef does not work on flexattr fields with int or float
### Problem
If I try `beet ls -a -f '$albumartist - (%if{$original_year,$original_year,$year}) - $album%ifdef{albumdisambig, (%title{$albumdisambig}),}%ifdef{albumrating, ($albumrating),}' year:2021` then beets will return the album rating for the albums that h... | diff --git a/beets/library.py b/beets/library.py
index 6e13bf82c..dcd5a6a1f 100644
--- a/beets/library.py
+++ b/beets/library.py
@@ -1753,7 +1753,7 @@ class DefaultTemplateFunctions(object):
:param falseval: The string if the condition is false
:return: The string, based on condition
"""
- ... |
beetbox__beets-4085 | [
{
"changes": {
"added_entities": [
"beetsplug/discogs.py:DiscogsPlugin.extract_release_id_regex"
],
"added_modules": null,
"edited_entities": [
"beetsplug/discogs.py:DiscogsPlugin.album_for_id"
],
"edited_modules": [
"beetsplug/discogs.py:DiscogsPlugin... | beetbox/beets | 9bab200d3d496968bf517151ca43a91b0aafc26a | discogs: Parse IDs from new release URL format
<!--
Describe your problem, feature request, or discussion topic here.
Please fill out this and the "Setup" section below and remember to include
enough detail so that other people can reproduce the problem.
-->
### Problem
- With some files located in director... | diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py
index 76036f1be..90486850a 100644
--- a/beetsplug/discogs.py
+++ b/beetsplug/discogs.py
@@ -197,6 +197,31 @@ class DiscogsPlugin(BeetsPlugin):
self._log.debug('Connection error in album search', exc_info=True)
return []
+ @staticmet... |
beetbox__beets-4095 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/importer.py:ImportTask.set_fields",
"beets/importer.py:SingletonImportTask.set_fields"
],
"edited_modules": [
"beets/importer.py:ImportTask",
"beets/importer.py... | beetbox/beets | 4761c35afd5e07463b9179bfbbb6c6e529328dde | Formatted modify
There are a number of cool things we could do if the `modify` command supported templates in the value part. For example, you could put the Echo Nest liveness into the comments field like so:
```
$ beet mod comments='liveness: $liveness'
```
It might also be nice to expose these rewritings in an impo... | diff --git a/beets/importer.py b/beets/importer.py
index 14478b43d..2a7508c3c 100644
--- a/beets/importer.py
+++ b/beets/importer.py
@@ -584,9 +584,9 @@ class ImportTask(BaseImportTask):
displayable_path(self.paths),
field,
value)
- self.al... |
beetbox__beets-4140 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/library.py:DefaultTemplateFunctions.tmpl_aunique"
],
"edited_modules": [
"beets/library.py:DefaultTemplateFunctions"
]
},
"file": "beets/library.py"
}
] | beetbox/beets | 3b531811b982119c6e598433e413e8ca9f2ad068 | %aunique fails if a disambiguation is a non-fixed field
I recently encountered this behaviour while trying out paths with `%aunique{}` and the below config.
```yaml
paths:
default: $albumartist/$albumartist - $album%ifdef{albumdisambig, - $albumdisambig}%aunique{albumartist album year, catalognum label} [$format... | diff --git a/beets/library.py b/beets/library.py
index df1b8ffee..d35a7fae6 100644
--- a/beets/library.py
+++ b/beets/library.py
@@ -1690,7 +1690,9 @@ class DefaultTemplateFunctions:
subqueries = []
for key in keys:
value = album.get(key, '')
- subqueries.append(dbcore.MatchQue... |
beetbox__beets-4275 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/art.py:embed_item",
"beets/art.py:check_art_similarity"
],
"edited_modules": [
"beets/art.py:embed_item",
"beets/art.py:check_art_similarity"
]
},
... | beetbox/beets | d0a5f812fded18287ef7e8db55112ff015cc95fe | Image similarity comparison should use modern `magick` binary when available
Beets is having intermittent issues with the latest version of Imagemagick as it seems the commands used to call compare,convert, etc have changed in the latest verison IM 7. in a cmd prompt running 'Magick compare' produces output as picture... | diff --git a/beets/art.py b/beets/art.py
index 13d5dfbd4..6e0a5f82b 100644
--- a/beets/art.py
+++ b/beets/art.py
@@ -17,8 +17,6 @@ music and items' embedded album art.
"""
-import subprocess
-import platform
from tempfile import NamedTemporaryFile
import os
@@ -53,14 +51,22 @@ def embed_item(log, item, imagepa... |
beetbox__beets-4359 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/library.py:parse_query_parts"
],
"edited_modules": [
"beets/library.py:parse_query_parts"
]
},
"file": "beets/library.py"
}
] | beetbox/beets | 988bf2672cac36fb625e0fc87983ff641a0c214e | Implicit path queries in a boolean OR yield a match-all query
This is best illustrated by example:
- `beet list /path/to/library/A` — works
- `beet list /path/to/library/B` — works
- `beet list /path/to/library/A , /path/to/library/B` — **lists the whole library**
- `beet list path:/path/to/library/A , path:/path/to/li... | diff --git a/beets/library.py b/beets/library.py
index 69fcd34cf..c8fa2b5fc 100644
--- a/beets/library.py
+++ b/beets/library.py
@@ -1382,7 +1382,7 @@ def parse_query_parts(parts, model_cls):
`Query` and `Sort` they represent.
Like `dbcore.parse_sorted_query`, with beets query prefixes and
- special path... |
beetbox__beets-4387 | [
{
"changes": {
"added_entities": [
"beets/ui/commands.py:_paths_from_logfile",
"beets/ui/commands.py:_parse_logfiles"
],
"added_modules": [
"beets/ui/commands.py:_paths_from_logfile",
"beets/ui/commands.py:_parse_logfiles"
],
"edited_entities": [
... | beetbox/beets | fd65e12c8faa217311182103df0fd1401952486b | Allow importing from logfile
When importing large collections, it makes sense to do the automated import first, then do the manual part afterwards:
$ beet import -l skipped.log -q /path/to/library
It would be great if it was possible to continue the import using the logfile instead of a directory:
$ be... | diff --git a/beets/ui/commands.py b/beets/ui/commands.py
index 3a3374013..cbdd8e3bf 100755
--- a/beets/ui/commands.py
+++ b/beets/ui/commands.py
@@ -79,6 +79,43 @@ def _do_query(lib, query, album, also_items=True):
return items, albums
+def _paths_from_logfile(path):
+ """Parse the logfile and yield skipped... |
beetbox__beets-4549 | [
{
"changes": {
"added_entities": [
"beets/autotag/mb.py:_get_related_artist_names"
],
"added_modules": [
"beets/autotag/mb.py:_get_related_artist_names"
],
"edited_entities": [
"beets/autotag/mb.py:track_info"
],
"edited_modules": [
"beet... | beetbox/beets | e201dd4fe57b0aa2e80890dc3939b0a803e3448d | Fetch `remixer` field from MusicBrainz
### Problem
Musicbrainz seems to have a field called `remixer` for remixes, this info isn't written to my files.
Example: https://musicbrainz.org/release/7c7f7ddf-c021-4ee8-993d-d1c330b4a36a
Using it for the artist field, similarly to the `artist_credit` option would also b... | diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py
index 3bd7e8c81..5b8d45138 100644
--- a/beets/autotag/mb.py
+++ b/beets/autotag/mb.py
@@ -202,6 +202,19 @@ def _flatten_artist_credit(credit):
)
+def _get_related_artist_names(relations, relation_type):
+ """Given a list representing the artist relation... |
beetbox__beets-4582 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/autotag/mb.py:album_info"
],
"edited_modules": [
"beets/autotag/mb.py:album_info"
]
},
"file": "beets/autotag/mb.py"
},
{
"changes": {
"added_entiti... | beetbox/beets | 7aa7df2a93e2c353b035647b4af1d81311759c30 | albumtypes is converted from a string to a list of individual characters
### Problem
After importing new files I will run `beet update`. Some of the tracks will have the `albumtypes` 'transformed' from a string (`album`) to a list of character (`['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']`). The `albumty... | diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py
index 7d7932faf..f380cd033 100644
--- a/beets/autotag/mb.py
+++ b/beets/autotag/mb.py
@@ -466,7 +466,7 @@ def album_info(release: Dict) -> beets.autotag.hooks.AlbumInfo:
if release['release-group']['secondary-type-list']:
for sec_type in relea... |
beetbox__beets-4663 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/library.py:Album.store"
],
"edited_modules": [
"beets/library.py:Album"
]
},
"file": "beets/library.py"
},
{
"changes": {
"added_entities": null,
... | beetbox/beets | 6abcc20df0b10fd5d1bcee948c2b56d874e923b3 | Removing a flexible field from an album doesn't remove corresponding field from its items
<!--
Describe your problem, feature request, or discussion topic here.
Please fill out this and the "Setup" section below and remember to include
enough detail so that other people can reproduce the problem.
-->
### Probl... | diff --git a/beets/library.py b/beets/library.py
index 981563974..d62403cbf 100644
--- a/beets/library.py
+++ b/beets/library.py
@@ -1355,9 +1355,12 @@ class Album(LibModel):
"""
# Get modified track fields.
track_updates = {}
- for key in self.item_keys:
- if key in self._d... |
beetbox__beets-4714 | [
{
"changes": {
"added_entities": [
"beets/autotag/mb.py:_is_translation",
"beets/autotag/mb.py:_find_actual_release_from_pseudo_release",
"beets/autotag/mb.py:_merge_pseudo_and_actual_album"
],
"added_modules": [
"beets/autotag/mb.py:_is_translation",
"b... | beetbox/beets | 79435c3b6f682d30cac169c97f978491dfd8f80d | Follow MusicBrainz pseudo-releases
The MB database uses "pseudo-releases" to provide translations of track names when there was, in fact, never a translated release. Apparently, [the correct way to handle these](http://tickets.musicbrainz.org/browse/PICARD-145) is to use the original release's IDs but the pseudo-releas... | diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py
index 7eecb1db0..c7dba1bc8 100644
--- a/beets/autotag/mb.py
+++ b/beets/autotag/mb.py
@@ -73,7 +73,8 @@ log = logging.getLogger('beets')
RELEASE_INCLUDES = ['artists', 'media', 'recordings', 'release-groups',
'labels', 'artist-credits', 'alias... |
beetbox__beets-4735 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/importer.py:ImportTask.reimport_metadata"
],
"edited_modules": [
"beets/importer.py:ImportTask"
]
},
"file": "beets/importer.py"
}
] | beetbox/beets | d05c34ec4e9d8fa9e34706ac2279b7315b36e1e0 | Re-imports don't update `data_source` flex attr
### Problem
When importing an album or a singleton that was previously imported already, the `data_source` flexible attribute is not updated. It stays as **initially imported**.
### Setup
* OS: ---
* Python version: ---
* beets version: 1.6.1 dev-latest
* Tu... | diff --git a/beets/importer.py b/beets/importer.py
index 96d1f17df..601f8246f 100644
--- a/beets/importer.py
+++ b/beets/importer.py
@@ -50,6 +50,11 @@ QUEUE_SIZE = 128
SINGLE_ARTIST_THRESH = 0.25
PROGRESS_KEY = 'tagprogress'
HISTORY_KEY = 'taghistory'
+# Album and item flexble attrbutes that should not be preserved... |
beetbox__beets-4823 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/library.py:Album.store",
"beets/library.py:Album.try_sync"
],
"edited_modules": [
"beets/library.py:Album"
]
},
"file": "beets/library.py"
},
{
"c... | beetbox/beets | 684fab47bd6f7b92dc24d34898624d29f3cf4a26 | Album flexible attributes modifications are not inherited to tracks
As discussed in https://github.com/beetbox/beets/discussions/4742, changing flexible attributes via a `beet modify -a` command does not inherit the changes to the tracks of the album.
Changing a fixed attribute on an album _does_ inherit the change... | diff --git a/beets/library.py b/beets/library.py
index 46d2f416c..405b546e2 100644
--- a/beets/library.py
+++ b/beets/library.py
@@ -1369,22 +1369,27 @@ class Album(LibModel):
plugins.send('art_set', album=self)
- def store(self, fields=None):
+ def store(self, fields=None, inherit=True):
""... |
beetbox__beets-5034 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/ui/__init__.py:colorize",
"beets/ui/__init__.py:split_into_lines"
],
"edited_modules": [
"beets/ui/__init__.py:colorize",
"beets/ui/__init__.py:split_into_lines... | beetbox/beets | e5d10004ae08bcbbaa4ee1397a4d889e8b3b52de | Bring back NO_COLOR support?
Back in 2019 I added support for the [NO_COLOR environment variable](https://no-color.org/). This was removed in be290e54441987fdb80437f7982f4d5ad01bac59 as part of a refactor. Unless I'm mistaken it seems there's no way to disable colors from the command line anymore. It must be done in th... | diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py
index 5e445613f..a98e8ee43 100644
--- a/beets/ui/__init__.py
+++ b/beets/ui/__init__.py
@@ -591,7 +591,7 @@ def colorize(color_name, text):
"""Colorize text if colored output is enabled. (Like _colorize but
conditional.)
"""
- if config["ui"]["c... |
beetbox__beets-5153 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"beets/autotag/hooks.py:AlbumInfo.__init__",
"beets/autotag/hooks.py:AlbumInfo.decode"
],
"edited_modules": [
"beets/autotag/hooks.py:AlbumInfo"
]
},
"file": "be... | beetbox/beets | b09806e0df8f01b9155017d3693764ae7beedcd5 | Add barcode metadata field
Musicbrainz includes the CD barcode with the album metadata. It would be great if beets could store this barcode when available as I would like to be able to lookup albums by scanning the barcode of a CD.
| diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py
index 13c43e8cf..67546f47c 100644
--- a/beets/autotag/hooks.py
+++ b/beets/autotag/hooks.py
@@ -94,6 +94,7 @@ class AlbumInfo(AttrDict):
month: Optional[int] = None,
day: Optional[int] = None,
label: Optional[str] = None,
+ b... |
beetbox__confuse-133 | [
{
"changes": {
"added_entities": [
"confuse/core.py:ConfigView.sequence"
],
"added_modules": null,
"edited_entities": [
"confuse/core.py:ConfigView.__iter__"
],
"edited_modules": [
"confuse/core.py:ConfigView"
]
},
"file": "confuse/core.p... | beetbox/confuse | 200203f9c4a5cbff31357c8382aab8fbc2e5152f | AttributeError when validating dict with sequence template
I get the following exception when trying to validate a dictionary against Sequence template.
```
File "<path>/site-packages/confuse/core.py", line 351, in get
return templates.as_template(template).value(self, template)
File "<path>/lib/python3.6/s... | diff --git a/confuse/core.py b/confuse/core.py
index c63b1a9..fbe4bdc 100644
--- a/confuse/core.py
+++ b/confuse/core.py
@@ -106,26 +106,25 @@ class ConfigView(object):
"""Iterate over the keys of a dictionary view or the *subviews*
of a list view.
"""
- # Try getting the keys, if this... |
beetbox__confuse-139 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "confuse/__init__.py"
},
{
"changes": {
"added_entities": [
"confuse/core.py:Configuration.reload"
],
"added_modules": null,
... | beetbox/confuse | 2d7b6c8393aad515fd028d3b2088c4150d585b52 | Hot reloading
Hi,
I was wondering if this cool library can perform hot reloading to update config in live if the file changed.
Eg:
`main.py`
```python
import confuse
import sys
import time
if __name__ == "__main__":
config = confuse.Configuration('app', __name__)
print(config)
time.sleep(20)
... | diff --git a/confuse/__init__.py b/confuse/__init__.py
index c92c356..ef3d19c 100644
--- a/confuse/__init__.py
+++ b/confuse/__init__.py
@@ -3,7 +3,7 @@
from __future__ import division, absolute_import, print_function
-__version__ = '1.5.0'
+__version__ = '1.6.0'
from .exceptions import * # NOQA
from .util imp... |
beetbox__confuse-78 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"confuse.py:as_template"
],
"edited_modules": [
"confuse.py:as_template"
]
},
"file": "confuse.py"
}
] | beetbox/confuse | 5528e7ae70850be07ecaca25826c972c195ee90b | as_template does not convert float
If it encounters an integer, it will convert it to an integer type validator
https://github.com/beetbox/confuse/blob/5528e7ae70850be07ecaca25826c972c195ee90b/confuse.py#L1666-L1669
If it encounters a float, it throws an error
https://github.com/beetbox/confuse/blob/5528e7ae70850b... | diff --git a/confuse.py b/confuse.py
index 8d5d875..5ec3936 100644
--- a/confuse.py
+++ b/confuse.py
@@ -1681,6 +1681,8 @@ def as_template(value):
return OneOf(value)
elif value is float:
return Number()
+ elif isinstance(value, float):
+ return Number(value)
elif value is None:
... |
beetbox__confuse-79 | [
{
"changes": {
"added_entities": [
"confuse.py:Template.get_default_value"
],
"added_modules": null,
"edited_entities": [
"confuse.py:Template.value",
"confuse.py:Filename.value",
"confuse.py:Path.value"
],
"edited_modules": [
"confuse.... | beetbox/confuse | 5528e7ae70850be07ecaca25826c972c195ee90b | confuse.Filename doesn't check "default" argument
#### The Problem
When you specify `confuse.Filename('/default/path/to/file')` you would expect that, if no config value was found, it would default to `'/default/path/to/file'`. Instead, it throws exceptions.
When I set `my_path: null` in my `config_default.yaml`, ... | diff --git a/confuse.py b/confuse.py
index 8d5d875..ea1afce 100644
--- a/confuse.py
+++ b/confuse.py
@@ -1125,15 +1125,21 @@ class Template(object):
May raise a `NotFoundError` if the value is missing (and the
template requires it) or a `ConfigValueError` for invalid values.
"""
- if v... |
beetbox__confuse-97 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"confuse/core.py:ConfigView.get"
],
"edited_modules": [
"confuse/core.py:ConfigView"
]
},
"file": "confuse/core.py"
},
{
"changes": {
"added_entities": nul... | beetbox/confuse | 290a46f27eb081058ddb80afa5383b9253511f6d | None as Template should use None as default
When I do this for a key that doesn't exist in `config_default.yaml`, I would expect the key to contain `None` by default.
```python
config['something'].get({
'key': None
})
```
But instead, I get:
```
confuse.NotFoundError: something.key not found
```
This ... | diff --git a/confuse/core.py b/confuse/core.py
index 193bfc3..5015705 100644
--- a/confuse/core.py
+++ b/confuse/core.py
@@ -335,7 +335,7 @@ class ConfigView(object):
od[key] = view.get()
return od
- def get(self, template=None):
+ def get(self, template=templates.REQUIRED):
... |
beetbox__mediafile-45 | [
{
"changes": {
"added_entities": [
"mediafile.py:loadfile",
"mediafile.py:_update_filething",
"mediafile.py:MediaFile.filename",
"mediafile.py:MediaFile.path",
"mediafile.py:MediaFile.filesize",
"mediafile.py:MediaFile.as_dict"
],
"added_modules"... | beetbox/mediafile | 7ecd86101ec3344e7fb25bbf781cd7f86646aa9d | Support filelike objects, not only pathes
Hi!
I'm trying to use this library with remote files defined as file-likes in python.
`mutagen` supports file-like interface, why tho mediafile doesn't?
Docs say it needs local file path as first argument. | diff --git a/docs/index.rst b/docs/index.rst
index 2ea6655..1023abd 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -95,7 +95,7 @@ Internals
.. autoclass:: StorageStyle
:members:
-
+
Examples
--------
@@ -112,7 +112,7 @@ To add cover art to a MediaFile:
f = MediaFile("file.mp3)
f.images = ... |
beetbox__mediafile-46 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"mediafile.py:MediaFile"
]
},
"file": "mediafile.py"
}
] | beetbox/mediafile | 7ecd86101ec3344e7fb25bbf781cd7f86646aa9d | mb_artistid and mb_albumartistid should be lists
Hey!
When trying to fix my PR (#42) I found error I can't fix myself.
`mb_artistid` and `mb_albumartistid` should be lists!
`mediafile`'s version:
```python
>>> mf = MediaFile('/home/juniorjpdj/temp/Szpadyzor crew.flac')
>>> mf.mb_artistid
'164ed128-525d-4798-88... | diff --git a/mediafile.py b/mediafile.py
index a9e5e8e..90e54a8 100644
--- a/mediafile.py
+++ b/mediafile.py
@@ -1994,18 +1994,27 @@ class MediaFile(object):
StorageStyle('MUSICBRAINZ_ALBUMID'),
ASFStorageStyle('MusicBrainz/Album Id'),
)
- mb_artistid = MediaField(
- MP3DescStorageStyle... |
beetbox__mediafile-64 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mediafile.py:ListStorageStyle.get",
"mediafile.py:ListStorageStyle.get_list",
"mediafile.py:ListStorageStyle.fetch",
"mediafile.py:ListStorageStyle.set",
"mediafile.py:Li... | beetbox/mediafile | 809579c35488f105bd7d87ee9b2e240110402d39 | List fields don't return None if the tag doesn't exist
If a list tag does not exist, it returns an empty list rather than `None`, but if a non-list tag does not exist, `None` is returned.
I believe non-existent list tags should also return `None` so that this behavior is consistent. | diff --git a/.gitignore b/.gitignore
index 14035f2..29a33a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,6 +74,7 @@ target/
# virtualenv
venv/
ENV/
+.venv/
# Spyder project settings
.spyderproject
diff --git a/mediafile.py b/mediafile.py
index ca70c94..c834346 100644
--- a/mediafile.py
+++ b/mediafile.py
@@ -... |
beeware__briefcase-335 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/briefcase/__main__.py:main"
],
"edited_modules": [
"src/briefcase/__main__.py:main"
]
},
"file": "src/briefcase/__main__.py"
},
{
"changes": {
"added_... | beeware/briefcase | d482f16fea966665bd718c88e71f144f9c34b57b | Identify when XCode command line tools are missing, but XCode is installed
Hi,
Following the Hello World tutorial I got the error "Xcode is not installed." when trying to build the iOS version of the Hello World App. The problem turned out to be that Xcode does not by default install the command line tools and you h... | diff --git a/src/briefcase/__main__.py b/src/briefcase/__main__.py
index 48e5322e..1df57746 100644
--- a/src/briefcase/__main__.py
+++ b/src/briefcase/__main__.py
@@ -13,6 +13,11 @@ def main():
except BriefcaseError as e:
print(e, file=sys.stdout if e.error_code == 0 else sys.stderr)
result = e.e... |
behave__behave-991 | [
{
"changes": {
"added_entities": [
"behave/configuration.py:values_to_str",
"behave/configuration.py:decode_options",
"behave/configuration.py:format_outfiles_coupling",
"behave/configuration.py:read_configparser",
"behave/configuration.py:read_toml"
],
... | behave/behave | 234c32eae95d4393b242c6d5789afd9a299b5cc3 | pyproject.toml (PEP 518) support
Hi! Is there a plan to support `pyproject.toml` from [PEP 518](https://www.python.org/dev/peps/pep-0518/)?
Specifically, it would be nice if `behave` could understand `[tool.behave]` section in the `pyproject.toml` file like other python libraries do (e.g. `black`, `coverage`, `isort... | diff --git a/behave.ini b/behave.ini
index 379b90e..30f7e56 100644
--- a/behave.ini
+++ b/behave.ini
@@ -1,7 +1,7 @@
# =============================================================================
# BEHAVE CONFIGURATION
# =============================================================================
-# FILE: .behaver... |
belm0__perf-timer-4 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/perf_timer/_impl.py:_PerfTimerBase.__init__"
],
"edited_modules": [
"src/perf_timer/_impl.py:_PerfTimerBase"
]
},
"file": "src/perf_timer/_impl.py"
}
] | belm0/perf-timer | 9d7dc00f9ffe1ed436215835bdd8a8fa0d52e54b | `time.thread_time` is not available on some OS X builds
It appears `time.thread_time` is not available on mac os (https://bugs.python.org/issue32093) and thus trying to use this package will raise `ImportError` 😢
```python-traceback
---------------------------------------------------------------------------
Impor... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f01fb66..3c73103 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Release history
+## perf-timer (pending)
+### Fixed
+- handle absence of `time.thread_timer()` gracefully. This timer, which is the
+ default used by `ThreadPerfTimer`, may not be availab... |
benbusby__whoogle-search-1087 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"app/utils/results.py:get_site_alt"
],
"edited_modules": [
"app/utils/results.py:get_site_alt"
]
},
"file": "app/utils/results.py"
}
] | benbusby/whoogle-search | cdf0b50284e7843c26119ed7ac949256369207a1 | validators package is missing from dependencies
**Describe the bug**
When installing the app into a dedicated venv (e.g. using `pipx`), it fails to start up, producing an error instead.
**To Reproduce**
Steps to reproduce the behavior:
1. [Install the app using `pipx`](https://github.com/benbusby/whoogle-search/#... | diff --git a/app/utils/results.py b/app/utils/results.py
index 42654e9..c78f866 100644
--- a/app/utils/results.py
+++ b/app/utils/results.py
@@ -12,7 +12,7 @@ import re
import warnings
SKIP_ARGS = ['ref_src', 'utm']
-SKIP_PREFIX = ['//www.', '//mobile.', '//m.', 'www.', 'mobile.', 'm.']
+SKIP_PREFIX = ['//www.', '/... |
benbusby__whoogle-search-1092 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"app/utils/results.py:get_site_alt"
],
"edited_modules": [
"app/utils/results.py:get_site_alt"
]
},
"file": "app/utils/results.py"
}
] | benbusby/whoogle-search | cdf0b50284e7843c26119ed7ac949256369207a1 | [BUG] Broken site alts for some urls due to bad skip_prefix logic
**Describe the bug**
When using site_alts with certain patterns like for eg: "endswithm.net" , the replaced url is incorrect. for eg: reddit links are replaced with "endswith//net" instead of "endswithm.net"
**To Reproduce**
Steps to reproduce the b... | diff --git a/app/utils/results.py b/app/utils/results.py
index 42654e9..c78f866 100644
--- a/app/utils/results.py
+++ b/app/utils/results.py
@@ -12,7 +12,7 @@ import re
import warnings
SKIP_ARGS = ['ref_src', 'utm']
-SKIP_PREFIX = ['//www.', '//mobile.', '//m.', 'www.', 'mobile.', 'm.']
+SKIP_PREFIX = ['//www.', '/... |
benjamincorcoran__sasdocs-71 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sasdocs/parsers.py"
}
] | benjamincorcoran/sasdocs | 070be3860839af8cef2e6028b955e6583a8b491d | Macro arguments don't resolve paths | diff --git a/sasdocs/parsers.py b/sasdocs/parsers.py
index 6bbf1bf..11ff742 100644
--- a/sasdocs/parsers.py
+++ b/sasdocs/parsers.py
@@ -17,6 +17,9 @@ wrd = ps.regex(r'[a-zA-Z0-9_\-]+')
# FilePath: String terminating in a quote (used only for include and libname)
fpth = ps.regex(r'[^\'"]+')
+# QuotedString:
+qstr =... |
benmaier__binpacking-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"binpacking/to_constant_bin_number.py:to_constant_bin_number"
],
"edited_modules": [
"binpacking/to_constant_bin_number.py:to_constant_bin_number"
]
},
"file": "binpacki... | benmaier/binpacking | 6f02918376c2aadabdb0adc2e854bfadb2f45bba | Lambda key for lists
It would be improve usability if we could pass in a lambda to retrieve the weight. The usage would be something like
```
a = [{'name': 'foo', 'weight': 30},
{'name': 'bar', 'weight': 10}]
binpacking.to_constant_volume(a, key=lambda x: x['weight'], 30)
```
This would also eliminated t... | diff --git a/binpacking/to_constant_bin_number.py b/binpacking/to_constant_bin_number.py
index dee0746..d189a3e 100644
--- a/binpacking/to_constant_bin_number.py
+++ b/binpacking/to_constant_bin_number.py
@@ -15,7 +15,7 @@ def csv_to_constant_bin_number(filepath,weight_column,N_bin,has_header=False,del
save_csvs(b... |
benmaier__binpacking-16 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"binpacking/to_constant_volume.py:to_constant_volume"
],
"edited_modules": [
"binpacking/to_constant_volume.py:to_constant_volume"
]
},
"file": "binpacking/to_constant_v... | benmaier/binpacking | 89166e3574d25068278c5f7d82b279fbba3bcc4b | Additional empty bin returned when all values exceed bin size
When using `to_constant_volume` if all given values exceed the bin size, then an additional empty bin is returned.
Examples:
# input 1
values = [24, 42]
bins = to_constant_volume(values, 20)
# output 1
bins = [[], [42], [2... | diff --git a/.gitignore b/.gitignore
index b48773d..8a9883a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,10 @@
# Python egg metadata, regenerated from source files by setuptools.
/*.egg-info
+# Python virtual environment
+.venv
+
+# JetBrains project
+.idea
+
.DS_Store
diff --git a/binpacking/to_constant_... |
benmoran56__esper-81 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"esper/__init__.py:World.create_entity",
"esper/__init__.py:World.add_component"
],
"edited_modules": [
"esper/__init__.py:World"
]
},
"file": "esper/__init__.py... | benmoran56/esper | c413eccd6eae12556d0fbad48298f259b6c7ea7b | `World().create_entity()` does not create entity if no components are given
**Describe the bug**
As a factory method I assume it creates entity for sure but that do not happen is edge case of missing components.
**To Reproduce**
```python3
import esper
world = esper.World()
entity = world.create_entity()
ass... | diff --git a/esper/__init__.py b/esper/__init__.py
index c67b5dd..5ac17a7 100644
--- a/esper/__init__.py
+++ b/esper/__init__.py
@@ -215,6 +215,9 @@ class World:
entity = self._next_entity_id
+ if entity not in self._entities:
+ self._entities[entity] = {}
+
for component_instanc... |
benmoran56__esper-83 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"esper/__init__.py:World.remove_component"
],
"edited_modules": [
"esper/__init__.py:World"
]
},
"file": "esper/__init__.py"
}
] | benmoran56/esper | b9aee53bada68d6da73fbca3a6c5114f98620278 | `remove_component()` method removes entity if no more components left
**Describe the bug**
As for Single Responsibility Principle remove component should do just that but it removes empty entity as well.
As I'm creating tests for my own project, I need to populate entity with some dummy component to prevent that and ... | diff --git a/esper/__init__.py b/esper/__init__.py
index 5ac17a7..1c843e7 100644
--- a/esper/__init__.py
+++ b/esper/__init__.py
@@ -1,7 +1,9 @@
+import inspect as _inspect
import time as _time
from types import MethodType as _MethodType
+from typing import cast as _cast
from typing import Iterable as _Iterable
... |
bentoml__BentoML-3873 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"examples/custom_runner/torch_hub_yolov5/service.py:Yolov5Runnable.__init__"
],
"edited_modules": [
"examples/custom_runner/torch_hub_yolov5/service.py:Yolov5Runnable"
]
},
... | bentoml/BentoML | e221dc5e0c0b59238b720c04ace4fc5ba0f6f459 | feature: Support for Dict of Tensors in production mode
### Feature request
When running `serve --production`, the invocation to `runner.async_run()` goes through an instance of `DataContainer` according to the input type. If you have a PyTorch model and passes as input a `torch.Tensor`, it will be serialized using `P... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3e342c33..a0b9ccb9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,7 +73,7 @@ jobs:
run: |
npm install -g npm@^7 pyright
- name: Setup bufbuild/buf
- uses: bufbuild/buf-setup-action@v1.18... |
bentoml__BentoML-5084 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/_bentoml_sdk/service/dependency.py:Dependency.close"
],
"edited_modules": [
"src/_bentoml_sdk/service/dependency.py:Dependency"
]
},
"file": "src/_bentoml_sdk/servi... | bentoml/BentoML | 49fd615a091b3bdb979de5579ccb1ff7175ec4a6 | bug: `AttributeError`: `close()` called on Service dependency in `TestClient`
### Describe the bug
Hi,
I am encountering `AttributeError` when using `TestClient` due to `close` being called on service dependencies. Below is the reproducible example.
In the documentation, a simple service is demoed. But this do... | diff --git a/docs/source/use-cases/index.rst b/docs/source/use-cases/index.rst
index 0ca6ea6a..ddac9be9 100644
--- a/docs/source/use-cases/index.rst
+++ b/docs/source/use-cases/index.rst
@@ -66,6 +66,7 @@ Advanced examples:
- `LLM safety: ShieldGemma <https://github.com/bentoml/BentoShield/>`_
- `RAG: LlamaIndex <htt... |
berkerpeksag__astor-103 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"astor/code_gen.py:SourceGenerator.visit_Str"
],
"edited_modules": [
"astor/code_gen.py:SourceGenerator"
]
},
"file": "astor/code_gen.py"
}
] | berkerpeksag/astor | b47718fa095e456c064d3d222f296fccfe36266b | Test failure in Python 3.6.3
Looks like a test-only failure, though.
```
======================================================================
FAIL: test_convert_stdlib (tests.test_rtrip.RtripTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
F... | diff --git a/.travis.yml b/.travis.yml
index df42c87..f789743 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ python:
- 3.5
- 3.6
- pypy
- - pypy3.3-5.2-alpha1
+ - pypy3.5
- 3.7-dev
matrix:
allow_failures:
diff --git a/AUTHORS b/AUTHORS
index 39d96d5..9949ccc 100644
--- a/AUTHORS
+++ b/AUTH... |
berkerpeksag__astor-104 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"astor/code_gen.py:SourceGenerator.visit_Num"
],
"edited_modules": [
"astor/code_gen.py:SourceGenerator"
]
},
"file": "astor/code_gen.py"
}
] | berkerpeksag/astor | f87ae3b55f9ea403b4c04fb6cd9b0ab675aaa496 | Can't generate code containing ast.Num(NaN)
Somewhat related to #82, the `codegen` of astor 0.5 would produce `nan` if given a `Num` node that contained NaN. In astor 0.6, the following raises an `AssertionError` in code_gen.py:
```py
import ast, astor
nan = 1e1000 - 1e1000
print(astor.code_gen.to_source(
... | diff --git a/.travis.yml b/.travis.yml
index e6362f4..c0e59fa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,18 +1,13 @@
sudo: false # run travis jobs in containers
language: python
python:
- - 2.6
- 2.7
- - 3.3
- 3.4
- 3.5
- 3.6
- pypy
- pypy3.5
- 3.7-dev
-matrix:
- allow_failures:
- - p... |
berkerpeksag__astor-112 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"astor/code_gen.py:SourceGenerator.visit_Set"
],
"edited_modules": [
"astor/code_gen.py:SourceGenerator"
]
},
"file": "astor/code_gen.py"
}
] | berkerpeksag/astor | 991e6e9436c2512241e036464f99114438932d85 | code_gen represents an empty set as an empty dictionary
python -c 'import ast, astor; print(astor.code_gen.to_source(ast.Set([])))'
{}
Since Python has no literal syntax for the empty set, and we can't use `set()` because the name `set` might be rebound, I think the right representation is `{1}.__class__()`... | diff --git a/astor/code_gen.py b/astor/code_gen.py
index ecaf388..157d2cc 100644
--- a/astor/code_gen.py
+++ b/astor/code_gen.py
@@ -663,8 +663,14 @@ class SourceGenerator(ExplicitNodeVisitor):
self.comma_list(node.elts)
def visit_Set(self, node):
- with self.delimit('{}'):
- self.... |
berkerpeksag__astor-114 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "astor/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"astor/code_gen.py:... | berkerpeksag/astor | 1f3574184768e191910c2a65df3e247728eae6de | Allow registering new `visit_xxx` for `SourceGenerator`
I ran into an issue where I defined a custom `AST` node, and when I tried rendering the source with `astor.to_source(node)`, it crashed saying `No defined handler for node of type xxx`.
I understand that `astor` would not know how to render some unknown `AST` n... | diff --git a/astor/__init__.py b/astor/__init__.py
index 3d30a94..481af3c 100644
--- a/astor/__init__.py
+++ b/astor/__init__.py
@@ -11,7 +11,7 @@ Copyright 2013 (c) Berker Peksag
import warnings
-from .code_gen import to_source # NOQA
+from .code_gen import SourceGenerator, to_source # NOQA
from .node_util imp... |
berkerpeksag__astor-121 | [
{
"changes": {
"added_entities": [
"astor/code_gen.py:SourceGenerator.visit_Constant",
"astor/code_gen.py:SourceGenerator._handle_string_constant",
"astor/code_gen.py:SourceGenerator._handle_numeric_constant"
],
"added_modules": null,
"edited_entities": [
... | berkerpeksag/astor | c72349f3153134d5cb0161add9f4ed4b75d0a7c4 | Support for Python 3.6 Constant nodes
In Python 3.6, the new [`ast.Constant`](https://docs.python.org/3/whatsnew/3.6.html#ast) node was introduced, ostensibly for the purposes of constant folding. However, in [Python 3.8](https://docs.python.org/3.8/whatsnew/3.8.html#deprecated), it appears that it is being used to rep... | diff --git a/AUTHORS b/AUTHORS
index 80996f7..831dc6b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -15,3 +15,4 @@ And with some modifications based on Armin's code:
* Radomír Bosák <radomir.bosak@gmail.com>
* Kodi Arfer <git@arfer.net>
* Felix Yan <felixonmars@archlinux.org>
+* Chris Rink <chrisrink10@gmail.com>
diff --git... |
berkerpeksag__astor-125 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"astor/code_gen.py:SourceGenerator.visit_Str"
],
"edited_modules": [
"astor/code_gen.py:SourceGenerator"
]
},
"file": "astor/code_gen.py"
}
] | berkerpeksag/astor | 55dd323f7d8d696610c703c0296763c567685c31 | New fstring failures
I'm not sure how to handle this one, so I did not submit a PR yet.
Source (from Python 3.7's dataclasses.py):
`f"{f.name}={{self.{f.name}!r}}"`
Parsed as:
```
JoinedStr(
values=[
FormattedValue(value=Attribute(value=Name(id='f'), attr='name'), conversion=-1, format_spec=None)... | diff --git a/.travis.yml b/.travis.yml
index 221a0c7..f5a2cb8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,6 +14,11 @@ matrix:
- python: 3.7
sudo: required
dist: xenial
+ - python: 3.8-dev
+ sudo: required
+ dist: xenial
+ allow_failures:
+ - python: 3.8-dev
cache: pip
install:
- pip ins... |
berkerpeksag__astor-134 | [
{
"changes": {
"added_entities": [
"astor/code_gen.py:SourceGenerator.visit_NamedExpr"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"astor/code_gen.py:SourceGenerator"
]
},
"file": "astor/code_gen.py"
},
{
"changes": {... | berkerpeksag/astor | 262250578230436b288995b3ddf431209633573b | Support Python 3.8 assignment expressions in code_gen
python3 -c 'import ast, astor; print(astor.code_gen.to_source(ast.parse("(a := b)", mode="eval")))'
…
AttributeError: No defined handler for node of type NamedExpr
See [PEP 574](https://www.python.org/dev/peps/pep-0572). | diff --git a/astor/code_gen.py b/astor/code_gen.py
index 9b9c1ea..d79484b 100644
--- a/astor/code_gen.py
+++ b/astor/code_gen.py
@@ -741,6 +741,22 @@ class SourceGenerator(ExplicitNodeVisitor):
for op, right in zip(node.ops, node.comparators):
self.write(get_op_symbol(op, ' %s '), right)
... |
berkerpeksag__astor-88 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "astor/__init__.py"
}
] | berkerpeksag/astor | abdd707e215d57178aae5ea2dd7a8ffe327ef272 | Suspected API breakage from 0.6 to 0.6.1
Hi, our builds started failing with `AttributeError: module 'astor' has no attribute 'codegen'`:
https://travis-ci.org/google/tangent/jobs/300437272
I wonder if it's related to the new 0.6.1 release? | diff --git a/.travis.yml b/.travis.yml
index 419cb0e..64bedd8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,6 +9,9 @@ python:
- 3.6
- pypy
- pypy3.3-5.2-alpha1
+matrix:
+ allow_failures:
+ - python: 2.6
cache: pip
install:
- pip install tox-travis
diff --git a/astor/__init__.py b/astor/__init__.py
in... |
bespokelabsai__curator-349 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/bespokelabs/curator/request_processor/base_request_processor.py:BaseRequestProcessor.run"
],
"edited_modules": [
"src/bespokelabs/curator/request_processor/base_request_processor... | bespokelabsai/curator | 41a6f3974090857dfb615962e00f09e3e0505142 | Batch progress bar is sometimes confusing
The reason why it looks like it is hanging is because the progress bar shows the # of completed requests are reported by OpenAI in each batch. However, the batch often spends a lot of time in the 'finalizing' status before it is ready to actually download. So the program shows... | diff --git a/src/bespokelabs/curator/request_processor/base_request_processor.py b/src/bespokelabs/curator/request_processor/base_request_processor.py
index ad7bf91..dbfc8fe 100644
--- a/src/bespokelabs/curator/request_processor/base_request_processor.py
+++ b/src/bespokelabs/curator/request_processor/base_request_proc... |
betamaxpy__betamax-170 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/betamax/cassette/interaction.py:Interaction.replace_in_headers",
"src/betamax/cassette/interaction.py:Interaction.replace_in_body",
"src/betamax/cassette/interaction.py:Interaction.r... | betamaxpy/betamax | 316eb978a7e8d1c318a5ab8eb7230763c18b6c3b | A blank string used for placeholder replacement can cause memory issue
**Version: betamax-0.8.0**
If you define a placeholder as described in the following, it can lead to memory issues, depending on how many blank strings you're trying to replace.
```python
username = ''
config.define_cassette_placeholder('<US... | diff --git a/src/betamax/cassette/interaction.py b/src/betamax/cassette/interaction.py
index f545bdb..799a8d5 100644
--- a/src/betamax/cassette/interaction.py
+++ b/src/betamax/cassette/interaction.py
@@ -69,6 +69,8 @@ class Interaction(object):
self.replace(*placeholder.unpack(serializing))
def rep... |
betamaxpy__betamax-179 | [
{
"changes": {
"added_entities": [
"src/betamax/configure.py:Configuration.after_start",
"src/betamax/configure.py:Configuration.before_stop"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/betamax/configure.py:Configuration"
... | betamaxpy/betamax | 4009d74d0642fbc42a49ef2f27d16387711192e4 | Interest in additional hooks?
A recently merged change in [PRAW](/praw-dev/praw) (which uses Betamax for its integration tests) hacks in an "after init" hook:
```python
def add_init_hook(original_init):
"""Wrap an __init__ method to also call some hooks."""
@wraps(original_init)
def wrapper(self, *... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 8bbdd19..078debf 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -19,3 +19,4 @@ Contributors
- Marc Abramowitz (@msabramo)
- Bryce Boe <bbzbryce@gmail.com> (@bboe)
- Alex Richard-Hoyling <@arhoyling)
+- Joey RH <jarhill0@gmail.com> (@jarhill0)
diff --git a/docs/source/confi... |
betodealmeida__shillelagh-379 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shillelagh/adapters/api/gsheets/fields.py:GSheetsString.quote"
],
"edited_modules": [
"src/shillelagh/adapters/api/gsheets/fields.py:GSheetsString"
]
},
"file": "sr... | betodealmeida/shillelagh | a0d1dcd2d5dbb2b4dfd38de37bf2793fa0347a36 | Comparison with empty string throws Invalid query: NO_COLUMN: null
**Describe the bug**
Comparison with empty string throws Invalid query: NO_COLUMN: null (at least for Google Sheets sources)
**To Reproduce**
Take the query from the README:
```
SELECT country, SUM(cnt)
FROM "https://docs.google.com/spreadshee... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 7ea20a8..1dab8f1 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,7 @@ Next
====
- Fix unneeded error when an operators is not supported by adapter (#378)
+- Fix comparison to empty strings in GSheets (#379)
Version 1.2.6 - 2023-07-20
===================... |
bhrutledge__zkeys-5 | [
{
"changes": {
"added_entities": [
"src/zkeys.py:Keybinding.character",
"src/zkeys.py:Keybinding.prefix_comparison",
"src/zkeys.py:Keybinding.widget_comparison",
"src/zkeys.py:group_by_widget",
"src/zkeys.py:group_by_prefix",
"src/zkeys.py:sort_by_in_string"... | bhrutledge/zkeys | e1a8fa973746fe10b99d0126dc0690c053f20ba8 | Refactor `main()` into functions for each option
i.e., instead of embedding the logic in the `if ...` clause. This will make it more testable, and potentially allow for use as a library. | diff --git a/src/zkeys.py b/src/zkeys.py
index 58a93c9..5c8d203 100644
--- a/src/zkeys.py
+++ b/src/zkeys.py
@@ -13,6 +13,69 @@ except metadata.PackageNotFoundError: # pragma: no cover
__version__ = "unknown"
+@dataclass
+class Keybinding:
+ """
+ Map an in-string like '^[b' to a ZLE widget like 'backwa... |
bids-standard__pybids-1016 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/index.py:BIDSLayoutIndexer._index_metadata"
],
"edited_modules": [
"bids/layout/index.py:BIDSLayoutIndexer"
]
},
"file": "bids/layout/index.py"
}
] | bids-standard/pybids | 3dac64faeae154989222cf1a846ffb02f2322ccb | BUG: null metadata results in indexing failure
```python
sdcflows/conftest.py:39: in <module>
layouts = {
sdcflows/conftest.py:40: in <dictcomp>
p.name: BIDSLayout(str(p), validate=False, derivatives=True)
/usr/share/miniconda/envs/test/lib/python3.10/site-packages/bids/layout/layout.py:177: in __init__
... | diff --git a/bids/layout/index.py b/bids/layout/index.py
index 62cbec26..38800d0e 100644
--- a/bids/layout/index.py
+++ b/bids/layout/index.py
@@ -465,6 +465,10 @@ class BIDSLayoutIndexer:
# Create Tag <-> Entity mappings, and any newly discovered Entities
for md_key, md_val in file_md.items... |
bids-standard__pybids-1034 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/models.py:Tag._init_on_load"
],
"edited_modules": [
"bids/layout/models.py:Tag"
]
},
"file": "bids/layout/models.py"
}
] | bids-standard/pybids | 8fb92fa748f518404a0f22d3e856f9abb5f21ada | All False boolean metadata fields are changed to True
I've noticed that False metadata fields are being changed to True when I use `get_metadata()`. I've noticed this in `0.16.3` and the current master (`0.16.3.post0.dev27`) on Python 3.9.17, but I haven't checked previous versions.
To create the test dataset:
``... | diff --git a/bids/layout/models.py b/bids/layout/models.py
index 4221ab3c..5120db7a 100644
--- a/bids/layout/models.py
+++ b/bids/layout/models.py
@@ -698,6 +698,9 @@ class Tag(Base):
if self._dtype == 'json':
self.value = json.loads(self._value)
self.dtype = 'json'
+ elif self... |
bids-standard__pybids-1087 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/index.py:BIDSLayoutIndexer._index_dir"
],
"edited_modules": [
"bids/layout/index.py:BIDSLayoutIndexer"
]
},
"file": "bids/layout/index.py"
}
] | bids-standard/pybids | 95c7aa942d982685a0f22daa3951b4ccc692bdd6 | Layout does not follow symbolic links to directories in pybids>=0.17.0
In 0.16.5, I can use symbolic links to create a virtual dataset for a single subject
```bash
virtualDataset=/tmp/virtualDataset
ln -s /data/realDataset/dataset_description.json ${virtualDataset}
ln -s /data/realDataset/sub-01 ${virtualDataset}... | diff --git a/bids/layout/index.py b/bids/layout/index.py
index 31663b2d..8f163228 100644
--- a/bids/layout/index.py
+++ b/bids/layout/index.py
@@ -207,6 +207,21 @@ class BIDSLayoutIndexer:
# Get lists of 1st-level subdirectories and files in the path directory
_, dirnames, filenames = next(path.fs.wal... |
bids-standard__pybids-306 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.add_derivatives"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | 12c8e2bc445296086905cb8c46f64ae05ce08b3c | Dynamic getters & entities from derivative layouts are not propagated to main Layout
Let's say I load a dataset with an fmriprep derivative in `derivatives/`
```
layout = BIDSLayout('/my/dataset', derivatives=True)
```
`layout.entities` will only list `bids.` entities, not any from `derivatives`
so in turn `la... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index bdf9b99e..0861258c 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -4,11 +4,11 @@ import warnings
from io import open
from .validation import BIDSValidator
from grabbit import Layout, File
-from grabbit.external import six
+from grabb... |
bids-standard__pybids-326 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/variables/io.py:_load_time_variables",
"bids/variables/io.py:_load_tsv_variables"
],
"edited_modules": [
"bids/variables/io.py:_load_time_variables",
"bids/varia... | bids-standard/pybids | 71211ac0247547e276b5cd53159d03a4ff97dbc6 | [Analysis] Higher-level entities are more promiscuous than first-level
Following #319, we now get a lot of entities out of `get_contrast()`, e.g. `{'datatype': 'func', 'desc': 'preproc', 'space': 'MNI152NLin2009cAsym', 'suffix': 'bold', 'task': 'bart'}`.
However, this is only true at the second level and higher. At ... | diff --git a/bids/variables/io.py b/bids/variables/io.py
index 9e65f666..d35c3209 100644
--- a/bids/variables/io.py
+++ b/bids/variables/io.py
@@ -201,7 +201,7 @@ def _load_time_variables(layout, dataset=None, columns=None, scan_length=None,
# Add in all of the run's entities as new columns for... |
bids-standard__pybids-327 | [
{
"changes": {
"added_entities": [
"bids/layout/layout.py:BIDSLayout.get_tr"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | 36853b0bf222d3174ae7d9d1d9c7a7ecf5049cdd | Add Analysis.get_tr() API
Currently, querying the TR is somewhat convoluted (see https://github.com/bids-standard/pybids/issues/124#issuecomment-439104593). A simple high-level API could be:
```Python
class Analysis:
def get_tr(self, **selectors):
all_trs = some_query(**selectors)
unique_trs ... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index c7624631..4407b03a 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -546,6 +546,37 @@ class BIDSLayout(Layout):
fieldmap_set.append(cur_fieldmap)
return fieldmap_set
+ def get_tr(self, derivatives=False,... |
bids-standard__pybids-328 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.get"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | 36853b0bf222d3174ae7d9d1d9c7a7ecf5049cdd | Warn or error on misspecified (or changed due to pybids changes) target value
Going through the tutorial I saw that
```python
# See all modality labels in this dataset
layout.get(return_type='id', target='modality')
```
is no longer producing any output (well - returns an empty list) although before was reporting... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index c7624631..0e4874b7 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -397,6 +397,18 @@ class BIDSLayout(Layout):
else:
md_kwargs[k] = v
+ # Provide some suggestions if target is specified and invalid.... |
bids-standard__pybids-427 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.add_derivatives"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | 169e51bb62fb81185a2ba9e13fffe4d7b7377d14 | Derivatives indexing fails silently for deriv directories that lack a `dataset_description.json` file
I have a set of derivatives files that look like this:
derivatives/rt/sub-02/func/sub-02_task-dts_meanRT.tsv
they seem to pass the validator fine, but I get nothing when I use .get(scope='derivatives'):
```
I... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index bf6319e4..e9f9e8cc 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -6,6 +6,7 @@ from io import open
from functools import reduce, partial
from itertools import chain
import copy
+import warnings
from bids_validator import BIDSValid... |
bids-standard__pybids-467 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "bids/layout/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/... | bids-standard/pybids | 9c2c5cf7788d7973736027809b76f567a3652eed | Improved reprs for SQLAlchemy model objects
This should help provide more useful exception messages for obscure SQLAlchemy error conditions. And just be generally more readable in a REPL.
Related to #465. | diff --git a/.travis.yml b/.travis.yml
index 54d01918..aefb43c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,7 +12,6 @@ env:
global:
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af5... |
bids-standard__pybids-488 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "bids/utils.py"
},
{
"changes": {
"added_entities": [
"bids/variables/entities.py:NodeIndex.create_node"
],
"added_modules": ... | bids-standard/pybids | 15aa08fb2b146e3fcc62f359ea4a4d810d38591a | get_collections fails when meta-data includes lists
For me this error occurs when:
```
bids_analysis = Analysis(bids_layout, model)
bids_analysis.setup(**entities)
```
`TypeError: unhashable type: 'list'`
Looking at the traceback:
```
collections = self.layout.get_collections(self.level, drop_na=drop_na... | diff --git a/bids/utils.py b/bids/utils.py
index fe078847..0bb16c44 100644
--- a/bids/utils.py
+++ b/bids/utils.py
@@ -1,6 +1,5 @@
import re
import os
-from .external import six
def listify(obj):
diff --git a/bids/variables/entities.py b/bids/variables/entities.py
index 34061704..a381705a 100644
--- a/bids/varia... |
bids-standard__pybids-492 | [
{
"changes": {
"added_entities": [
"bids/layout/layout.py:BIDSLayout._sanitize_query_dtypes"
],
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout._build_file_query"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
... | bids-standard/pybids | 15aa08fb2b146e3fcc62f359ea4a4d810d38591a | layout.get doesn't find any entities when passed a numpy.int64 value for run
When doing a `layout.get()`, if the type of the run argument is np.int64, it fails to find any entities. Here's a minimal reproduction using pybids test data:
```
In [1]: from os.path import join
...: from bids.analysis import Analysi... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index 32cf3c03..b00336ea 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -381,6 +381,25 @@ class BIDSLayout(object):
layouts = [l for l in collect_layouts(self) if l._in_scope(scope)]
return list(set(layouts))
+ def _san... |
bids-standard__pybids-496 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.build_path",
"bids/layout/layout.py:BIDSLayout.write_contents_to_file"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
... | bids-standard/pybids | 6751eec043d0d0426159ebede8d7b6020c8de6ac | ``build_path`` should check entity values
From the tutorial:
```Python
>>> entities = {
>>> 'subject': '01',
>>> 'run': 2,
>>> 'task': 'n-back',
>>> 'extension': 'tsv.gz',
>>> 'suffix': 'stim'
>>> }
>>> layout.build_path(entities)
'sub-01/func/sub-01_task-n-back_run-2_stim.tsv.gz'
```
(s... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index b00336ea..2d9aede8 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -12,6 +12,7 @@ import sqlite3
import sqlalchemy as sa
from sqlalchemy.orm import joinedload
+from bids_validator import BIDSValidator
from ..utils import listify, ... |
bids-standard__pybids-511 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout._build_file_query"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | 1431df11a7748848f6c4170f19211321ab0c4b9f | combination of regex_search and run makes sql barf
This looks like a fun one.
The code worked in 0.9.3, but is broken in 0.9.4.
If you change the line in the binder notebook from:
```
# Retrieve filenames of all BOLD runs for subject 01
layout.get(subject='01', extension='nii.gz', suffix='bold', return_type='fil... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index d274f2f6..bd5a7e09 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -829,7 +829,7 @@ class BIDSLayout(object):
val_clause = sa.or_(*[Tag._value.op('REGEXP')(str(v))
f... |
bids-standard__pybids-540 | [
{
"changes": {
"added_entities": [
"bids/layout/layout.py:BIDSLayout._make_db_paths",
"bids/layout/layout.py:BIDSLayout._sanitize_instance_args"
],
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.__init__",
"bids/layout/layout... | bids-standard/pybids | 476cd2c52fbb05622a53e981f50ebeaf494b1614 | Collect database files into a single zipped file
Writing database files for derivatives to the respective database directories is not ideal because it adds a non-bids file to the directory and because the layout database file may not be the entire derivatives directory based on ignore and force_index options. As a solu... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index 76afc01e..9b5d84df 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -10,6 +10,7 @@ import copy
import warnings
import sqlite3
import enum
+from pathlib import Path
import sqlalchemy as sa
from sqlalchemy.orm import joinedload
@@ -1... |
bids-standard__pybids-541 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "bids/analysis/transformations/__init__.py"
},
{
"changes": {
"added_entities": [
"bids/analysis/transformations/base.py:Transformation._... | bids-standard/pybids | 92193ff8553b8235087bb062d44b6b018e621b19 | Allow wildcard names for model variables
I'm trying to pass variable names to a bids model with wildcards like so:
"Model": {
"X": [
'stimulus_type.neutral_anticipation',
'stimulus_type.neutral_feedback',
'stimulus_type.loss_anticipa... | diff --git a/bids/analysis/transformations/__init__.py b/bids/analysis/transformations/__init__.py
index 2abaf33f..861332e8 100644
--- a/bids/analysis/transformations/__init__.py
+++ b/bids/analysis/transformations/__init__.py
@@ -1,7 +1,7 @@
from .compute import (Sum, Product, Scale, Orthogonalize, Threshold, And, Or... |
bids-standard__pybids-560 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/index.py:BIDSLayoutIndexer.index_metadata"
],
"edited_modules": [
"bids/layout/index.py:BIDSLayoutIndexer"
]
},
"file": "bids/layout/index.py"
}
] | bids-standard/pybids | 35e1296202959d375e570d08078282c26ad02bc0 | partial metadata indexing?
I'm curious if anyone has thoughts on partial metadata indexing if metadata indexing takes so long (I do not know if partial metadata indexing would even be helpful, depending on what's taking up the most time).
I patched [BIDSLayoutIndexer's index_metadata function](https://github.com/jdk... | diff --git a/bids/layout/index.py b/bids/layout/index.py
index 94fd675b..7dd92018 100644
--- a/bids/layout/index.py
+++ b/bids/layout/index.py
@@ -164,10 +164,32 @@ class BIDSLayoutIndexer(object):
"""Index all files in the BIDS dataset. """
self._index_dir(self.root, self.config)
- def index_met... |
bids-standard__pybids-607 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/models.py:BIDSImageFile.get_image"
],
"edited_modules": [
"bids/layout/models.py:BIDSImageFile"
]
},
"file": "bids/layout/models.py"
},
{
"changes":... | bids-standard/pybids | 5fab1dee770babffa7aef668b24cb59a90ba37ef | Add method to build BIDSReport from list of files
It would be nice to be able to build reports from lists of files, for tools that collect their inputs using custom functions, like fMRIPrep. In these cases, BIDSLayout filters are insufficient to collect the exact files required by the tools.
EDIT: I should also note... | diff --git a/bids/layout/models.py b/bids/layout/models.py
index 766edd14..9b1e0893 100644
--- a/bids/layout/models.py
+++ b/bids/layout/models.py
@@ -377,17 +377,15 @@ class BIDSImageFile(BIDSFile):
'polymorphic_identity': 'image_file'
}
- def get_image(self, **kwargs):
+ def get_image(self):
... |
bids-standard__pybids-610 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.get"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | c4d1f1f46c758e9f9b005eea2ccd6096459985cb | get silently ignores unknown keyword arguments (in my case `ses`)
I am "inside" one of the tests, and decided to get a sample file. To my surprise - I got multiple:
```
431 def test_derivative_getters():
432 synth_path = join(get_test_data_path(), 'synthetic')
433 bare_layout = BIDSLayout(synth_path,... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index e1acd6bd..5adba334 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -11,6 +11,7 @@ import warnings
import sqlite3
import enum
from pathlib import Path
+import difflib
import sqlalchemy as sa
from sqlalchemy.orm import joinedload
@@... |
bids-standard__pybids-611 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/models.py:BIDSDataFile.get_df"
],
"edited_modules": [
"bids/layout/models.py:BIDSDataFile"
]
},
"file": "bids/layout/models.py"
}
] | bids-standard/pybids | 5fab1dee770babffa7aef668b24cb59a90ba37ef | First line omitted when using get_df() method of BIDSDataFile object
Hi,
The method `get_df() `of the BIDSDataFile object omits the first line of the data file. This issue arises when calling the function `read_csv()` of Pandas, as header is set to 0 if no names are passed:
```
self.data = pd.read_csv(self.path,... | diff --git a/bids/layout/models.py b/bids/layout/models.py
index 766edd14..cd39426f 100644
--- a/bids/layout/models.py
+++ b/bids/layout/models.py
@@ -309,7 +309,7 @@ class BIDSDataFile(BIDSFile):
}
def get_df(self, include_timing=True, adjust_onset=False,
- enforce_dtypes=True):
+ ... |
bids-standard__pybids-612 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.get"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
]
},
"file": "bids/layout/layout.py"
}
] | bids-standard/pybids | 5fab1dee770babffa7aef668b24cb59a90ba37ef | layout.get(..., extension=bids.layout.Query.ANY) fails
`layout.get` assumes that the `extension` filter is a string or list of strings. We need to handle the `Query` options, as well as `None`.
```Python
~/Projects/bids-standard/pybids/bids/layout/layout.py in get(self, return_type, target, scope, regex_search, abs... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index 7ac52f6b..35cb0f61 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -897,27 +897,17 @@ class BIDSLayout(object):
-------
list of :obj:`bids.layout.BIDSFile` or str
A list of BIDSFiles (default) or strings (s... |
bids-standard__pybids-613 | [
{
"changes": {
"added_entities": [
"bids/layout/layout.py:BIDSLayout.write_to_file"
],
"added_modules": null,
"edited_entities": [
"bids/layout/layout.py:BIDSLayout.write_contents_to_file"
],
"edited_modules": [
"bids/layout/layout.py:BIDSLayout"
... | bids-standard/pybids | e7def429f161cc2cab7b9615905fefb039733a2f | BIDSFile.copy() does not work on binary files
I am running the following code as a test before I put it in a script. when I run it I get the following error:
```
x = BIDSLayout("/path/to/bids/directory", derivatives=True)
x.get()[2].copy(x.get()[2].filename,False,"/path/to/derivatives/directory","overwright")
... | diff --git a/bids/layout/layout.py b/bids/layout/layout.py
index b0d331d0..68b15648 100644
--- a/bids/layout/layout.py
+++ b/bids/layout/layout.py
@@ -19,7 +19,7 @@ from bids_validator import BIDSValidator
from ..utils import listify, natural_sort, make_bidsfile
from ..external import inflect
-from .writing import ... |
bids-standard__pybids-614 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/analysis/transformations/compute.py:Scale._transform"
],
"edited_modules": [
"bids/analysis/transformations/compute.py:Scale"
]
},
"file": "bids/analysis/transform... | bids-standard/pybids | c39e7df3081cd2f5e4bef8f2673729f086ffe347 | Scale transformation shouldn't return NAs in event of constant input
If constant input is passed to the `Scale` transformation, a column of N/A values is returned. This should probably just fail with an exception (or at minimum, return a column of `0`). | diff --git a/bids/analysis/transformations/compute.py b/bids/analysis/transformations/compute.py
index 80f6232f..4c06a354 100644
--- a/bids/analysis/transformations/compute.py
+++ b/bids/analysis/transformations/compute.py
@@ -138,9 +138,19 @@ class Scale(Transformation):
None, no replacement is performed. If ... |
bids-standard__pybids-649 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/analysis/transformations/base.py:Transformation._align_variables"
],
"edited_modules": [
"bids/analysis/transformations/base.py:Transformation"
]
},
"file": "bids/... | bids-standard/pybids | c62aea8990343093637df969be2a6ae2afe98aba | Transformation fails when output is different shape from inpus (even when its a new variable output)
A Neurosout user is attempting to apply an `And `operation. There is an issue here because the two variabels are temporally unaligned (different shapes), so the `And` transformation doesn't make sense, but the error py... | diff --git a/bids/analysis/transformations/base.py b/bids/analysis/transformations/base.py
index b1e1e1ea..45480171 100644
--- a/bids/analysis/transformations/base.py
+++ b/bids/analysis/transformations/base.py
@@ -41,10 +41,18 @@ class Transformation(metaclass=ABCMeta):
# no further changes will be committed.
... |
bids-standard__pybids-665 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/models.py:LayoutInfo._sanitize_init_args"
],
"edited_modules": [
"bids/layout/models.py:LayoutInfo"
]
},
"file": "bids/layout/models.py"
},
{
"chang... | bids-standard/pybids | 9904dd54dce1a6f33799f78b80fc9f4da92d8da6 | BIDSLayout arguments: Argument is not JSON serializable
In PR #647 there were changes to how the BIDSLayout is saved.
If one passes an argument to `BIDSLayout` that is not serializable, it will throw an errorr:
```
/opt/miniconda-latest/envs/neuro/lib/python3.6/json/encoder.py in default(self, o)
178 ... | diff --git a/bids/layout/models.py b/bids/layout/models.py
index 745885e3..fd6857cb 100644
--- a/bids/layout/models.py
+++ b/bids/layout/models.py
@@ -60,7 +60,7 @@ class LayoutInfo(Base):
kwargs['root'] = str(Path(kwargs['root']).absolute())
# Get abspaths
- if 'derivatives' in kwargs an... |
bids-standard__pybids-672 | [
{
"changes": {
"added_entities": [
"bids/analysis/analysis.py:Analysis.finalize",
"bids/analysis/analysis.py:Step.add_collections"
],
"added_modules": null,
"edited_entities": [
"bids/analysis/analysis.py:Analysis.setup",
"bids/analysis/analysis.py:Step.__... | bids-standard/pybids | 69f467cb8dab77bae3236b3607564330f764e567 | BIDS Analysis: Make selectors more specific
Currently, if I want to have an analysis run for subject 1, run 1 and subject 2 run 2, it's not possible as the following specified subject 1+2 runs 1+2, which totals 4 runs:
```
analysis.setup({'subject': [1, 2], 'run': [1, 2]})
```
Could we possibly allow lists of e... | diff --git a/bids/analysis/analysis.py b/bids/analysis/analysis.py
index 008a2860..7929781c 100644
--- a/bids/analysis/analysis.py
+++ b/bids/analysis/analysis.py
@@ -65,7 +65,7 @@ class Analysis(object):
step = Step(self.layout, index=i, **step_args)
self.steps.append(step)
- def setup(s... |
bids-standard__pybids-699 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/index.py:BIDSLayoutIndexer._index_metadata"
],
"edited_modules": [
"bids/layout/index.py:BIDSLayoutIndexer"
]
},
"file": "bids/layout/index.py"
},
{
... | bids-standard/pybids | 5747a18eedcf5650be56c70011f7fd50e8865f4f | get_associations method of BIDSFile has issue with inheritance
My test case with an event file with a json sidecar in same directory as well as another applicable sidecar at top level has get.associations only returning top level side car instead of both. Here is the code, I have attached the test BIDS dataset:
``... | diff --git a/bids/layout/index.py b/bids/layout/index.py
index fdc04340..c34e257d 100644
--- a/bids/layout/index.py
+++ b/bids/layout/index.py
@@ -360,7 +360,7 @@ class BIDSLayoutIndexer:
continue
# Create DB records for metadata associations
- js_file = payloads[-1][1]
+ ... |
bids-standard__pybids-705 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/layout/validation.py:validate_root"
],
"edited_modules": [
"bids/layout/validation.py:validate_root"
]
},
"file": "bids/layout/validation.py"
}
] | bids-standard/pybids | 5747a18eedcf5650be56c70011f7fd50e8865f4f | unclear validation error with dataset_description.json
A couple people have posted asking why their datasets could not be read (through fmriprep or mriqc), since the error message did not indicate which file was not formatted correctly.
example error message
```
json.decoder.JSONDecodeError: Expecting property nam... | diff --git a/bids/layout/validation.py b/bids/layout/validation.py
index 463058ed..05b0278e 100644
--- a/bids/layout/validation.py
+++ b/bids/layout/validation.py
@@ -79,9 +79,21 @@ def validate_root(root, validate):
else:
description = None
else:
- with open(target, 'r', encoding='utf... |
bids-standard__pybids-759 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "bids/modeling/transformations/__init__.py"
},
{
"changes": {
"added_entities": [
"bids/modeling/transformations/compute.py:Lag._transfor... | bids-standard/pybids | 652074841cc922d6042fc500b14aabe438d42404 | Lag transformation
Thinking of implementing Lag, since it's such a common transformation in practice.
----
Current docs:
> ### Lag(Input, Output=None):
> [TODO]
>
> Arguments:
> * Input(string, mandatory): The name of the variable to operate on.
> * Output (string, optional): the optional list of column ... | diff --git a/bids/modeling/transformations/__init__.py b/bids/modeling/transformations/__init__.py
index c2f03356..4d642384 100644
--- a/bids/modeling/transformations/__init__.py
+++ b/bids/modeling/transformations/__init__.py
@@ -1,5 +1,5 @@
from .compute import (Sum, Product, Scale, Orthogonalize, Threshold, And_, O... |
bids-standard__pybids-836 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/modeling/transformations/base.py:Transformation._setup",
"bids/modeling/transformations/base.py:Transformation.transform"
],
"edited_modules": [
"bids/modeling/transform... | bids-standard/pybids | 37dc6eadfdcfbbf61ad930710fb703a6b48cd49c | handling kwargs in loopable Transformations?
AFAICT the following is a valid Transformation:
```
{
"Name": "Assign",
"Input": ["response_time", "response_time", "response_time"],
"Target": ["pumps", "control_pumps", "cash"],
"Output": ["pumps_rt", "control_pumps_rt"... | diff --git a/bids/modeling/transformations/base.py b/bids/modeling/transformations/base.py
index 3c87f69f..85d5d1d2 100644
--- a/bids/modeling/transformations/base.py
+++ b/bids/modeling/transformations/base.py
@@ -91,6 +91,11 @@ class Transformation(metaclass=ABCMeta):
# be passed through as-is even if categorica... |
bids-standard__pybids-838 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bids/modeling/transformations/base.py:Transformation.transform"
],
"edited_modules": [
"bids/modeling/transformations/base.py:Transformation"
]
},
"file": "bids/modelin... | bids-standard/pybids | 5ea3103b6dada5d3fd02cdec7d6498817d76f366 | Convolve can return multiple regressors (not just one)
currently the implementation of Convolve assumes the hrf function returns an array with only one axis expected to have values. but if 'glover + derivatives' is included, I would expect two columns to be created (orig and orig_derivative). | diff --git a/bids/modeling/transformations/base.py b/bids/modeling/transformations/base.py
index 55588098..3c87f69f 100644
--- a/bids/modeling/transformations/base.py
+++ b/bids/modeling/transformations/base.py
@@ -313,8 +313,17 @@ class Transformation(metaclass=ABCMeta):
if self.output_suffix is not N... |
bids-standard__pybv-17 | [
{
"changes": {
"added_entities": [
"pybv/io.py:_chk_fmt",
"pybv/io.py:_chk_multiplexed",
"pybv/io.py:_optimize_channel_unit"
],
"added_modules": [
"pybv/io.py:_chk_fmt",
"pybv/io.py:_chk_multiplexed",
"pybv/io.py:_optimize_channel_unit"
],
... | bids-standard/pybv | f1c84c062b8f1e3596d63b331c5d205d5b9c109e | Support channel-specific scaling factors
The brainvision format allows each channel to have its own scaling factor, e.g.
```
; Each entry: Ch<Channel number>=<Name>,<Reference channel name>,<Resolution in "Unit">,<Unit>, Future extensions..
Ch1=Fp1,,0.2,µV
Ch2=Fp2,,6.5,nV
```
This is really useful with int16 ... | diff --git a/pybv/io.py b/pybv/io.py
index f89288a..1989c0e 100644
--- a/pybv/io.py
+++ b/pybv/io.py
@@ -16,15 +16,15 @@ from . import __version__
# ascii as future formats
supported_formats = {
- 'binary_float32' : 'IEEE_FLOAT_32', # noqa: E203
- 'binary_int16' : 'INT_16', # noqa: E203
+ 'binary_float... |
bids-standard__pybv-29 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pybv/io.py:write_brainvision",
"pybv/io.py:_write_vmrk_file"
],
"edited_modules": [
"pybv/io.py:write_brainvision",
"pybv/io.py:_write_vmrk_file"
]
},
"... | bids-standard/pybv | ae5ab65ab2819a3cb1e3643e631b1bba5ba198fe | potential indexing issue
Could it be that we have an indexing issue in our code?
BrainVision uses 1-based indexing for writing the events, whereas in Python and MNE-Python, we use 0-based indexing.
Now imagine a user passing `events`: https://github.com/bids-standard/pybv/blob/cf8aa9d6904149d68ad9d9500315db5e7856... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 4e671ea..48ace17 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -17,10 +17,12 @@ current
Changelog
~~~~~~~~~
+Add measurement date parameter to public API, by `Stefan Appelhoff`_ (`#29 <https://github.com/bids-standard/pybv/pull/29>`_)
Add bin... |
bids-standard__pybv-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pybv/io.py:write_brainvision",
"pybv/io.py:_write_vmrk_file",
"pybv/io.py:_optimize_channel_unit",
"pybv/io.py:_write_vhdr_file"
],
"edited_modules": [
"pybv/... | bids-standard/pybv | dadee0072cffd001be60e5ff9b67358b2811f900 | Set unit to microvolts
It seems like it is currently not possible to set the resolution and unit independently. As soon as `resolution <= -7` (which is `True` for the default), the unit is set to nV.
However, I just had a conversation with a BrainProducts developer regarding potential issues with the unit. Specifica... | diff --git a/README.rst b/README.rst
index cae8c4c..3e38712 100644
--- a/README.rst
+++ b/README.rst
@@ -95,7 +95,7 @@ collection of BrainVision files on disk.
# for further parameters see our API documentation in the docs
write_brainvision(data, sfreq, ch_names, fname, tmpdir, events,
- ... |
bids-standard__pybv-47 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pybv/io.py:write_brainvision",
"pybv/io.py:_chk_fmt",
"pybv/io.py:_chk_multiplexed",
"pybv/io.py:_optimize_channel_unit"
],
"edited_modules": [
"pybv/io.py:wr... | bids-standard/pybv | 76e8bea84d6594ca8e87f8fe367896167e43c641 | "Units" parameter is not checked for valid units.
Passing "μV" fails, because μ is https://www.compart.com/de/unicode/U+03BC, but only µ (https://www.compart.com/de/unicode/U+00B5) is supported in BV according to the spec.
Also passing nonsense like "sV" results in an ungraceful error.
, but not by the [biomedsheets](https://github.com/bihealth/biomedsheets) - used while running genomic pipeline.
```
Tue Feb 15 16:55:58 CET 2022
+ snappy-snake --printshellc... | diff --git a/biomedsheets/io_tsv/germline.py b/biomedsheets/io_tsv/germline.py
index 2214d46..9aa02c9 100644
--- a/biomedsheets/io_tsv/germline.py
+++ b/biomedsheets/io_tsv/germline.py
@@ -104,17 +104,7 @@ class GermlineTSVReader(BaseTSVReader):
optional_body_header_columns = ('seqPlatform', 'bioSample', 'testSamp... |
bihealth__biomedsheets-27 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"biomedsheets/shortcuts/germline.py:CohortBuilder.run"
],
"edited_modules": [
"biomedsheets/shortcuts/germline.py:CohortBuilder"
]
},
"file": "biomedsheets/shortcuts/ger... | bihealth/biomedsheets | 5c04b2d12232e6dd1c8998ef9b88419978524771 | InconsistentPedigreeException raised if father is missing
**Describe the bug**
In the case of incomplete families, InconsistentPedigreeException maybe raised incorrectly.
| diff --git a/HISTORY.rst b/HISTORY.rst
index 3958c1e..31e84e1 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -2,6 +2,13 @@
BioMed Sheets Changelog
=======================
+
+-----------------
+HEAD (unreleased)
+-----------------
+
+- Hotfix: fixed consistency check for Duo Cases (#26)
+
-------
v0.11.4
-------
d... |
bihealth__vcfpy-141 | [
{
"changes": {
"added_entities": [
"vcfpy/record.py:Record.update_calls"
],
"added_modules": null,
"edited_entities": [
"vcfpy/record.py:Record.__init__"
],
"edited_modules": [
"vcfpy/record.py:Record"
]
},
"file": "vcfpy/record.py"
}
] | bihealth/vcfpy | 01f9da999b5912364f15d8b685cee3a02a9cec54 | add FORMAT and calls to vcf?
vcfpy version: 0.13.2
Python version: 3.6
Operating System: Centos 7
### Question
I would like to modify a vcf (from Lofreq) that does not contain FORMAT or call columns in order for it to be accepted by Picard within the bcbio-nextgen framework.
I have tried like this but it do... | diff --git a/HISTORY.rst b/HISTORY.rst
index f3109ae..c20e5f3 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -5,6 +5,7 @@ History
HEAD
----
+- Adding ``Record.update_calls``.
- Making ``Record.{format,calls}`` use list when empty
v0.13.2 (2020-08-20)
diff --git a/vcfpy/record.py b/vcfpy/record.py
index 4c89104..... |
bimpression__sosw-53 | [
{
"changes": {
"added_entities": [
"sosw/components/helpers.py:trim_arn_to_name"
],
"added_modules": [
"sosw/components/helpers.py:trim_arn_to_name"
],
"edited_entities": null,
"edited_modules": null
},
"file": "sosw/components/helpers.py"
},
{
... | bimpression/sosw | d9e652977ca6564f366fcc3ab632ede547aeba94 | Scheduler: allow lambda_name in job to be ARN
If the passed in the job `lambda_name` (aka Labourer.id) is a full ARN trim it using regex to leave just the name. | diff --git a/sosw/components/helpers.py b/sosw/components/helpers.py
index 8d90320..76aef77 100644
--- a/sosw/components/helpers.py
+++ b/sosw/components/helpers.py
@@ -25,6 +25,7 @@ __all__ = ['validate_account_to_dashed',
'validate_list_of_words_from_csv_or_list',
'first_or_none',
... |
bimpression__sosw-88 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sosw/managers/ecology.py:EcologyManager.get_max_labourer_duration"
],
"edited_modules": [
"sosw/managers/ecology.py:EcologyManager"
]
},
"file": "sosw/managers/ecology.... | bimpression/sosw | ad7dc503c3482b3455e50d647553c2765d35e85f | Labourer: get_max_labourer_duration
Implement me.
Should receive this information from AWS API probably with DescribeFunction and cache this data in the Ecology Manager | diff --git a/sosw/managers/ecology.py b/sosw/managers/ecology.py
index dbe0fb5..14ff1e8 100644
--- a/sosw/managers/ecology.py
+++ b/sosw/managers/ecology.py
@@ -31,8 +31,7 @@ ECO_STATUSES = (
class EcologyManager(Processor):
- DEFAULT_CONFIG = {
- }
+ DEFAULT_CONFIG = {}
running_tasks = defaultdict... |
bimpression__sosw-90 | [
{
"changes": {
"added_entities": [
"sosw/scheduler.py:Scheduler.previous_x_days",
"sosw/scheduler.py:Scheduler.yesterday",
"sosw/scheduler.py:Scheduler.today",
"sosw/scheduler.py:Scheduler.last_week"
],
"added_modules": null,
"edited_entities": [
"... | bimpression/sosw | eb2ce2b4609c8ad1e6d7742d634f80bc7f91f3ac | Scheduler: chunk_days() - more patterns
Support more generic patterns for chunking, e.g.:
- previous_X_days
- last_week
- previous_week
- yesterday
- today
- smart_X_of_Y_days_back (more often recent days, less and less often days that were long ago up to `Y`; the total number should be `X`) | diff --git a/sosw/scheduler.py b/sosw/scheduler.py
index 5ba5ae0..33234a3 100644
--- a/sosw/scheduler.py
+++ b/sosw/scheduler.py
@@ -200,6 +200,23 @@ class Scheduler(Processor):
return [str(today - datetime.timedelta(days=x)) for x in range(num, 0, -1)]
+ def previous_x_days(self, pattern: str) -> List[... |
bimpression__sosw-93 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sosw/components/helpers.py:make_hash"
],
"edited_modules": [
"sosw/components/helpers.py:make_hash"
]
},
"file": "sosw/components/helpers.py"
},
{
"changes": {
... | bimpression/sosw | c3bd62526e62090f986b24a0b88decec4644b2b9 | Ecology: Design the mechanisms
- Get from properties of Labourer his dependencies.
- Get acceptable Values
- Call CloudWatch manager
- Calculate the colour status
| diff --git a/README.md b/README.md
index b3a2627..4145fa5 100644
--- a/README.md
+++ b/README.md
@@ -34,18 +34,24 @@ $ pytest ./sosw/test/suite_3_6_unit.py
### Contribution Guidelines
#### Release cycle
-- Master branch commits are automatically packaged and published to PyPI.
-- Branches for staging versions follo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.