Skip to content

Commit

Permalink
add wheel to build, include a requirements_dev.txt and document (#35)
Browse files Browse the repository at this point in the history
* add wheel to build, include a requirements_dev.txt and document

* update requirements
  • Loading branch information
shapiromatron authored Nov 1, 2022
1 parent 3d4f8e9 commit d7ec65c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black pyflakes mypy
pip install -r requirements_dev.txt
- name: Check black formatter and pyflakes
run: |
black forestplot/ --check -l 95
Expand All @@ -36,8 +36,6 @@ jobs:
mypy
- name: Generate coverage report
run: |
pip install pytest coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
coverage run -m pytest
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
Expand All @@ -58,8 +56,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements_dev.txt
- name: Test with pytest
run: |
pytest -v --disable-warnings
Expand All @@ -80,8 +77,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements_dev.txt
- name: Test with pytest
run: |
pytest -v --disable-warnings
Expand All @@ -102,8 +98,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -r requirements.txt
pip install -r requirements_dev.txt
- name: Test with pytest
run: |
pytest -v --disable-warnings
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ prepack:
@echo "+ $@"
@rm -rf dist/ forestplot.egg-info/
@rm -rf dist/ pyforestplot.egg-info/
@python setup.py sdist
@python setup.py sdist bdist_wheel
twine check dist/*

PACKAGE_FILES := build/ dist/ *.egg-info/ *.egg-info *.egg
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ git clone https://github.com/LSYS/forestplot.git
cd forestplot
pip install .
```

Developer installation<br>
```bash
git clone https://github.com/LSYS/forestplot.git
cd forestplot
pip install -r requirements_dev.txt

make lint
make test
```

<p align="right">(<a href="#top">back to top</a>)</p>


Expand Down
16 changes: 16 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-r requirements.txt

# build
wheel

# test
coverage
pytest

# lint
black
flake8
mypy

# package in local install
-e .

0 comments on commit d7ec65c

Please sign in to comment.