Skip to content

Consider reduce dependencies #935

@bact

Description

@bact

Background

  • It is becoming more difficult to build the entire PyThaiNLP package since it has a long list of dependencies, and each of them may require conflicting versions of subdependencies.
  • Dependency installation alone can take longer than one hour for each platform, way unhealthy to get responses for development
  • Some dependencies also only support older/end-of-life versions of Python, making the situation more complicated. Some CI environments may not support these old Python versions. It is of security concerns too. See Python end of life information here https://devguide.python.org/versions/

Proposal

  • Use the standard library when it possible. Often times there are functionalities that good enough for the job.
  • For the features PyThaiNLP develops on our own, try to stick with a single library/framework for one particular area of purposes (for example, use either Tensorflow or PyTorch; avoid using both)
  • Before adding a new dependency, assess first what are the transitive dependencies
  • Lazy import when possible. (This does not help shortening the test time though)
  • Consider putting the dependencies as a separate section in the optional dependencies in pyproject.toml. Keep the dependencies for the standard installation minimal. (This does not help shortening the test time though)
  • Prefer dependencies that the community is active, consistently fixing bugs, keep updating the package to work with recent Python versions.

See also

Notes

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency filehelp wantedno contributor yetrefactoringa technical improvement which does not add any new features or change existing features.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions