nx-python icon indicating copy to clipboard operation
nx-python copied to clipboard

Make lint and test sources configurable to support other file organization schemes

Open jonrkarr opened this issue 3 years ago • 0 comments

Thanks for creating this great package. We'd like to use it in conjunction with the BioSimulations project. To use nx-python, we need a little more flexibility in configuring the sources for linting and testing.

  • I'm submitting a ...

    • [ ] bug report
    • [x] feature request
    • [ ] support request
  • What is the current behavior? Currently, linting and testing assume that the python code is organized as a single flat directory (see below) and that the tests are organized within the src directory. Not all projects fit this organizational scheme. In particular, more complex projects often employ subdirectories.

    • lint: const sources = '${root}/src/*.py' https://github.com/eulerrapp/nx-python/blob/main/packages/nx-python/src/builders/lint/builder.ts#L12
    • test: const sources = '${root}/src/*test*.py' https://github.com/eulerrapp/nx-python/blob/main/packages/nx-python/src/builders/test/builder.ts#L12
  • What is the expected behavior? It would be helpful to support other organizational schemes, by making the lint and test paths configurable. For example, then the lint sources could be ${root}/src/' and the test sources could be ${root}/tests/.

  • What is the motivation / use case for changing the behavior? Support other organizational schemes for python projects.

jonrkarr avatar Nov 08 '21 14:11 jonrkarr