-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add poetry support #624
add poetry support #624
Conversation
c1a7c44
to
558fd07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @An-Li-magicloud just a comment: I noticed that tox.ini
was removed and now the tests just run pytest
. Is there any way to keep tox
? It is very useful for us to test many python versions 3.7+, OS, and configure things like environment variables, which we need for some features coming soon. If there is a way to keep it, that would be ideal. This article describes a way to do it link.
tox.ini
[tox]
skipsdist = true
envlist = py37, py38
[testenv]
whitelist_externals = poetry
commands =
poetry install -v
poetry run pytest
e7b7724
to
ae3917e
Compare
7ce3ac7
to
2de2127
Compare
2de2127
to
a3ada32
Compare
da61736
to
aa127b8
Compare
aa127b8
to
fb4a646
Compare
ee175fc
to
785dced
Compare
I'm reluctant to merge this because more and more we are relying on dependency groups. For example, we have added |
7acc7b1
to
d58051e
Compare
Sorry for the late response. Here is another solution by using [tool.poetry.dependencies]
gdstk = { version = "xxx", optional=true }
[tool.poetry.extras]
gds = ["gdstk"] When user needs gdstk in there local environment, use
https://python-poetry.org/docs/pyproject/#extras
|
Thanks for looking into this An, I'm planning to merge the webapi refactor next (#730) and then revisiting this once that is in. I think for me it seems we can do everything we currently need already with setup.py. If we want to switch to poetry, it will involve some learning curve and adjustment to the way we do things, including on the backend, so I think we want to make sure it is worth the investment if we do change, especially now that we are trying to finish a few things before a major release. In your opinion, what would be the main advantage(s) of moving to poetry? Do you think it's worth it for the future of Tidy3D? |
Here are what I felt poetry is better than raw pip:
|
I will close this PR for now because it's diverged so much from the main branch. But when (and if) we do poetry, I will pull aspects from this PR and maybe make a new one. |
Changes:
tidy3d configure
cli for apikey setuppoetry install