Code Monkey home page Code Monkey logo

poet's People

Contributors

maxrothman avatar sdispater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poet's Issues

Attribute Error on poet init

The whole interactive session:

poet init                     

                                        
  Welcome to the Poet config generator  
                                        


This command will guide you through creating your poetry.toml config.

Package name [repo]: ***
Version [0.1.0]: 
Description []: ***
Author [***, n to skip]: 
License []: MIT

Would you like to define your dependencies (require) interactively? (yes/no) [yes] yes

Search for a package: 


Would you like to define your dev dependencies (require-dev) interactively (yes/no) [yes] yes

Search for a package: mypy
Found 19 packages matching mypy

Enter package # to add, or the complete package name if it is not listed: 
 [ 0] flake8-mypy
 [ 1] mypy-lang
 [ 2] pytest-mypy
 [ 3] mypy
 [ 4] mypy_extensions
 [ 5] MypyBear
 [ 6] mypyHook
 [ 7] MyPyML
 [ 8] mypypi
 [ 9] mypypilxp
 [10] mypypiproject
 [11] mypypitest
 [12] MyPyPiTut
 [13] mypytest
 [14] mypython
 [15] mypython02
 [16] mypython2
 [17] wymypy-ng
 [18] wymypy
 > 3

Enter the version constraint to require (or leave blank to use the latest version): 

                    
  [AttributeError]  
  __exit__          

I have no more information about the error.

Ubuntu 16.04, virtualenv with Python 3.4

poet install <package name>

Poet should be able to install a package by passing the name as a parameter.
Poet install the module and also add to poet.toml the freshly install package with the version.
This way it's really easy and convenient to add package to the project.
Maybe a poet remove command can be implemented as well to perform the opposite.

Check command return all errors at once

When I run poet check I get only one error. I fix it, re-run poet check and get another error completely unrelated. It would be very convenient to have all the errors at once.

Templates rather than interactive init

I was hoping init would fill in more for me :) It's probably still part of your plan.

I think (for now) that it would be faster/nicer when I would just copy your example from the README and start editing the things to how it should be for me.

Granted, the filling in of folder/package name and github info is a really nice addition, but maybe that could be incorporated during the creation of a personalized template.

Perhaps you could make templates so that it could be inited faster?

Another idea would be to work with submodules, too.

poet init basic pyup travis tox gitignore pypi pypi-dev MIT

where each would have some default settings. Maybe a submodule would be a different section in the toml?

Similarly, poet init full could just give everything available; sometimes it is easier to just remove the things not needed :)

Yet another idea: my projects are probably going to be similar to each other (more similar than my project vs your projects). It would be nice if poet would enable me to create a template myself or something, or inherit from another project. Maybe a submodule structure would work instead.

Occur HTTPError during publish command

Hello!
I would like to test the features of this project, so have run the following commands in examples/basic.
(I Modified package name to basic-poet in poetry.toml)

> pip install poet
# after installing
> poet publish
No package found. Building it.

 Building basic-poet (0.1.0)
 Built basic-poet (0.1.0)

  - Created basic-poet-0.1.0.tar.gz

Publishing basic-poet (0.1.0) to pypi
Enter your username: JungWinter
Enter your password:

 - Registering basic-poet-0.1.0.tar.gz

I expected the basic-poet package to be uploaded on pypi,
but I got a HTTPError.

[HTTPError]                                                                
  410 Client Error: This API is no longer supported, instead simply upload   
  the file. for url: https://upload.pypi.org/legacy/

I expect you to know how to solve this problem.

Support pypi trove classifiers

Trove classifiers are somewhat important for software classification inside pypi. Moreover, it can help support better some data about the package.

Poet could be great place to abstract this concept in an higher-level way, like :

dev-status = 'beta'  # this add the 'Development Status :: 4 - Beta' classifier

Many information already provided, like compatible python versions, licence, or C/C++ extensions, can directly be understood as trove classifiers (Programming Language :: Python :: *, License :: *, Programming Language :: C*).

This is also a way to control the values given by user : if a licence is not recognized (because not convertible to trove classifiers), user should be warned during package building.

Installation from requirements.txt

When transitioning from old school requirements.txt & pip install -r requirements to poet, it can be a lot of work, especially if in the requirements.txt file, the version are not set.
Poet should have a command (or an option) to install the package from a requirements.txt file. Poet will then go through each of the dependencies, if the version is not defined, prompt the user with which version to install (by default = latest) and then add to poet.toml this dependencies.

After everything is finished, we can print to the user that he can safely remove requirements.txt

Poet fails if there are no dependencies

If your poetry.toml file has no dependencies, you will get this error:

λ poet install -v

Locking dependencies to poetry.lock

 - Resolving dependencies (1 sec)
 - Writing dependencies


  [KeyError]
  'package'


Exception trace:
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/application.py in run() at line 95
   status_code = self.do_run(input_, output_)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/application.py in do_run() at line 188
   status_code = command.run(input_, output_)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/command.py in run() at line 99
   return super(Command, self).run(i, o)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/index_command.py in execute() at line 28
   super(IndexCommand, self).execute(i, o)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/command.py in execute() at line 63
   return super(Command, self).execute(i, o)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 108
   return self.handle()
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/install.py in handle() at line 33
   installer.install(features=features, dev=dev)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in install() at line 59
   return self.install(features=features, dev=dev)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in install() at line 61
   lock = self._poet.lock
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/poet.py in lock() at line 199
   return Lock(self.lock_file)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/poet.py in __init__() at line 58
   self.load()
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/lock.py in load() at line 17
   packages = self._config['package']

install [-i|--index INDEX] [-f|--features FEATURES] [--no-dev] [--no-progress]

This is because of this line packages = self._config['package'], assuming that there will be a package section of the poetry.lock file. It should be replaced with self._config.get('package', []).

poet init does not work

Installed latest from pip just now.

pascal@MBP:~/egoroot/newnew $ poet init


  Welcome to the Poet config generator



This command will guide you through creating your poetry.toml config.



  [FileNotFoundError]
  [Errno 2] No such file or directory: '/Users/pascal/newnew/poetry.toml'


init [-i|--index INDEX] [--name NAME] [--description DESCRIPTION] [--author AUTHOR] [--dependency DEPENDENCY] [--dev-dependency DEV-DEPENDENCY] [-l|--license LICENSE]

Not every package follows semantic versioning

Currently, Poet assumes that every single package follows semantic versioning, but this is not true. For example, the iterfzf project follows a versioning scheme that indicates both the Python library version, and the version of a bundled executable that the library relies on. Because Poet assumes that every version is a semantic version, it is incapable of installing libraries like iterfzf that use more than 3 dots in their version. The current release of iterfzf is 0.2.0.17.0. Poet parses this as 0.2.0+17.0, and when it tries to download the package with pip, it just tries to download 0.2.0, which does not exist.

Poet should not need a compiler to be installed

The whole purpose of this tool is to make things easier for beginners.

Now I tried pip install pypoet under Ubuntu, but it depends on psutil, which has C extensions, hence it requires Python headers and fails. I can fix that with an apt install in 3 sec.

A beginner ?

3 hours of googling around, copy pasting, learning about gcc and headers and packages name differences accross Fedora/Ubuntu and python versions and virtualenv isolation and not understanding what the heck is going on. And maybe a bit of crying.

I really love the whole poet concept. I tried PBR and pipenv but I think the way you do things is much better generally. But it will not be popular if most first trial is an obscure error message.

config file not permissive enough

It is required to add the authors and create a readme.rst even though I just want to install package.
I think these information should be mandatory only if I want to publish my module.

Unable to install both aiohttp and Jinja2

I know this seems very strange, but Poet is not able to install aiohttp and Jinja2 if they are both in the same poetry.toml.

Basic config:

[package]
name = "poet-test"
version = "0.0.1"
description = "Poet test"

python = ["^3.6"]

authors = ["Nate Mara <[email protected]>"]

readme = "README.rst"

[dependencies]
aiohttp = "2.2.5"
Jinja2 = "2.9.6"

When running this with Python 3.6, pip 9.0.1, and poet 0.4.1, I get the following error:

λ poet install -vvv

Locking dependencies to poetry.lock

 / Resolving dependencies (1 sec, )


  [NotADirectoryError]
  [Errno 20] Not a directory: '/var/folders/hf/9sl9vzc515sbbnrfz15r4b6nz9mhjr/T/tmp839jvuj3build/changes/2143.bugfix'


Exception trace:
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/application.py in run() at line 95
   status_code = self.do_run(input_, output_)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/application.py in do_run() at line 188
   status_code = command.run(input_, output_)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/command.py in run() at line 99
   return super(Command, self).run(i, o)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/index_command.py in execute() at line 28
   super(IndexCommand, self).execute(i, o)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/command.py in execute() at line 63
   return super(Command, self).execute(i, o)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 108
   return self.handle()
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/console/commands/install.py in handle() at line 33
   installer.install(features=features, dev=dev)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in install() at line 57
   self.lock(dev=dev)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in lock() at line 262
   packages = self.resolve(deps)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in resolve() at line 280
   return self._resolve(deps)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/poet/installer.py in _resolve() at line 320
   hashes = resolver.resolve_hashes(pinned)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/piptools/resolver.py in resolve_hashes() at line 77
   return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/piptools/resolver.py in <dictcomp>() at line 77
   return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/piptools/repositories/pypi.py in get_hashes() at line 169
   for candidate in matching_candidates
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/piptools/repositories/pypi.py in <setcomp>() at line 169
   for candidate in matching_candidates
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/piptools/repositories/pypi.py in _get_file_hash() at line 176
   download_dir=tmpdir, only_download=True, session=self.session
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/pip/download.py in unpack_url() at line 821
   hashes=hashes
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/pip/download.py in unpack_http_url() at line 663
   unpack_file(from_path, location, content_type, link)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/pip/utils/__init__.py in unpack_file() at line 605
   untar_file(filename, location)
 /users/nm46057/.anaconda3/envs/poet-test/lib/python3.6/site-packages/pip/utils/__init__.py in untar_file() at line 577
   with open(path, 'wb') as destfp:

install [-i|--index INDEX] [-f|--features FEATURES] [--no-dev] [--no-progress]

The really strange thing is that if I try installing each package individually, it works just fine, but if I have both of them in the file together it fails. Even if both packages are installed, it still fails.

Ability to execute commands

Maybe it can be a good idea to create command that we can run from Poet, like NPM.

  • poet start
  • poet tests
  • poet run migrate_db

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.