Skip to content

Commit

Permalink
Replacing setup.py commands in the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
KasukabeDefenceForce committed Aug 15, 2024
1 parent 3ca9010 commit 8c23f81
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"install_command": ["in-dir={env_dir} python -mpip install {wheel_file}"],
"uninstall_command": ["return-code=any python -mpip uninstall -y {project}"],
"build_command": [
"python setup.py build",
"pip install -e .",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
],
"branches": ["origin/master", "HEAD"],
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
# commented out with this explanation to make it clear why this should not be
# done. If the sys.path entry above is added, when the astropy.sphinx.conf
# import occurs, it will import the *source* version of astropy instead of the
# version installed (if invoked as "make html" or directly with sphinx), or the
# version in the build directory (if "python setup.py build_sphinx" is used).
# version installed (if invoked as "make html" or directly with sphinx).
# Thus, any C-extensions that are needed to build the documentation will *not*
# be accessible, and the documentation will not build correctly.

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/development/documentation_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To build TARDIS documentation locally, use the following commands:
.. note::

- If you're working on a fresh local copy of the TARDIS repository, you might need to do ``python setup.py develop`` before executing these commands.
- If you're working on a fresh local copy of the TARDIS repository, you might need to do ``pip install -e .`` before executing these commands.
- Use ``DISABLE_NBSPHINX=1 make html`` to disable notebook rendering (fast mode).
- Use ``make html NCORES=<number of cores>`` to have the documentation build in parallel. Using ``make html NCORES=auto`` instructs Sphinx to use all of your device's cores.
- Use ``make html SPHINXOPTS="<insert sphinx options>"`` to include additional sphinx options, which can be found `here <https://www.sphinx-doc.org/en/master/man/sphinx-build.html#options>`_.
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/development/git_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ TARDIS repository clone.

#. Install TARDIS_ in develop mode::

$ python setup.py develop
$ pip install -e .

This semi-permanently installs TARDIS on your path in such a way that
``tardis`` is always imported from your repository clone regardless of your
Expand Down Expand Up @@ -281,7 +281,7 @@ In more detail
If you have `Sphinx <https://www.sphinx-doc.org/en/master/>`_ installed, you can also check that the documentation
builds and looks correct::

python setup.py build_sphinx
make html

The last line should just state ``build succeeded``, and should not mention
any warnings. (For more details, see the Astropy
Expand Down
6 changes: 2 additions & 4 deletions docs/contributing/development/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,11 @@ TARDIS prints out the progress:

.. code-block:: shell
> python setup.py test --args="--integration=integration.yml -m integration
--generate-reference --less-packets"
> pytest --integration=integration.yml -m integration --generate-reference --less-packets
To run the test after having run the ``--generate-references``, all that is
needed is:

.. code-block:: shell
> python setup.py test --args="--integration=integration.yml -m integration
--less-packets" --remote-data
> pytest --integration=integration.yml -m integration --less-packets --remote-data
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ exclude = '''
| build
| dist
)/
| setup.py
| docs/conf.py
| _astropy_init.py
)
'''

[tool.interrogate]
color = true
#exclude = ["setup.py", "docs", "build"]
#exclude = ["docs", "build"]
#fail-under = 90
ignore-init-method = true
ignore-init-module = true
Expand Down
12 changes: 6 additions & 6 deletions tardis/tests/integration_tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
help="Run integration tests with less packets.",
)


def run_tests():
args = parser.parse_args()
less_packets = "--less-packets" if args.less_packets else ""
test_command = [
"python",
"setup.py",
"test",
"pytest",
"--test-path=tardis/tests/integration_tests/test_integration.py",
"--args",
f"--capture=no --integration-tests={args.yaml_filepath} --tardis-refdata={args.tardis_refdata} --remote-data "
"--capture=no",
f"--integration-tests={args.yaml_filepath}",
f"--tardis-refdata={args.tardis_refdata}",
"--remote-data",
f"{less_packets}",
]
subprocess.call(test_command)

0 comments on commit 8c23f81

Please sign in to comment.