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

Feature/pep 518 #100

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

eyzeedev
Copy link

Replace setup.py with pyproject.toml, removing need for deprecated setup_requires setup.py configuration field.

Description

As documented for modern setuptools supporting PEP518, build dependencies are now specified in the [build-system] block of pyproject.toml.

This fixes a particular issue where running a pip install with command line arguments would not have those arguments (such as --index-url) copied to the pip install command executed to install setup_requires requirements.

pipenv scripts and workflow is unaffected.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • 'pipenv install -e ".[dev]"
(seqeval) ➜  seqeval git:(feature/pep-518) ✗ pipenv install -e ".[dev]"
Installing -e .[dev]...
Resolving -e ....
Installing...
Adding seqeval to Pipfile's [packages] ...
✔ Installation Succeeded
Pipfile.lock (7da7fa) out of date, updating to (1a45e3)...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success!
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success!
Updated Pipfile.lock (ac7960b203f233b9e8abf1f4ea3b72846422dd64f5dba0d77fb5bcbc631a45e3)!
Installing dependencies from Pipfile.lock (1a45e3)...
  • pipenv run test
=============================================================================== test session starts ================================================================================
platform darwin -- Python 3.9.11, pytest-7.1.1, pluggy-1.0.0 -- /Users/ktmx283/.pyenv/versions/3.9.11/bin/python
cachedir: .pytest_cache
metadata: {'Python': '3.9.11', 'Platform': 'macOS-12.2.1-arm64-arm-64bit', 'Packages': {'pytest': '7.1.1', 'py': '1.11.0', 'pluggy': '1.0.0'}, 'Plugins': {'metadata': '2.0.1', 'docker': '0.12.0', 'html': '3.1.1', 'cov': '4.0.0'}}
rootdir: /Users/ktmx283/Library/CloudStorage/OneDrive-AZCollaboration/dev/seqeval
plugins: metadata-2.0.1, docker-0.12.0, html-3.1.1, cov-4.0.0
collected 475 items

tests/test_scheme.py::test_entity_repr PASSED                                                                                                                                [  0%]
...                                                                                               [ 99%]
tests/test_v1.py::TestClassificationReport::test_output_string PASSED                                                                                                        [100%]

================================================================================= warnings summary =================================================================================
tests/test_v1.py::TestPrecisionRecallFscoreSupport::test_scores
tests/test_v1.py::TestPrecisionRecallFscoreSupport::test_average_scores[macro-expected1]
tests/test_v1.py::TestPrecisionRecallFscoreSupport::test_average_scores[weighted-expected2]
tests/test_v1.py::TestPrecisionRecallFscoreSupport::test_average_scores_beta_inf[macro-expected1]
tests/test_v1.py::TestPrecisionRecallFscoreSupport::test_average_scores_beta_inf[weighted-expected2]
tests/test_v1.py::TestClassificationReport::test_output_dict
tests/test_v1.py::TestClassificationReport::test_output_string
  /Users/ktmx283/Library/CloudStorage/OneDrive-AZCollaboration/dev/seqeval/seqeval/metrics/v1.py:57: UndefinedMetricWarning: Recall and F-score are ill-defined and being set to 0.0 in labels with no true samples. Use `zero_division` parameter to control this behavior.
    _warn_prf(average, modifier, msg_start, len(result))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform darwin, python 3.9.11-final-0 ----------
Name                                   Stmts   Miss  Cover   Missing
--------------------------------------------------------------------
seqeval/__init__.py                        0      0   100%
seqeval/metrics/__init__.py                1      0   100%
seqeval/metrics/sequence_labeling.py     157    137    13%   108-142, 161-198, 213-236, 251-274, 349-366, 390-399, 473-488, 562-577, 598-610, 669-716
seqeval/metrics/v1.py                    128      7    95%   50-55, 65, 188
seqeval/reporters.py                      42      2    95%   11, 15
seqeval/scheme.py                        164      1    99%   263
--------------------------------------------------------------------
TOTAL                                    492    147    70%

========================================================================= 475 passed, 7 warnings in 45.10s =========================================================================

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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

1 participant