Coder Social home page Coder Social logo

Comments (4)

clusterfudge avatar clusterfudge commented on May 24, 2024

I'm not fully aligned with this strategy; I've tried it in the past, and it actually results in some basic issues. The largest is that there is almost always an intentional difference between packaged build/runtime dependencies and test dependencies, and python does not have a better way of breaking these out.

For example, in #125 , we're introducing a dependency on flake8 and pytest for the build process. Those should not be dependencies of the released artifact, but also probably shouldn't only be specified in the github actions build file.

From the last round of "what's the best way to", I concluded two things:

  • Only runtime requirements should exist in setup.py; this is instructs tools like pip how to resolve transitive dependencies, and should specifically be runtime dependencies.
  • Development dependencies (testing tools, code generation, doc parsers) and runtime dependencies should exist in requirements.txt, so that any developer can easily git clone + pip install -r requirements.txt and be able to run tests.

I'm curious though, is this opinion in conflict with #124 ? Theoretically if source builds include test files, you would want to specify their dependencies somehow.

from adapt.

forslund avatar forslund commented on May 24, 2024

Adapt has the file test-requirements.txt which could be updated and used in the github-actions.

I've recently learned that the -r flag can be used in requirements files to include another file. so the test-requirements.txt could be updated to be

pytest
flake8
-r requirements.txt

(possibly renaming it to dev-requirements.txt or something)

There is also the option of having the setup.py called from the requirements file. Keeping the necessary requirements in the setup.py and dev requirements in requirements.txt.

Then another option that I've been looking at for mycroft-messagebus-client is to use the tests_require and test arguments for setup() to be able to call python setup.py test to perform the tests

from adapt.

clusterfudge avatar clusterfudge commented on May 24, 2024

-r requirements.txt

oooooooohhhhhhhh! ✨

from adapt.

forslund avatar forslund commented on May 24, 2024

Closed via #127

from adapt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.