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

G3 134: The geneweaver.core enumerations should use builtin IntEnum and StrEnum #4

Conversation

bergsalex
Copy link
Collaborator

@bergsalex bergsalex commented Jan 19, 2024

Switching to IntEnum for Integer based enum definitions to allow usage in FastAPI type annotations.

Copy link

github-actions bot commented Jan 19, 2024

Test Coverage Report

---------- coverage: platform linux, python 3.11.7-final-0 -----------
Name                                          Stmts   Miss  Cover
-----------------------------------------------------------------
src/geneweaver/core/__init__.py                   1      0   100%
src/geneweaver/core/config.py                     2      0   100%
src/geneweaver/core/config_class.py              10      0   100%
src/geneweaver/core/enum.py                     118      1    99%
src/geneweaver/core/exc.py                        4      0   100%
src/geneweaver/core/parse/__init__.py             0      0   100%
src/geneweaver/core/parse/batch.py              112      2    98%
src/geneweaver/core/parse/csv.py                 54      0   100%
src/geneweaver/core/parse/enum.py                 8      0   100%
src/geneweaver/core/parse/exceptions.py          21      0   100%
src/geneweaver/core/parse/numpy.py               45      0   100%
src/geneweaver/core/parse/score.py               41      0   100%
src/geneweaver/core/parse/threshold.py           15      0   100%
src/geneweaver/core/parse/utils.py               24      3    88%
src/geneweaver/core/parse/xlsx.py                88     26    70%
src/geneweaver/core/publication/__init__.py       0      0   100%
src/geneweaver/core/publication/pubmed.py        69      0   100%
src/geneweaver/core/render/__init__.py            0      0   100%
src/geneweaver/core/render/batch.py              19      0   100%
src/geneweaver/core/render/csv.py                10      0   100%
src/geneweaver/core/render/gene_list.py           4      0   100%
src/geneweaver/core/schema/__init__.py            7      0   100%
src/geneweaver/core/schema/batch.py              69      8    88%
src/geneweaver/core/schema/gene.py               45      2    96%
src/geneweaver/core/schema/geneset.py            76      0   100%
src/geneweaver/core/schema/group.py              14      0   100%
src/geneweaver/core/schema/legacy_api.py         28      0   100%
src/geneweaver/core/schema/messages.py           16      0   100%
src/geneweaver/core/schema/ontology.py           19      0   100%
src/geneweaver/core/schema/project.py            12      0   100%
src/geneweaver/core/schema/publication.py        14      0   100%
src/geneweaver/core/schema/score.py              12      1    92%
src/geneweaver/core/schema/stubgenerator.py       6      0   100%
src/geneweaver/core/schema/user.py               23      0   100%
src/geneweaver/core/types.py                      4      0   100%
src/geneweaver/core/utils.py                      4      0   100%
-----------------------------------------------------------------
TOTAL                                           994     43    96%
Coverage HTML written to dir htmlcov

Required test coverage of 90% reached. Total coverage: 95.67%

=========== 41336 passed, 2 skipped, 1 xfailed in 137.64s (0:02:17) ============

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just checking, are existing unit test cases covering these changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have anything to check that these are IntEnums, but we have existing unit tests that use these enums.

@bergsalex
Copy link
Collaborator Author

@francastell, I added a test to verify that the IntEnum classes are in fact IntEnum classes.

@bergsalex bergsalex merged commit f0ecad9 into main Jan 19, 2024
9 checks passed
@bergsalex bergsalex deleted the G3-134-the-geneweaver-core-enumerations-should-use-builtin-int-enum-and-str-enum branch May 29, 2024 20:48
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