simonvh / norns Goto Github PK
View Code? Open in Web Editor NEWSimple yaml-based config module
License: MIT License
Simple yaml-based config module
License: MIT License
Deprecated yaml function.
Hi, I saw that you fixed the deprecation error of collections
in norns version 0.1.6 here and on bioconda (thank you for maintaining!). Would you be able to update norns to 0.1.6 on PyPI as well? I am a frequent user of gimmemotifs and just ended up in a very specific scenario on python 3.10, where I installed gimmemotifs with pip, but pip then only fetched norns=0.1.5 on install, leading to an error on import. Would be great to still be able to install with pip.
I was playing around with genomepy and accidentally wiped my config.yaml clean. This gave me the error that sys was not defined:
Traceback (most recent call last):
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/bin/genomepy", line 11, in <module>
load_entry_point('genomepy==0.5.5', 'console_scripts', 'genomepy')()
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/genomepy/__init__.py", line 2, in <module>
from genomepy.functions import (
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/genomepy/functions.py", line 13, in <module>
from genomepy.plugin import get_active_plugins, init_plugins, activate
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/genomepy/plugin.py", line 7, in <module>
config = norns.config("genomepy", default="cfg/default.yaml")
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/norns-0.1.4-py2.7.egg/norns/__init__.py", line 4, in config
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/norns-0.1.4-py2.7.egg/norns/cfg.py", line 58, in __init__
File "/home/sande/Desktop/snakemake-workflows/workflows/alignment/.snakemake/conda/a8623ecd/lib/python3.6/site-packages/norns-0.1.4-py2.7.egg/norns/cfg.py", line 72, in load
NameError: name 'sys' is not defined
On this line:
Line 72 in 81db000
It seems like simply adding import sys
would solve this problem.
Hi,
A deprecated warning appear when using pyfaidx:
================== warnings summary ===================
/tools/python/current/lib/python3.10/site-packages/norns/cfg.py:9: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
It seems to be this code location:
https://github.com/simonvh/norns/blob/master/norns/cfg.py#L9
As mentioned in the provided URL:
Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.
Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0] on linux
SetupTools 68.2.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.