Code Monkey home page Code Monkey logo

Comments (3)

andrey-kuprianov avatar andrey-kuprianov commented on June 30, 2024

This is the current user interaction:

poetry run atomkraft init myproject            

Copying from template version 0.0.0.post41.dev0+5ce7118
 identical  .
    create  traces
    create  chain.toml
    create  reactors
    create  tests
    create  models
    create  .atomkraft
    create  .atomkraft/smoke_tests
    create  .atomkraft/smoke_tests/test_authz.py
    create  .atomkraft/smoke_tests/test_cosmwasm.py
    create  .atomkraft/config.toml
    create  atomkraft.toml
    create  modelator.toml
    create  .modelator
    create  reports

 > Running task 1 of 4: poetry init

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

Package name [myproject]:  
Version [0.1.0]:  
Description []:  
Author [User <[email protected]>, n to skip]:  
License []:  
Compatible Python versions [^3.10]:  

Would you like to define your main dependencies interactively? (yes/no) [yes] 
You can specify a package in the following forms:
  - A single name (requests)
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)

Search for package to add (or leave blank to continue): 

Would you like to define your development dependencies interactively? (yes/no) [yes] 
Search for package to add (or leave blank to continue): 

Generated file

[tool.poetry]
name = "myproject"
version = "0.1.0"
description = ""
authors = ["User <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"


Do you confirm generation? (yes/no) [yes] 
 > Running task 2 of 4: poetry add git+https://github.com/informalsystems/atomkraft#dev

Updating dependencies
Resolving dependencies... (28.2s)

Writing lock file

No dependencies to install or update
 > Running task 3 of 4: poetry add git+https://github.com/informalsystems/terra.py#rano/cosmos

Updating dependencies
Resolving dependencies... (21.2s)

Writing lock file

Package operations: 0 installs, 2 updates, 0 removals

  • Updating ecdsa (0.18.0 -> 0.17.0)
  • Updating mnemonic (0.20 -> 0.19)
 > Running task 4 of 4: poetry run python -m pytest .atomkraft/smoke_tests || true
==================================================== test session starts ====================================================
platform darwin -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/andrey/work/atomkraft, configfile: pyproject.toml
plugins: atomkraft-0.0.1, modelator-0.5.0
collected 0 items                                                                                                           

=================================================== no tests ran in 0.00s ===================================================

All of the above can be simplified, as it seems, to just writing the static pyproject.toml file, and calling poetry update.

from atomkraft.

rnbguy avatar rnbguy commented on June 30, 2024

I strongly disagree with no interaction for poetry init from the user. Someone may want to initialize their own repo with their own project name, license, author list, etc.

We can offer a --non-interactive option to pass these via CLI. See poetry init --help.

OPTIONS
  --name                 Name of the package.
  --description          Description of the package.
  --author               Author name of the package.
  --python               Compatible Python versions.
  --dependency           Package to require, with an optional version constraint,
                         e.g. requests:^2.10.0 or requests=2.11.1. (multiple
                         values allowed)
  --dev-dependency       Package to require for development, with an optional
                         version constraint, e.g. requests:^2.10.0 or
                         requests=2.11.1. (multiple values allowed)
  -l (--license)         License of the package.

And we use this with poetry init -n.

  -n (--no-interaction)  Do not ask any interactive question

from atomkraft.

rnbguy avatar rnbguy commented on June 30, 2024

Rethinking about this. It makes sense just to use poetry init -n for now. We add support for CLI arguments later.

from atomkraft.

Related Issues (20)

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.