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/zshot version #17

Merged
merged 4 commits into from
Oct 17, 2022
Merged

Feat/zshot version #17

merged 4 commits into from
Oct 17, 2022

Conversation

marmg
Copy link
Collaborator

@marmg marmg commented Oct 17, 2022

Status Type ⚠️ Core Change Issue
Hold Refactor No

Problem

  • Refactor __init__.py and setup.py.

The version is in the setup.py file. This doesn't allow doing things like:

import zshot

print(zshot.__version__)
  • The evaluation tests are failing with latest version of evaluate.

In latest version 0.3 of evaluate they don't receive a metric as a positional argument, it must be a keyword argument.

Solution

  • Refactor __init__.py and setup.py.

Moving the version to setup.cfg in the [metadata] field, as proposed in the official guide.

  • The evaluation tests are failing with latest version of evaluate.

Add the metric as a keyword argument to the function call in the tests.

Other changes (e.g. bug fixes, small refactors)

  • Fixed typo and formatting in zshot/evaluation/evaluator.py and zshot/evaluation/zshot_evaluate.py

Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Base: 90.85% // Head: 90.85% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (1250d15) compared to base (c44156d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #17   +/-   ##
=======================================
  Coverage   90.85%   90.85%           
=======================================
  Files          48       48           
  Lines        1727     1728    +1     
=======================================
+ Hits         1569     1570    +1     
  Misses        158      158           
Impacted Files Coverage Δ
zshot/__init__.py 100.00% <100.00%> (ø)
zshot/evaluation/evaluator.py 96.77% <100.00%> (ø)
zshot/tests/evaluation/test_evaluation.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

LGTM

@marmg marmg merged commit 76e3a32 into main Oct 17, 2022
@GabrielePicco GabrielePicco deleted the feat/zshot-version branch October 17, 2022 21:07
GabrielePicco added a commit that referenced this pull request Oct 28, 2022
* 🎉 First commit

* 👷 Build pages doc

* 🎉 First commit

* ✏️ Fix repo links

* 👷 Publish to pypi on release

* 📝 Update Readme.md

* 📝 Update Readme.md

* 👷 Update pypi info

* 👷 Add manual deploy

* 📄 Version tag

* 📄 Update version tag

* 📄 Add pypi long description

* ✏️ Fix typo

* 🎨 Improve doc for pypi

* 📝 Update index

* Delete graph.png

* 💫 Update logo

* ✅ Add python tests

* ⚡ [ImgBot] Optimize images (#1)

*Total -- 392.70kb -> 298.54kb (23.98%)

/docs/img/annotations.png -- 79.47kb -> 49.25kb (38.03%)
/docs/img/graph.png -- 4.94kb -> 3.10kb (37.11%)
/docs/img/zshot-header.png -- 243.67kb -> 193.55kb (20.57%)
/docs/img/blink.png -- 64.62kb -> 52.64kb (18.54%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* 👷 Update python tests

* 📝 Update README.md

* 📝 Update index.md

* ✅ Add codescan action

* ✅ Add code coverage

* 📝 Update Readme.md

* 📝 Update Readme.md

* 🐛 Fixed TypeError when printing DatasetWithEntities (#4)

Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>

* 🐛 Fix displacy render function (#10)

* 🐛 Fix displacy render

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

* ✅ Add displacy test

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>

* 🔖 v0.0.2

* 📝 Update Readme.md (#13)

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>

* ✅ Evaluation tests improvement (#5)

* ✅ Added datasets tests. Added Mentions extractor pipeline and evaluator tests
* 👷 Add action cache
* 🩹 Remove cache after tests passed
* 🔨 Updated load_medmentions to load from hub
* 🗃️ Use org medmentionsZS

Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

* 📝 Update logo

* ♻️ Remove unused code & host Smxm model on HG hub (#14)

* ♻️ Remove unused code

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* 👷 Add CI cache

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* 👷 Update codecov action

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* ♻️ Download smxm from the hugginface hub

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* ♻️ Use models from IBM org on HG hub

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* ⚡ Improve coverage

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* 🎨 Fix code style

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>
Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>

* ➖ delete unused file

* Feat/zshot version (#17)

* 🎨 Improved structure of setup and init.
* ✏️ Fixed minor typos and format in evaluator
* ✅ Update evaluation tests to work with latest version of evaluate
* 🐛 Fixed bug while importing version

* 🎨 Add RE visualization

* 🎨 Fix styling

* 🐛 Fix spans conversion to Spacy ent (#20)

* 🐛 Fix pipeline setup

* 🐛 Fix alignment

* 🐛 Fix import

* 🎨 Code style

* 🐛 Remove appdata

* 🐛 Fix displacy test

Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>
Co-authored-by: Gabriele Picco <piccogabriele@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Marcos Martinez <marcosmartinezgalindo@gmail.com>
GabrielePicco pushed a commit that referenced this pull request Oct 28, 2022
* 🎨 Improved structure of setup and init.
* ✏️ Fixed minor typos and format in evaluator
* ✅ Update evaluation tests to work with latest version of evaluate
* 🐛 Fixed bug while importing version
GabrielePicco added a commit that referenced this pull request Oct 28, 2022
* 🎉 First commit

* 👷 Build pages doc

* 🎉 First commit

* ✏️ Fix repo links

* 👷 Publish to pypi on release

* 📝 Update Readme.md

* 📝 Update Readme.md

* 👷 Update pypi info

* 👷 Add manual deploy

* 📄 Version tag

* 📄 Update version tag

* 📄 Add pypi long description

* ✏️ Fix typo

* 🎨 Improve doc for pypi

* 📝 Update index

* Delete graph.png

* 💫 Update logo

* ✅ Add python tests

* ⚡ [ImgBot] Optimize images (#1)

*Total -- 392.70kb -> 298.54kb (23.98%)

/docs/img/annotations.png -- 79.47kb -> 49.25kb (38.03%)
/docs/img/graph.png -- 4.94kb -> 3.10kb (37.11%)
/docs/img/zshot-header.png -- 243.67kb -> 193.55kb (20.57%)
/docs/img/blink.png -- 64.62kb -> 52.64kb (18.54%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* 👷 Update python tests

* 📝 Update README.md

* 📝 Update index.md

* ✅ Add codescan action

* ✅ Add code coverage

* 📝 Update Readme.md

* 📝 Update Readme.md

* 🐛 Fixed TypeError when printing DatasetWithEntities (#4)

Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>

* 🐛 Fix displacy render function (#10)

* 🐛 Fix displacy render

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

* ✅ Add displacy test

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>

* 🔖 v0.0.2

* 📝 Update Readme.md (#13)

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>

* ✅ Evaluation tests improvement (#5)

* ✅ Added datasets tests. Added Mentions extractor pipeline and evaluator tests
* 👷 Add action cache
* 🩹 Remove cache after tests passed
* 🔨 Updated load_medmentions to load from hub
* 🗃️ Use org medmentionsZS

Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>

* 📝 Update logo

* ♻️ Remove unused code & host Smxm model on HG hub (#14)

* ♻️ Remove unused code

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* 👷 Add CI cache

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* 👷 Update codecov action

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* ♻️ Download smxm from the hugginface hub

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* ♻️ Use models from IBM org on HG hub

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* ⚡ Improve coverage

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

* 🎨 Fix code style

Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>

Signed-off-by: Gabriele Picco <gabriele.picco@ibm.comm>
Signed-off-by: Gabriele Picco <piccogabriele@gmail.com>
Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>

* ➖ delete unused file

* Feat/zshot version (#17)

* 🎨 Improved structure of setup and init.
* ✏️ Fixed minor typos and format in evaluator
* ✅ Update evaluation tests to work with latest version of evaluate
* 🐛 Fixed bug while importing version

* 🎨 Add RE visualization

* 🎨 Fix styling

* 🐛 Fix spans conversion to Spacy ent (#20)

* 🐛 Fix pipeline setup

* 🐛 Fix alignment

* 🐛 Fix import

* 🎨 Code style

* 🐛 Remove appdata

* 🐛 Fix displacy test

Co-authored-by: Gabriele Picco <gabriele.picco@ibm.comm>
Co-authored-by: Gabriele Picco <piccogabriele@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Marcos Martinez <marcosmartinezgalindo@gmail.com>
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.

None yet

2 participants