Skip to content
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

Closed
wants to merge 7 commits into from
Closed

Fixed requirements #192

wants to merge 7 commits into from

Conversation

Hg347
Copy link

@Hg347 Hg347 commented Apr 10, 2024

What I did

  • updated Readme.md with instructions
  • updated dev-requirements.txt and added missing dependencies

How I did it

How to verify it

  • unit tests run through (few with errors)
  • before my update unit tests did not work at all - following dev environment setup as outlined in Readme.md

Description for the changelog

  • updated development environment instructions
  • fixed package dependencies to run the unit tests

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

Copy link

socket-security bot commented Apr 10, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
pypi/[email protected] None 0 72 kB bitprophet
pypi/[email protected] None 0 57.1 kB Zac-HD, adriangb
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe 0 748 kB Thomas.Grainger, agronholm, njs, ...1 more
pypi/[email protected] environment, unsafe 0 4.03 MB hynek
pypi/[email protected] environment 0 136 kB hynek
pypi/[email protected] environment, eval, filesystem, unsafe 0 734 kB crsmithdev, jadchaar, krisfremen, ...1 more
pypi/[email protected] environment, eval, network 0 341 kB alexmojaki, dsagal
pypi/[email protected] environment, eval, filesystem, shell, unsafe 0 35.7 MB akx, babel, cmlenz, ...2 more
pypi/[email protected] environment, eval, filesystem, network, unsafe 0 2.1 MB leonard
pypi/[email protected] eval, filesystem, unsafe 0 1.31 MB ilanschnell
pypi/[email protected] environment, eval, filesystem 0 871 kB gguthe-moz, willhelm
pypi/[email protected] shell 0 67.2 kB pydanny
pypi/[email protected] environment, filesystem, unsafe 0 1.05 MB Sekenre, agronholm
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe 0 2.15 MB Armin.Rigo, alexgaynor, fijal, ...5 more
pypi/[email protected] None 0 379 kB jtraglia
pypi/[email protected] environment, eval, filesystem, network, shell 0 923 kB
pypi/[email protected] environment, eval, filesystem, shell, unsafe 0 9.31 MB eriknw
pypi/[email protected] environment, filesystem, network, shell 0 378 kB tiran
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe 0 1.65 MB vsajip
pypi/[email protected] environment, eval, filesystem, shell, unsafe 0 6.98 MB felixwiemann, goodger, grubert, ...1 more
pypi/[email protected] filesystem 0 39.6 kB carver, kclowes, nick.ghita, ...2 more
pypi/[email protected] environment, filesystem, unsafe 0 45.7 kB carver, fselmo, kclowes, ...2 more
pypi/[email protected] environment, filesystem 0 49.6 kB carver, kclowes, pacrob, ...1 more
pypi/[email protected] environment, filesystem 0 116 kB carver, kclowes, pacrob, ...1 more
pypi/[email protected] filesystem 0 24.6 kB carver, fselmo, kclowes, ...2 more
pypi/[email protected] environment, filesystem, network, shell, unsafe 0 457 kB carver, cburgdorf, fselmo, ...5 more
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe 0 9.45 MB 15r10nk, alexmojaki
pypi/[email protected] eval, filesystem, network 0 4.53 MB horejsek
pypi/[email protected] None 0 23.8 kB gxg
pypi/[email protected] filesystem 0 28.3 kB carver, fselmo, kclowes, ...2 more
pypi/[email protected] None 0 0 B
pypi/[email protected] filesystem, network 0 1.58 MB shibu
pypi/[email protected] filesystem 0 38 kB victorm
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe 0 5.18 MB David.Halter
pypi/[email protected] environment, eval, filesystem, unsafe 0 988 kB
pypi/[email protected] filesystem 0 36.1 kB skoegl
pypi/[email protected] environment, filesystem 0 63.5 kB
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe 0 1.19 MB Kyle.Kelley, MSeal, Sylvain.Corlay, ...11 more
pypi/[email protected] environment, eval, filesystem, network, shell 0 409 kB Kyle.Kelley, MSeal, bgranger, ...12 more
pypi/[email protected] environment 0 169 kB blink1073, jupyter-release-bot, zsailer
pypi/[email protected] environment, filesystem, network 0 118 kB blink1073, jupyter-server-releaser, zsailer
pypi/[email protected] environment, eval, filesystem, network, shell 0 2.8 MB Sylvain.Corlay, blink1073, darian, ...7 more
pypi/[email protected] eval, network 0 694 kB
pypi/[email protected] unsafe 0 148 kB Amit.Dev
pypi/[email protected] environment, unsafe 0 143 kB
pypi/[email protected] None 0 25.7 kB hukkin
pypi/[email protected] filesystem 0 431 kB lepture
pypi/[email protected] environment, filesystem, shell 0 246 kB MSeal, Sylvain.Corlay, davidbrochart
pypi/[email protected] environment, eval, filesystem, network, shell 0 2.36 MB Kyle.Kelley, MSeal, Sylvain.Corlay, ...13 more
pypi/[email protected] environment, filesystem, network, shell 0 637 kB Kyle.Kelley, MSeal, Sylvain.Corlay, ...11 more
pypi/[email protected] filesystem 0 97.7 kB mkorpela, robotframework
pypi/[email protected] environment, eval, filesystem, shell 0 2.39 MB brettcannon, dstufft, pf_moore, ...1 more
pypi/[email protected] environment, filesystem 0 38.9 kB ickc, jgm
pypi/[email protected] eval, filesystem 0 190 kB erikrose, lonnen, lucaswiman
pypi/[email protected] environment, eval, filesystem, shell, unsafe 0 871 kB David.Halter
pypi/[email protected] filesystem 0 217 kB cpburnz
pypi/[email protected] environment, shell 0 117 kB Julian, Ofekmeister, ronny
pypi/[email protected] environment, eval, filesystem, network 0 354 kB beorn7, csmarchbanks
pypi/[email protected] environment, eval, filesystem, network, shell 0 1.78 MB jonathan.slenders
pypi/[email protected] environment, eval, filesystem, network, shell 0 3.15 MB charles-cooper, fubuloubu, iamdefinitelyahuman, ...1 more

🚮 Removed packages: pypi/[email protected], pypi/[email protected]

View full report↗︎

.gitignore Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Comment on lines 19 to 27

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
Copy link
Collaborator

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

Suggested change
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

Copy link
Author

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.

Copy link
Author

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
Copy link
Collaborator

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

Copy link
Author

@Hg347 Hg347 Apr 11, 2024

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:

  1. exact dependencies that are proven to work and where all tests pass successfully (freezed requirements.txt)
  2. loose dependencies to receive latest updates of libraries and develop with most recent versions (dev-requirements.txt)

Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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 Show resolved Hide resolved
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.
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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"

Copy link
Author

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

Hg347 and others added 5 commits April 11, 2024 18:22
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
@Hg347 Hg347 closed this Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants