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

Remove deprecated setup.py #2798

Merged
merged 7 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
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
4 changes: 0 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,3 @@ linkcheck:
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
@echo "Run 'python setup.py test' in the root directory to run doctests " \
@echo "in the documentation."
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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
make html
cd docs && 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
5 changes: 3 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ this method by following the steps described below.
$ git remote add upstream [email protected]:tardis-sn/tardis.git
$ git fetch upstream
$ git checkout upstream/master
$ python setup.py develop
$ pip install -e .

.. note::

Expand Down Expand Up @@ -124,7 +124,8 @@ We highly recommend deleting your existing environment and creating a new one us
Use the following ``conda`` command to remove your current ``tardis`` environment:

::
$ conda remove --name tardis --all

atharva-2001 marked this conversation as resolved.
Show resolved Hide resolved
$ conda remove --name tardis --all

Now, you can create a new environment by following the steps given `here <https://tardis-sn.github.io/tardis/installation.html#install-with-lockfiles>`_.

4 changes: 1 addition & 3 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 Expand Up @@ -134,7 +133,6 @@ lint.ignore = [ # NOTE: non-permanent exclusions should be added to `.ruff.toml
]

[tool.ruff.lint.extend-per-file-ignores]
"setup.py" = ["INP001"] # Part of configuration, not a package.
".github/workflows/*.py" = ["INP001"]
"test_*.py" = [
"B018", # UselessExpression
Expand Down
83 changes: 0 additions & 83 deletions setup.py

This file was deleted.

12 changes: 6 additions & 6 deletions tardis/tests/integration_tests/runner.py
Copy link
Contributor

Choose a reason for hiding this comment

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

This file has a black format issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this in commit c49bf26

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)

Loading