Comments (8)
I see, thanks for the suggestion. I need to learn more about poetry
and other options and will get back to you on this one.
from git-sim.
Hi and thank you! Thx for reaching out.
Right now I'm just using entries in the setup.py
like:
install_requires=[
'gitpython',
'manim',
'opencv-python-headless',
],
Which takes care of collecting everything automatically. It looks like the poetry.lock
file you generated breaks down every dependency and stores it. Is the benefit of this that it more or less guarantees that the build will succeed by defining specific versions of every dependency? Seems a bit messier to need to store all of this info though when most of the build dependences are nested within each other. Like, most of those dependencies come from Manim...
from git-sim.
yeah, you only need to specify them explicitly in the pyproject.toml
file (with constrints, if you wish, like "needs at least verion X.Y of package Z").
The file poetry.lock
is created automatically by poetry (poetry lock
) to pin all dependencies to fixed versions, which as you mention helps ensure that the build is reproducible / identical for everybody.
from git-sim.
@paketb0te I'm playing around with poetry and got a similar pyproject.toml
file to the one at your link.
Just a few questions about some extra info that is currently in the setup.py
file which I wasn't prompted for by the interactive poetry setup:
-url
-keywords
-project_urls (homepage and source)
-entry_points
Do you know how these can be specified with poetry?
from git-sim.
According to the docs, we can just specify those in pyproject.toml
, e.g. repository = "https://github.com/initialcommit-com/git-sim"
So it would look something like this:
[tool.poetry]
name = "git-sim"
version = "0.1.2"
description = "Simulate Git commands ..."
authors = ["Jacob Stopak <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{include = "git_sim"}]
homepage = "https://git-sim.org/"
keywords = ["git", "sim", "simulation", "..."]
repository = "https://github.com/initialcommit-com/git-sim
...
If I understand correctly, you can define the equivalent to entry_points
via plugins in a subsection in the pyproject.toml
(see docs)
edit: Apparently you can also define arbitrary URLs besides homepage and repo: urls
from git-sim.
In relation to #85
I'm not well experienced packaging big projects but small ones.
In #85 you also stated that you are not well experienced with packaing. Because of that I would like to give an advice to save your resources, your time, your nerves and keep the project (and its maintainer) healty. 😄
- Use
pyproject.toml
(without setup.py/setup.cfg) and nothing else. - Use setup.py/setup.cfg only if you really know why you need it. There are reasons but most of them time that are special reasons.
- Don't use poetry, tox or something like this. This are very complex big tools for big purposes. Use them only if you really have a hard indication for it. Otherwise it would waste a lot of your time.
Again about 2. and 3. This are not bad tools. The problem is just that they are recommended in every blog post etc. But they are intended to solve problems that "small projects" usually don't have. Keep your solutions grounded.
If you like you can contact me and I explain you my real world projects how I solved somethings just using pyproject.toml not using anything else.
from git-sim.
Hi @buhtz, thanks for your input on this.
I was not aware that you can also specify dependencies in pyproject.toml
, that's super neat!
-> That kinda obsoletes the usage of poetry for now, I guess.
@initialcommit-io let's close this issue.
@buhtz I'd be glad to work on #85 together, if you are up for it. I have to do some reading about project layout before though 😁
from git-sim.
Sounds good @paketb0te, closing this one for now so pyproject.toml
work can be continued thru #85 .
from git-sim.
Related Issues (20)
- Error in Dockerfile during 'apt update' HOT 3
- git-sim not recognized as command in M1 Apple HOT 3
- Clarify license HOT 5
- Dockerized git-sim fails to run with various errors HOT 5
- Fix arrangement of file names in columns
- Request: Make CHENGELOG.md HOT 1
- Font size is wrong HOT 5
- Cannot run git-sim to generate only images HOT 6
- Error on simple actions HOT 7
- Auto-completion is extremely slow HOT 6
- git submodule not support HOT 2
- Add -v, --version flag to display program version info HOT 2
- Implement PEP 621 (pyproject.toml) and migrate to "src" layout HOT 14
- Support gif animations HOT 1
- Extremely slow on larger repos HOT 9
- Arrow direction HOT 2
- AttributeError: module 'manim' has no attribute 'ArrowTriangleFilledTip' HOT 7
- Two branches without common commit? git-annex use case HOT 14
- --animate log in chronological order of the commits HOT 9
- Refine test suite HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-sim.