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

Replace make stuff to python stuff #1613

Closed
wants to merge 2 commits into from

Conversation

david-ragazzi
Copy link
Contributor

Fixes #1618.

This PR was created to simplify #1579 . Its objective is remove make stuff as the repository will be fully pythonic.

Detailed changes in logic order:

  • Remotion of custom targes from CMakeLists.txt
  • Readme updated with python instructions

CC: @oxtopus @rhyolight @scottpurdy

# Python OPF swarming tests (requires mysql)
make python_swarming_tests
# Python unit tests
python $NUPIC/scripts/run_tests.py -u --coverage
Copy link
Contributor

Choose a reason for hiding this comment

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

Previously we recommended this:

./run_tests.sh ...

If you want to switch to run_tests.py then perhaps we should remove run_tests.sh. Eventually I think we should remove all of the test runners and in the README recommend py.test ... instead since that gives people the most flexibility (and they could use nose or whatever their preferred test runner is).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like @oxtopus to chime in on this too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you want to switch to run_tests.py then perhaps we should remove run_tests.sh.

I also would remove as we want leave the repo more pythonic and cross-platform. It's ok, @oxtopus ?

Copy link
Member

Choose a reason for hiding this comment

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

I think I'm the only one who still wants run_tests.sh, but I give it up!! 😉

Copy link
Contributor

Choose a reason for hiding this comment

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

The run_tests.sh is there because of a policy at Numenta to have consistent entry points for invoking tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The run_tests.sh is there because of a policy at Numenta to have consistent entry points for invoking tests.

setuptools.setup has a entry_points and scripts parameters which allows we specify python scripts to be installed in the system and may be called in everywhere on shell only typing its name. This is the case of nustudio on nupic.studio:

/~https://github.com/nupic-community/nupic.studio/blob/master/setup.py#L37

I simply type nustudio on the shell (not matter from where I call it) and voilá! NuPIC Studio is executed!

I believe that these ones are the right (read default) way to call entry points in Python projects.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rhyolight @oxtopus @scottpurdy

Please look this:
#1622

@david-ragazzi
Copy link
Contributor Author

I'm closing this and putting the changes into #1622 as it will continue tiny and merge conflicts will be avoided.

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.

Use python test commands in README and travis (remove cmake commands)
4 participants