-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fixed requirements #192
Fixed requirements #192
Conversation
dev-requirements.txt
Outdated
|
||
eth-stdlib>=0.2.7,<0.3.0 | ||
eth-abi>=5.1.0 | ||
eth-typing>=4.1.0 | ||
eth-utils>=4.1.0 | ||
eth-account>=0.12.1 | ||
vyper==0.3.10 | ||
py-evm>=0.10.0b4 | ||
rich |
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.
This should not be duplicated here, these are part of pyproject.toml
eth-stdlib>=0.2.7,<0.3.0 | |
eth-abi>=5.1.0 | |
eth-typing>=4.1.0 | |
eth-utils>=4.1.0 | |
eth-account>=0.12.1 | |
vyper==0.3.10 | |
py-evm>=0.10.0b4 | |
rich |
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.
To be honest, I even did not see the .toml file and I even did not know that something like that exists. Now I know :) I also did not 'pip install titanoboa' - my fault.
However, with my understanding for now it should all move into the toml file, I will provide an update on that.
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.
Please review the latest commit
@@ -0,0 +1,154 @@ | |||
ipython==8.23.0 |
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.
This file should be deleted, the dependencies are in pyproject.toml
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.
Here too, I'm new to python. My understanding so far, the .toml file contains the runtime or "production" configuration, while requirements.txt specifies the development setup.
Here is my reasoning
That is, .toml should contain neither pytest nor hypothesis, but requirements.txt should contain both.
Second, as developer I would like to have two things:
- exact dependencies that are proven to work and where all tests pass successfully (freezed requirements.txt)
- loose dependencies to receive latest updates of libraries and develop with most recent versions (dev-requirements.txt)
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.
honestly if there is an update to a library that causes an issue, we should want to find out in the development cycle. freezing the requirements like so silences the issue until users find it
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.
Well, I see your point. Still, I couldn't work or contribute for weeks because the tests failed.
From my perspective, the idea of the master branch in Git is that there is a common, working base. This why I suggested a dev_requirements and a freezed_requirements. This solution would take both views into account.
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.
how were the tests failing? and how did you end up fixing them?
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.
easy to reproduce: few weeks ago I fetched the main branch: commit 98c7b58
Then I did:
source .venv/bin/activate
pip install git+https://github.com/vyperlang/titanoboa
pip install titanoboa==0.1.9
The last command is necessary since you published a newer version of titanoboa meanwhile.
Finally I executed
make test
Result: 23 failed, 168 passed, 2 warnings, 71 errors in 19.26s
If I use the requirements.txt as specified in this PR all tests pass.
README.md
Outdated
@@ -10,7 +10,28 @@ Titanoboa achieves feature parity with the vyper compiler while providing an int | |||
|
|||
Usage and quickstart are [below](#usage-quick-start). For more detailed documentation, please see the [documentation](https://titanoboa.readthedocs.io/en/latest/index.html). | |||
|
|||
## Installation | |||
## Setup dev environment | |||
Clone titanoboa git repo and change into the newly created directory. |
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.
why is this different from the "latest dev version" installation instructions below?
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.
Well, I'm not very familiar with python and python packaging. As I understand it, does the section "latest dev version" not explain on how to prepare a dev environment but rather how to get the latest dev version of the project.
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.
in that case, this should not replace the "Installation" section but rather be a section further down below like "Setting up a development environment for contributing to titanoboa"
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.
Please review the latest commit
Co-authored-by: Daniel Schiavini <[email protected]>
Wording adjusted as suggested Co-authored-by: Daniel Schiavini <[email protected]>
changed order of commands Co-authored-by: Daniel Schiavini <[email protected]>
Co-authored-by: Daniel Schiavini <[email protected]>
- cleaned up and reorganized readme.md - moved dev dependencies from .toml to dev-requirements.txt - updated .toml with runtime dependencies - added upper limits for possible versions - added .vscode folder to .gitignore
What I did
How I did it
How to verify it
Description for the changelog
Cute Animal Picture