profile
viewpoint

flying-sheep/awesome-python-packaging 48

An awesome list for python package development

flying-sheep/babel-plugin-transform-react-createelement-to-jsx 33

:leftwards_arrow_with_hook: Transforms React.createElement calls to JSX syntax

Berserker66/omnitool 31

Third Party Tool for the game Terraria

flying-sheep/bcode 19

bencoding & -decoding library

capaj/vscode-exports-autocomplete 17

finds javascript ES6 exports in your project and autocompletes them when writing javascript statements

flying-sheep/5-Tiling 2

:black_square_button: A project to investigate how to painlessly create bordered textures that tile.

flying-sheep/aiogithub 0

asyncio-based GitHub API client

issue openedjupyterlab/jupyterlab

INotebookTracker.panel.model.metadata.set fails to change notebook metadata

I use the folloing code in my extension to add an UUID to a notebook (It’s so short that I’ll just paste it whole

import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'
import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook'
import { UUID } from '@lumino/coreutils'

const extension: JupyterFrontEndPlugin<void> = {
  id: 'notebook-uuid',
  autoStart: true,
  requires: [INotebookTracker],
  activate: (app: JupyterFrontEnd, notebooks: INotebookTracker) => {
    notebooks.forEach(addUUID)
    notebooks.widgetAdded.connect((_, a) => addUUID(a))
  },
}

function addUUID(panel: NotebookPanel): void {
  if (panel.model === null) {return}
  const { metadata } = panel.model
  if (metadata.has('uuid')) {return}
  metadata.set('uuid', UUID.uuid4())
}

export default extension

This code runs fine and used to add UUIDs to the notebook metadata, and calling metadata.get('uuid') returns the thing.

However it doesn’t end up in the notebook’s JSON.

I use Jupyter lab 2.2.8

created time in 20 hours

startedC1710/blobmoji

started time in a day

issue openedabsent1706/sqlalchemy-mixins

Allow escape characters in `like`/`ilike` queries (and use them in derived ones)

The like and ilike queries have an active character, %. It would be nice to be able to match that one literally if necessary.

Also queries like iendswith are implemented based on ilike. They should be implemented something like this:

def iendswith(col, value):
    escaped = value.replace('\\', r'\\').replace('%', r'\%')
	return col.ilike(f'%{escaped}', escape='\\')

created time in a day

push eventflying-sheep/phil.red

Philipp A

commit sha 4428c61e871a2be3474f1efb606c0eb23369cce2

Moved posts, stronger typing

view details

push time in 2 days

issue commentbenmosher/eslint-plugin-import

Is there any way around having no-multiple-empty-lines and newline-after-import together?

highly unidiomatic

Hahaha it’s just empty lines. I don’t think I’ve ever seen a strong opinion about those before now.

atrauzzi

comment created time in 2 days

issue commentrst-js/rst-js

Maybe join forces?

I barely find time to manage my other project, lingui/js-lingui

I know that feel, I don’t have much time myself sadly. Thanks for the offer. Like it is, I’ll probably keep having it in-tree of my page.

flying-sheep

comment created time in 2 days

issue openedrst-js/rst-js

Maybe join forces?

Hi, this seems pretty dead, but maybe we can make it less so.

For my private page I created something similar in scope. It consists of three parts:

  1. Parsing to a custom data structure

    • MarkupDocument is the module holding functions for all known document elements. It’s roughly a DocumentTree, but not quite. We could close the gap.
    • rst and md are adapters the make 3rd party parsers emit the above tree. Because it’s cute, I use a custom JSX factory so one can directly use JSX syntax to emit plain data in here.
  2. rollup-plugin-renderdoc is the analog to your Webpack loader for Rollup. Just a few lines of code to dispatch one of above parser adapters based on the file extension. Since the parser adapters simply emit plain objects, it’s easy to base both a webpack loader and a rollup loader on them.

  3. Markup components to render markup documents

    • Markup is the Component wrapping a complete document and not very interesting
    • MarkupNodeComponent dispatch on the type and render them to React (in this case MiUI, but easily adaptable)

created time in 2 days

issue commentseikichi/restructured

Maintenance

Seems like this is dead…

tricoder42

comment created time in 2 days

delete branch flying-sheep/phil.red

delete branch : ts

delete time in 2 days

push eventflying-sheep/phil.red

Philipp A

commit sha 0f9557fc67f87ebf3640c7443233aabf828249e6

TypeScriptify everything (#8)

view details

push time in 2 days

PR merged flying-sheep/phil.red

TypeScriptify everything
+4842 -661

0 comment

37 changed files

flying-sheep

pr closed time in 2 days

push eventflying-sheep/phil.red

Philipp A

commit sha 0409ffe78d745a3289de5b2a7214f39860928fc0

Remaining fixupy

view details

Philipp A

commit sha 560662796fa28f16772b5a756b72291c60d50d58

Last fixups

view details

push time in 2 days

push eventflying-sheep/rollup-plugin-ts-test

Philipp A

commit sha 3dbe519ccf970f8b00e010ad857f5c3bde69ee1d

Update README.md

view details

push time in 2 days

push eventflying-sheep/rollup-plugin-ts-test

Philipp A

commit sha 79a2a2b10b72db5901f8c9dbd393b4730a6d96d4

Create README.md

view details

push time in 2 days

issue openedwessberg/rollup-plugin-ts

Seemingly no support for using typeRoots to provide typings for 3rd party packages

  • Version: 1.3.5
  • Rollup Version: 2.32.0
  • Operating System and version (if applicable): Arch Linux
  • Node Version (if applicable): 14.14.0
  • Does it work with tsc (if applicable): yes

Reproduction

I provide typings for some untyped modules using typeRoots in tsconfig.json. In my case I created typings/react-did-catch/index.d.ts and imported it.

Example repo here: https://github.com/flying-sheep/rollup-plugin-ts-test

Expected Behavior

rollup-plugin-ts compiles my code.

Actual Behavior

index.tsx → index.js...
[!] (plugin Typescript) TS6504: File '~/Dev/.../node_modules/react-did-catch/lib/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?

Uh, no, I do not, that’s why I provided typings!

created time in 2 days

create barnchflying-sheep/rollup-plugin-ts-test

branch : master

created branch time in 2 days

created repositoryflying-sheep/rollup-plugin-ts-test

created time in 2 days

issue commentisaacs/node-glob

Promise support

I've settled on another module instead: sindresorhus/globby

My eyes went immediately to index.d.ts and I knew you pointed me to something good. Thank you!

callumlocke

comment created time in 2 days

PR opened flying-sheep/phil.red

TypeScriptify everything
+4792 -652

0 comment

37 changed files

pr created time in 2 days

push eventflying-sheep/phil.red

Philipp A

commit sha cdba8a1ed9d262d9b1c5055056b09447c08fcedf

Create 2020-02-28-citations.rst

view details

Philipp A

commit sha 60b61c3ca917cb11f58f1e37694c1f4dcd0eaaeb

updated some stuff

view details

Philipp A

commit sha ca9d815f4b7ec23f27bd8fa7a66cf5ba9335b9ef

add capabilities for new blog entry

view details

Philipp A

commit sha b83a5cc4c470fcfc8ed7f7adc76a33507f1c4328

updated everything

view details

Philipp A

commit sha 4d0c4db7ee45441809f672a21aebd58477ebddec

added home

view details

Philipp A

commit sha 174259864a1775583ee6b68b090325a3a627a2e6

Added code tab and better homepage

view details

Philipp A

commit sha 9d0ccc6ad62415aff32f68cfbb82389d765f31a7

Add code tab

view details

Philipp A

commit sha d972dd256234f78c0a4907c2b5cf2c49e0f88686

caps

view details

Philipp A

commit sha aa32f638d6e371dc88092f9d8265a3bc3869ad48

Improve list

view details

Philipp A

commit sha 1531fee3efa1d11512d1991f908296a65ce5dbb7

use dark theme

view details

Philipp A

commit sha 6f394b4de833f26d4e390a158699685302150a5a

enable tree shaking again

view details

Philipp A

commit sha ff786ae0a8957767da8d9bd14fec3965b96db9b7

change blog post order

view details

Philipp A

commit sha 762e784fbd6c4189e12d97d92b449cd898641529

Scrollable toolbar

view details

Philipp A

commit sha bc9189aca46990137c76f69b22e073f1db2e6db6

also set appbar color

view details

Philipp A

commit sha 071539af81802d95959771fae5c145a8090cb88f

redirect better

view details

Philipp A

commit sha 908ada116d8db25e000e93a7b10fd370c0297125

spare .well-known

view details

Philipp A

commit sha 042dd29044597a97378513ee2f368d7802c05dca

ipv6

view details

Philipp A

commit sha fab22166f08aafad874f88770176c0fd76ca8895

Merge branch 'master' into ts

view details

push time in 2 days

push eventflying-sheep/phil.red

Philipp A

commit sha 5e03d6ceecd0bbcba9873e6fe8b484e670b390a0

Enable tree shaking

view details

push time in 2 days

issue commentdeshaw/jupyterlab-execute-time

Execution duration doesn't show when using R kernel - only shows the datetime stamp

I’m not familiar with the code and have enough pet projects, but one would just have to figure out where in the lab code to insert a const fallback = (new Date).toISOString() to use when !value.

udaykapur

comment created time in 3 days

push eventflying-sheep/phil.red

Philipp A

commit sha ab25964c4de45dd8f03dbcfc2934acef7aaf3754

Update & ESLint

view details

Philipp A

commit sha 96057b905f7ddeaa66112ddb0ec570946245cb57

IT LIVES

view details

push time in 3 days

issue commentbenmosher/eslint-plugin-import

Is there any way around having no-multiple-empty-lines and newline-after-import together?

Obviously. The question is how to configure ESLint so that only 1 empty line is allowed between everything except for certain cases.

I like the Python way: 2 newlines between classes, function, declarations, blocks of constant definitions, and blocks of imports, but at most 1 everywhere else.

atrauzzi

comment created time in 3 days

issue commenttheislab/scvelo

Installation with conda require higher version of anndata

For the question who committed it, just check this please: https://github.com/bioconda/bioconda-recipes/commits/master/recipes/scvelo/meta.yaml

lldelisle

comment created time in 3 days

issue commenttheislab/anndata2ri

Conversion to AnnData fails - R object with classes: ('SingleCellExperiment',) mapped to:

Please create a minimal reproducible example, consisting of all code necessary to reproduce this on my machine, without having to manually download data.

MoritzTh

comment created time in 3 days

issue commentJuliaLang/IJulia.jl

IJulia not generating standardised metadata for cells within jupyter lab to show cell execution duration time

Heads up: I assume this has to do with IJulia supporting the 5.0 protocol, which didn’t specify a date field in the response yet:

https://github.com/JuliaLang/IJulia.jl/blob/ad459e8d46a908c6b923cafa79572a610e2869bb/src/handlers.jl#L153

Changed in version 5.1: date in the header was accidentally omitted from the spec prior to 5.1, but it has always been in the canonical implementation, so implementers are strongly encouraged to include it. It will be mandatory in 5.1. – General Message Format

octavd

comment created time in 3 days

issue commentdeshaw/jupyterlab-execute-time

Execution duration doesn't show when using R kernel - only shows the datetime stamp

Hi! What do you mean with “standardized metadata from lab”? My Jupyter lab doesn’t add an execution dict to cell metadata.

udaykapur

comment created time in 3 days

push eventIRkernel/IRkernel

Philipp A

commit sha df4062024578e00bab3318945ba9ce87c0ceb1b8

Add fractions of seconds

view details

push time in 3 days

issue commentIRkernel/IRkernel

IR kernel not generating standardised metadata for cells within jupyter lab to show cell execution duration time

Kernels don’t know or do anything about cells. Kernels just answer to messages with other messages.

IRkernel (AFAIK) is a fully spec-compliant kernel for messaging format 5.0, so the issue title isn’t correct.

However, I see the following in the linked document:

Changed in version 5.1: date in the header was accidentally omitted from the spec prior to 5.1, but it has always been in the canonical implementation, so implementers are strongly encouraged to include it. It will be mandatory in 5.1.

I created #668 to implement this. Please check if it adds the feature you’re requesting.

udaykapur

comment created time in 3 days

PR opened IRkernel/IRkernel

Add `date` to reply messages

Also the kernel now identifies as 5.3. I hope I didn’t miss any changes from 5.0 to 5.3.

+7 -3

0 comment

1 changed file

pr created time in 3 days

push eventIRkernel/IRkernel

Philipp A

commit sha 82217314215a0a7502170419835175adda7a5550

Add `date` to reply messages

view details

push time in 3 days

create barnchIRkernel/IRkernel

branch : add-date

created branch time in 3 days

push eventIRkernel/IRkernel

Philipp A

commit sha aa01fd23308157bd798eff7152c1a86fe273c9ad

Updated notebooks

view details

push time in 3 days

push eventIRkernel/IRkernel

Philipp A

commit sha 42f2b4037f840eb1e1505d0347895f443309595d

Improved issue template

view details

push time in 3 days

issue commentdenoland/rusty_v8

Add support for ICU

Since ICU is large (as discussed in the linked issue): It would be great if choosing between static and dynamic linking is possible. On my system, all those projects link to ICU, and it would be nice to not have a second copy of it embedded in deno.

  • bind boost-libs calibre chromium dotnet-runtime harfbuzz-icu haskell-text-icu lib32-icu libcdr libical libmspub libreoffice-fresh libvisio libxml2 nodejs nuspell postgresql powershell-bin r r-devel-svn raptor smbclient texlive-bin tracker3 xfsprogs
kitsonk

comment created time in 3 days

issue openedogham/exa

Allow passing a partial file tree and treating it as single tree

Sometimes one wants to use another program to produce a list of paths, and just use exa to garnish them with information or format them as a tree or so.

That could be a package manager giving a list of files and directories in a package, or find/fd finding files using certain patterns.

The project ftree does this, but only makes a tree. It can’t show sizes and ownership and so on:

$ pacman -Qlq deno | head -n4
/usr/
/usr/bin/
/usr/bin/deno
/usr/share/
$ pacman -Qlq deno | ftree | head -n4
└── usr
    ├── bin
    │   └── deno
    └── share

Exa can be awkwardly passed a list of files by filtering out directories. It won’t create a tree from them, though:

$ pacman -Qlq deno | rg -v '/$' | xargs exa -T
/usr/share/zsh/site-functions/_deno
/usr/share/bash-completion/completions/deno
/usr/bin/deno
/usr/share/fish/vendor_functions.d/deno.fish
/usr/share/licenses/deno/LICENSE

When passing -d/--list-dirs in tree mode, it does ignore it, so the following hangs because it tries to make a tree for /usr:

$ pacman -Qlq deno | xargs exa -Td

Maybe the combination of -T and -d can be interpreted as “just make a tree from what you’re passed”?

This feature request is somewhat related to #416, as this could remove the need for it.

created time in 3 days

issue commentogham/exa

feature request: combine --tree with --long

Exa already does this:

$ exa -Tl
drwxr-xr-x    - phil 16 Okt 15:53 .
.rw-r--r--  208 phil 16 Okt 15:15 ├── index.rst
.rw-r--r-- 4,6k phil 16 Okt 15:50 └── static.ipynb
basbebe

comment created time in 3 days

issue commentdenoland/deno

Add ICU in embedded v8

If we care about the detractors we could use cargo-bloat to create a piechart somewhere in the docs that shows a breakdown of deno’s executable size. Maybe it would be good having the argument readily available that “those 25% of its size is so you have ICU support as specified by the standard”

zekth

comment created time in 3 days

startedwebiny/webiny-js

started time in 8 days

issue commenttheislab/scanpy

Spatial embedding of gene expression: Delaunay triangulation

Sounds like a good idea. Since we have a hexagonal grid, we can just connect the centers of the hexagons in a regular fashion instead of running delauney triangulation. But it’s fast enough to do that too if we want to have it easy and there’s a delauney implementation in something we already import (e.g. scipy maybe?)

@giovp the result would simply be a smoothly changing shading. 3D models are often shaded like that:

We start with a regular 2D grid on the right, and instead of shadow, we interpolate our color map between the intersection points.

AdemS80

comment created time in 11 days

IssuesEvent

pull request commenttheislab/scanpy

Fix pip install statement in CONTRIBUTING.md

Ah whoops, sorry I missed it!!

WeilerP

comment created time in 14 days

delete branch theislab/scanpy

delete branch : instructions-zsh

delete time in 15 days

push eventtheislab/scanpy

Philipp A

commit sha 8c88df67b44c47a5c1516c842c37b18b874a82e3

Instructions zsh (#1444)

view details

push time in 15 days

PR merged theislab/scanpy

Instructions zsh

Fixes #1441

+5 -3

0 comment

2 changed files

flying-sheep

pr closed time in 15 days

issue closedtheislab/scanpy

Incorrect pip install statement in documentation for contributors

Description

The documentation in CONTRIBUTING.md states that all dependencies required for testing can be installed via pip install scanpy[test]. It should, however, be pip install "scanpy[test]".

Minimal code sample

pip install scanpy[test]
zsh: no matches found: scanpy[test]

closed time in 15 days

WeilerP

issue commenttheislab/scanpy

Incorrect pip install statement in documentation for contributors

Noglob turns off all globbing though. Would be great if one could turn off just Extended globbing for a command.

After all, pip install *.whl could be useful.

WeilerP

comment created time in 15 days

PR opened theislab/scanpy

Instructions zsh

Fixes #1441

+5 -3

0 comment

2 changed files

pr created time in 15 days

push eventtheislab/scanpy

Philipp A

commit sha 3ccbf5def8d803cd891a4dc46908f90a30afec07

Make CONTRIBUTUNG.md zsh compatible

view details

push time in 15 days

create barnchtheislab/scanpy

branch : instructions-zsh

created branch time in 15 days

push eventflying-sheep/phil.red

Philipp A

commit sha 70a4c4c2019df8d245777287b849b100e6a121a9

Some compiletime improvement

view details

push time in 16 days

push eventflying-sheep/phil.red

Philipp A

commit sha d6910caa8840878161679b0cd96c99870a1536ee

Fix all typing

view details

push time in 16 days

push eventflying-sheep/phil.red

Philipp A

commit sha 2531d64aba9bbc95a3322704af0b4bb293ca746f

Done!

view details

push time in 16 days

push eventflying-sheep/phil.red

Philipp A

commit sha d8991e9a71f0b7d297fb9180a42e7342c3de294b

Fix typing

view details

Philipp A

commit sha 4a46971d111aa25f714a2f1b128c96083c88b1b1

Do everything except Markup

view details

Philipp A

commit sha fb7b4a24b2b07af68c88694a758a2e58cfb87a8a

Extract targets

view details

push time in 16 days

push eventflying-sheep/phil.red

Philipp A

commit sha e10595fc5ea3b04840b62108e62837070a339900

Addes some Markup types

view details

push time in 16 days

issue commentIRkernel/IRkernel

%%writefile magic or similar for IRkernel?

I think using reticulate or system is pretty easy, no?

breschke

comment created time in 19 days

issue commentdarkreader/darkreader

Support website's native dark mode

You may also just disable this add-on on sites, where you detect it used. It opens many possibilities/ideas…

This is the part that I’m after. My personal page and I guess many other small pages support dark mode and will show ugly black rectangles when the addon is activated.

It would be nice to have a setting “Apply to sites that autoadapt themselves” where you could toggle between the current behavior (Forcing application on every site) vs trusting that websites with prefers-color-scheme queries will have a dark mode.

rugk

comment created time in 19 days

issue openedsphinx-doc/sphinx

[autosummary] Emit event when generating for a file

See tardyp/sphinx-jinja#17 for a use case and detailed description

Is your feature request related to a problem? Please describe. Other extensions that create code don’t play well with autosummary. An event like this could help

Describe the solution you'd like An event like

autosummary-file-found(app: Sphinx, file_path: pathlib.Path, lines: list[str])

Where handlers can modify the lines could be modified before generate.find_autosummary_in_lines is called on them

Describe alternatives you've considered One could just manually generate the rst files in conf.py before letting sphinx run, But that lacks flexibility and elegance.

created time in 19 days

issue openedtardyp/sphinx-jinja

Emit event on expansion

It could mirror the source-read(app, docname, source) event.

This event can e.g. be useful for making this extension work with autosummary_generate:

  1. autosummary runs on the builder-inited event, i.e. before any directives are run
  2. autosummary parses all files recursively for code that looks like a autosummary directive (without expanding directives)
  3. the sphinx-jinja directive gets run and generated autosummary directives get expanded, but no stubs have been generated for them.

If we have this event, and a way to hook into sphinx.ext.autosummary.generate.find_autosummary_in_files, then we could integrate the two:

from sphinx.io import read_doc
from sphinx.util.logging import suppress_logging

def find_in_expanded(app, file_path, lines):
	def add_expanded_lines(app, docname, source):
		lines.extend(source.splitlines())
	listener = app.connect('jinja-expanded', add_expanded_lines)
	app.env.prepare_settings(str(file_path.relative_to(app.srcdir).with_suffix('')))
	with suppress_logging():
		read_doc(app, app.env, filename)
	app.disconnect(listener)

app.connect('autosummary-file-found', find_in_expanded)

created time in 19 days

issue commentIRkernel/IRkernel

%%writefile magic or similar for IRkernel?

It’s less about it being hard and more about it being unnecessary, this is easy enough, no?

cat('
You only have to escape typewriter quotes \'
Multiple lines are fine
', file = 'thing.txt')
breschke

comment created time in 19 days

issue commenttardyp/sphinx-jinja

Custom/New filters

Not really, but you can hack it in:

from functools import wraps
import sphinx.ext.autosummary.generate as gen
import sphinxcontrib.jinja
from jinja2 import Environment

class AutodocEnv(Environment):
    @wraps(Environment.__init__)
    def __init__(self, *args, **kw):
        super().__init__(*args, **kw)
        from sphinx.util import rst
        self.filters['escape'] = rst.escape
        self.filters['e'] = rst.escape
        self.filters['underline'] = gen._underline

sphinxcontrib.jinja.Environment = AutodocEnv
vancheese

comment created time in 20 days

issue commentIRkernel/IRkernel

Source R code written in Jupyter Notebook R Kernel

My code doesn’t create an R file. The --stdout argument is for avoiding temporary files. There is no Settings.R, and you can just use the same code in another notebook.

Please stop asking me and start trying to understand what you’re doing. You can do jupyter nbconvert --help in a console to get help on how to use it, and ?system2 to understan what it does.

wushengzhong

comment created time in 20 days

issue commentIRkernel/IRkernel

clear_output from code

Sadly no, but it should be easy to do. Do you want to do a pair of PRs? You’d probably

  1. Add the option jupyter.clear_output_func here: https://github.com/IRkernel/IRdisplay/blob/80e758a/R/options.r#L43-L45
  2. Add a clear_output function using send_response next to display_data https://github.com/IRkernel/IRkernel/blob/dcfb7d0a64cdf7908ee83a8fc3a15811d42c8016/R/execution.r#L95-L104
  3. Set the option to that function here: https://github.com/IRkernel/IRkernel/blob/dcfb7d0a64cdf7908ee83a8fc3a15811d42c8016/R/execution.r#L364

As @takluyver said, the docs here: http://jupyter-client.readthedocs.io/en/latest/messaging.html#clear-output

zivy

comment created time in 20 days

issue commentIRkernel/IRkernel

Source R code written in Jupyter Notebook R Kernel

I set a parenthesis wrong and updated the code above. Try it again.

wushengzhong

comment created time in 20 days

issue commentreadthedocs/readthedocs-docker-images

Update python versions

There’s some investigation done here: https://github.com/theislab/scanpydoc/pull/20#issuecomment-698861767

You can see it in action e.g. in this build: https://travis-ci.com/github/theislab/scanpydoc/jobs/390871698

flying-sheep

comment created time in 22 days

pull request commentdirectus/docs

Directus is no longer limited to MySQL

Aha! Thank you for the info

flying-sheep

comment created time in 22 days

delete branch flying-sheep/docs-1

delete branch : patch-1

delete time in 22 days

PR opened directus/docs

Directus is no longer limited to MySQL

This also needs to be changed in the actual advanced options UI.

+1 -1

0 comment

1 changed file

pr created time in 22 days

push eventflying-sheep/docs-1

Philipp A

commit sha 60514ff8a0d4b38f20e0d471f931d16200fd43dc

Directus is no longer limited to MySQL

view details

push time in 22 days

fork flying-sheep/docs-1

Directus Documentation — Docs, User-Guide, API Reference, and More

https://docs.directus.io

fork in 22 days

starteddirectus/directus

started time in 23 days

PR opened technige/py2neo

Only get rtd version when on pytoneo RTD

Fixes #850

+1 -1

0 comment

1 changed file

pr created time in 24 days

push eventflying-sheep/py2neo

Philipp A

commit sha 155ce333e337e16584e9e80054781607698aeda8

Only get rtd version when on pytoneo RTD

view details

push time in 24 days

fork flying-sheep/py2neo

Py2neo is a comprehensive toolkit for working with Neo4j from within Python applications or from the command line.

http://py2neo.org

fork in 24 days

issue closedIRkernel/IRdisplay

Can I use display_javascript to replace magic

Hello, I wanted to remove autoscrolling in jupiterlab and while I get hundreds of hits in python it seems very complicated to find out how to do it in R. From this post on SO it seems that I should be able to do IRdisplay::display_javascript('IPython.OutputArea.auto_scroll_threshold = 99999;') however when I do this in jupyterlab I get the error : Javascript Error: IPython is not defined Note that this seems to be working in jupyter-notebook Sorry for the trivial question but I am new to jupyter in R

closed time in 25 days

statquant

issue commentIRkernel/IRdisplay

Can I use display_javascript to replace magic

Yeah, in Jupyterlab, this won’t work. Jupyterlab is designed in a way that kernel code can’t execute arbitrary JS: https://github.com/jupyterlab/jupyterlab/issues/4508#issuecomment-385788315

There’s nothing I can do about it, sorry.

statquant

comment created time in 25 days

release theislab/scanpydoc

v0.5.3

released time in 25 days

created tagtheislab/scanpydoc

tagv0.5.3

Collection of Sphinx extensions similar to (but more flexible than) numpydoc

created time in 25 days

delete branch theislab/scanpydoc

delete branch : forward-refs

delete time in 25 days

push eventtheislab/scanpydoc

Philipp A

commit sha 8bfc8512f33d894f9980cef96492d1c4f78fbca2

Add test for forward refs (#20)

view details

push time in 25 days

PR merged theislab/scanpydoc

Add test for forward refs

Fixes #14 once ready

I still can’t reproduce #14 locally, but I can here! Seems to have to do with dataclasses:

https://github.com/theislab/scanpydoc/runs/1165147987

cc @ded8393

+115 -18

2 comments

4 changed files

flying-sheep

pr closed time in 25 days

issue closedtheislab/scanpydoc

Elegant typehints cannot resolve forward-references

Fails to resolve forward-references.

from dataclasses import dataclass
from typing import TypeVar, TYPE_CHECKING, Generic

@dataclass
class A: 
   b: 'B'  # NameError: 'B' is not defined

@dataclass
class B:
    a: A

Does not resolve even under conditions where the following are added to the top (forward-references should generally resolve via quotations, however PEP563 gives these suggestions

T = TypeVar('T')
if typing.TYPE_CHECKING:
    B = Generic[T]

from future import __annotations__

sphinx-autodoc-typehints uses parameter set_type_checking_flag in conf.py. Setting this does not affect elegant_typehints.

closed time in 25 days

ded8393

push eventtheislab/scanpydoc

Philipp A

commit sha e68dacba0a3597ed077beeda438b669e3e2611e9

OK cool Travis doesn’t even have 3.8.6

view details

push time in 25 days

push eventtheislab/scanpydoc

Philipp A

commit sha 1cb8ba52cf7fe21986d8df2b5184fcd84e0978ee

Let’s fix this!

view details

push time in 25 days

issue openedreadthedocs/readthedocs-docker-images

Update python versions

Hi! Our docs break because of a bugfix that lives in Python 3.7.6 and 3.8.1. You’re using pretty old Python versions:

https://github.com/readthedocs/readthedocs-docker-images/blob/6e61b2a903a0a22d2c14bec5f55b01467c39fbda/Dockerfile#L151-L152

Is there a reason why the Python versions aren’t kept up to date? In 10 years of Python coding I never had a single issue arising from a too-new patch release.

created time in 25 days

pull request commenttheislab/scanpydoc

Add test for forward refs

OK, progress I think. The generous help from pytest :heart: tells us that:

globalns = localns = {
    'MISSING': <dataclasses._MISSING_TYPE object at 0x7fa880778a00>,
    '_HAS_DEFAULT_FACTORY': <factory>,
    '__builtins__': <module 'builtins' (built-in)>,
}

Which is obviously wrong.

flying-sheep

comment created time in 25 days

pull request commenttheislab/scanpydoc

Add test for forward refs

WTF. My local copy of the Python 3.8 typing module has different code as the one used on travis?!

On travis the error is:

for name, value in hints.items():
    if value is None:
        value = type(None)
    if isinstance(value, str):
        value = ForwardRef(value)
    value = _eval_type(value, globalns, localns)

Locally I have:

for name, value in hints.items():
    if value is None:
        value = type(None)
    if isinstance(value, str):
        value = ForwardRef(value)
    value = _eval_type(value, globalns, localns)
    if name in defaults and defaults[name] is None:
        value = Optional[value]
    hints[name] = value
flying-sheep

comment created time in 25 days

push eventtheislab/scanpydoc

Philipp A

commit sha 08606e9694d2a75775de78a092353c6be32f8379

More resilience to introspection errors

view details

push time in 25 days

push eventtheislab/scanpydoc

Philipp A

commit sha 2e8d47dec468ba24b599b7a738b0bbf4f1e5dbaa

Still can’t reproduce :(

view details

push time in 25 days

PR opened theislab/scanpydoc

Add test for forward refs

Closes #14

I can’t reproduce it that way :(

+43 -0

0 comment

2 changed files

pr created time in a month

create barnchtheislab/scanpydoc

branch : forward-refs

created branch time in a month

delete branch theislab/scanpydoc

delete branch : autodoc

delete time in a month

push eventtheislab/scanpydoc

Philipp A

commit sha c4aad6e91105cd13697a364b99d25636ae99e12f

Tried adding autodoc support (#19)

view details

push time in a month

PR merged theislab/scanpydoc

Tried adding autodoc support

Fixes #18 when ready

+101 -13

1 comment

4 changed files

flying-sheep

pr closed time in a month

issue closedtheislab/scanpydoc

Elegant typehints' qualname overrides aren't processed in autodoc's show-inheritance option

When using the :show-inheritance: option for automodule, autoclass, or autoexception directives, the qualname overrides specified for elegant_typehints are not processed by Sphinx. The :show-inheritance: option will make Sphinx also list the base classes (and link them) for each class. However, since the qualname_overrides aren't processed, using the :show-inheritance: option will throw errors for classes whose base classes' qualnames should be overridden.

For example, with the following rst file:

Exceptions
==========

.. automodule:: mypackage.exceptions
   :members:
   :show-inheritance:

and the following mypackage/exceptions.py:

import requests


class MyConnectionError(requests.ConnectionError):
    pass

This will throw an error because requests.ConnectionError's qualname is requests.exceptions.ConnectionError but the object inventory exposes requests.ConnectionError... which is the reason why we'd use qualname_overrides from elegant typehints. The expected behavior is that elegant typehints should handle this case as well.

Link to Sphinx's autoclass inheritance checking implementation: https://github.com/sphinx-doc/sphinx/blob/3.x/sphinx/ext/autodoc/init.py#L1485-L1494

closed time in a month

laymonage

push eventtheislab/scanpydoc

Philipp A

commit sha a41a1d99ae278ec623de86e7f19772e9c60cd305

Handle everything in autodoc

view details

push time in a month

issue openedtechnige/py2neo

READTHEDOCS_VERSION isn’t necessarily py2neo’s version

in meta.py you try to get the version from $READTHEDOCS_VERSION. If py2neo is imported during the RTD build of some other package, that means you get that package’s version.

created time in a month

pull request commenttheislab/scanpy

Add cache_compression setting

ah, right, we should probably document it better. The attributes you can set on sc.settings are documented here, cache_compression here specifically.

flying-sheep

comment created time in a month

issue commentgithub/markup

Image alignment not respected in reStructuredText

#1222 is an old attempt by me to fix this, but I assume some “sanitation” removes the style tag for some reason. I don’t know enough about the internals to make it not do that.

jkleint

comment created time in a month

more