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

Simplified dev-setup. #385

Merged
merged 2 commits into from
Oct 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,3 @@ fi

# update location of Git hooks from default (.git/hooks) to the versioned folder .devtools/githooks
git config core.hooksPath ".devtools/githooks"

# install project requirements
python -m pip install -r requirements/requirements-setup.txt
python -m pip install -r requirements/requirements-test.txt
python -m pip install -r requirements/requirements.txt
12 changes: 7 additions & 5 deletions docs/community/devsetup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ GluonTS requires Python 3.6 or higher to run. This setup guide assumes that the
``python`` command references a Python 3.6 version or higher. We recommend
using pyenv_ for managing Python versions.

Upon checking out this package, please run the following script::
Upon checking out this package, please run the following::

./dev_setup.sh
pip install -e .[dev]

# if you use zsh you might need to escape `[` and `]`
pip install -e ".[dev]"

This will install all required packages with pip and setup a Git hook that does
automated type and style checks when you try to create a new Git commit.
Expand All @@ -22,12 +26,10 @@ with the ``--no-verify`` Git commit option.
Build Instructions
------------------

To build the project from source::

python setup.py build

To run the project tests::

pytest
# or
python setup.py tests

To build the project documentation::
Expand Down
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ def run(self):
sys.exit(exit_code)


tests_require = find_requirements("requirements-test.txt")
shell_require = find_requirements("requirements-extras-shell.txt")
setup_requires = find_requirements(
"requirements-setup.txt"
) + find_requirements("requirements-docs.txt")

setup_kwargs: dict = dict(
name="gluonts",
use_scm_version={"fallback_version": "0.0.0"},
Expand All @@ -195,18 +201,14 @@ def run(self):
package_dir={"": "src"},
packages=find_namespace_packages(include=["gluonts*"], where=str(SRC)),
include_package_data=True,
setup_requires=list(
itertools.chain(
find_requirements("requirements-setup.txt"),
find_requirements("requirements-docs.txt"),
)
),
setup_requires=setup_requires,
install_requires=find_requirements("requirements.txt"),
tests_require=find_requirements("requirements-test.txt"),
tests_require=tests_require,
extras_require={
"dev": tests_require + shell_require + setup_requires,
"R": find_requirements("requirements-extras-r.txt"),
"Prophet": find_requirements("requirements-extras-prophet.txt"),
"shell": find_requirements("requirements-extras-shell.txt"),
"shell": shell_require,
},
entry_points=dict(
console_scripts=[
Expand Down