Skip to content

Commit

Permalink
Use setup.py for all installs (#632)
Browse files Browse the repository at this point in the history
Instead of requirements.txt
  • Loading branch information
rafmudaf committed Apr 25, 2023
1 parent b4e538f commit 68820b7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check-working-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- name: Install project
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install nbconvert # For converting Jupyter notebook to python script in the next step
- name: Run examples
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:

- name: Install dependencies
run: |
pip install -r docs/requirements.txt
pip install -e .
pip install -e ".[docs]"
# Build the book
- name: Build the book
Expand Down
4 changes: 2 additions & 2 deletions docs/dev_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ is located at `floris/.github/workflows/continuous-integration-workflow.yaml`.
The online documentation is built with Jupyter Book which uses Sphinx
as a framework. It is automatically built and hosted by GitHub, but it
can also be compiled locally. Additional dependencies are required
for the documentation, and they are listed in ``docs/requirements.txt``.
for the documentation, and they are listed in the `EXTRAS` of `setup.py`.
The commands to build the docs are given below. After successfully
compiling, a file should be located at ``docs/_build/html/index.html``.
This file can be opened in any browser.

```bash
pip install -r docs/requirements.txt
pip install -e .["docs"]
jupyter-book build docs/

# Lots of output to the terminal here...
Expand Down
5 changes: 0 additions & 5 deletions docs/requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions requirements.txt

This file was deleted.

5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
]

# What packages are optional?
# To use: pip install -e ".[develop]" or pip install "floris[develop]"
# To use:
# pip install -e ".[docs,develop]" install both sets of extras in editable install
# pip install -e ".[develop]" installs only developer packages in editable install
# pip install "floris[develop]" installs developer packages in non-editable install
EXTRAS = {
"docs": {
"jupyter-book",
Expand Down

0 comments on commit 68820b7

Please sign in to comment.