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

feat: PackageManifest utilities for working with Compilers list [APE-1497] #94

Merged
merged 12 commits into from
Nov 4, 2023

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 2, 2023

What I did

  • Adds method for getting a contract type's Compiler
  • Adds method for updating a manifest's compilers list
  • Adds equality override in Compiler for ignoring contractTypes in equality check.
  • Fixes bug where we could not have None contract types even though it said we could

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@vany365 vany365 changed the title feat: compiler tools feat: compiler tools [APE-1497] Nov 2, 2023
@antazoey antazoey force-pushed the feat/compiler-tools branch from 210eabd to aaddee5 Compare November 2, 2023 14:25
@antazoey antazoey force-pushed the feat/compiler-tools branch from aaddee5 to fb3db29 Compare November 2, 2023 17:33
@antazoey antazoey marked this pull request as ready for review November 2, 2023 17:34
@antazoey antazoey force-pushed the feat/compiler-tools branch from b6a3b77 to 5908929 Compare November 2, 2023 17:59
@antazoey antazoey force-pushed the feat/compiler-tools branch from 915cfce to 3b87cbc Compare November 2, 2023 19:54
@antazoey antazoey changed the title feat: compiler tools [APE-1497] feat: PackageManifest utilities for working with Compilers list [APE-1497] Nov 2, 2023
@antazoey antazoey requested a review from fubuloubu November 2, 2023 20:14
@antazoey
Copy link
Member Author

antazoey commented Nov 3, 2023

@fubuloubu thoughts? The changes here are rather agnostic.


return None

def update_compilers(self, compilers: List[Compiler]):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also be extend_compilers ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just add_compilers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and could be add_compilers(*compilers: Sequence[Compiler])

fubuloubu
fubuloubu previously approved these changes Nov 3, 2023
@antazoey antazoey merged commit 36fa9b6 into ApeWorX:main Nov 4, 2023
10 checks passed
@antazoey antazoey deleted the feat/compiler-tools branch November 4, 2023 00:49

self.compilers = full_list
start = self.compilers or []
start.extend([c for c in compilers if c not in start])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the future I think .extend takes in a sequence so you can just do .extend(c for c in ...)

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.

2 participants