Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
Remove [tests/]requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopelka committed Jan 17, 2020
1 parent e57dfd3 commit b868fc8
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 48 deletions.
10 changes: 3 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ Please take a few minutes to read GitHub's guide on [How to Contribute to Open S

### Dependencies

If you are introducing a new dependency, please make sure it's added to:
* requirements.txt
If you are introducing a new dependency, please make sure it's added to `setup.cfg`.

### Documentation

Expand Down Expand Up @@ -154,13 +153,10 @@ __Note:__ You may need to specify your token in the above command depending on t

### Direct Installation

#### Installing dependencies

Go to the cloned `release-bot` git repository, and run the following commands in a terminal:

```
pip3 install -r requirements.txt
pip3 install -r tests/requirements.txt
pip3 install .
```

#### Running release-bot
Expand Down Expand Up @@ -193,4 +189,4 @@ of test repositories will be left out in your account:

Thank you!

release-bot team.
release-bot team.
4 changes: 2 additions & 2 deletions Dockerfile.app
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN dnf install -y ansible \
&& ansible-playbook -vv -c local -i localhost, files/install-rpm-packages.yaml \
&& dnf clean all

COPY requirements.txt test-requirements.txt setup.py setup.cfg files/recipe.yaml /src/
COPY setup.py setup.cfg files/recipe.yaml /src/
# setuptools-scm
COPY .git /src/.git
COPY release_bot/ /src/release_bot/
Expand All @@ -29,4 +29,4 @@ USER 1001
ENV USER=release-bot
ENV HOME=/home/release-bot

CMD ["release-bot -c /home/release-bot/.config/conf.yaml"]
CMD ["release-bot -c /home/release-bot/.config/conf.yaml"]
6 changes: 1 addition & 5 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ RUN useradd -u 1000 -d ${HOME} test-user

WORKDIR ${HOME}

COPY requirements.txt ${HOME}/
COPY tests/requirements.txt ${HOME}/tests/
RUN pip3 install -r requirements.txt -r tests/requirements.txt

COPY Makefile ${HOME}/

COPY ./tests/ ${HOME}/tests/
RUN chown -R 1000 ${HOME}

COPY . /tmp/tmp/
RUN cd /tmp/tmp/ && pip3 install . && rm -rf /tmp/tmp/
RUN cd /tmp/tmp/ && pip3 install ".[tests]" && rm -rf /tmp/tmp/

USER 1000

Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ node('userspace-containerization'){

stage ("setup"){
onmyduffynode "yum -y install docker make"
synctoduffynode "*" // copy all source files
onmyduffynode "systemctl start docker"
synctoduffynode "*" // copy all source files
}

stage("build test image"){
Expand All @@ -46,7 +46,7 @@ node('userspace-containerization'){
test_targets.each { test_target ->
tests["$test_target"] = {
stage("Test target: $test_target"){
onmyduffynode "docker run -v /root:/usr/src/app:Z -e GITHUB_TOKEN= release-bot-tests make test TEST_TARGET=tests/$test_target"
onmyduffynode "docker run -e GITHUB_TOKEN= release-bot-tests make test TEST_TARGET=tests/$test_target"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ For using the [gitchangelog](https://github.com/vaab/gitchangelog) you must add
The default template `markdown.tpl` is configured to create Markdown divided into sections (New, Changes, Fix, Others) based on the commits. The data sent to the output engine [pystache](https://github.com/defunkt/pystache) by the gitchangelog is in the following [format](https://github.com/vaab/gitchangelog/edit/master/README.rst#L331-L356). You can use it to create a custom template, please refer [mustache](http://mustache.github.io/).

## Requirements
Are specified in `requirements.txt`.
Are specified in `setup.cfg`.
You have to setup your PyPI login details in `$HOME/.pypirc` as described in
[PyPI documentation](https://packaging.python.org/tutorials/distributing-packages/#create-an-account).

Expand Down
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

9 changes: 5 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,19 @@ install_requires =
flask
gitchangelog
pystache
celery
redis
celery[redis]
cryptography
ogr
ogr==0.8.0

[options.packages.find]
exclude =
tests*

[options.extras_require]
testing =
tests =
flexmock
pytest
pytest-timeout

[options.entry_points]
console_scripts =
Expand Down
12 changes: 1 addition & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from pathlib import Path
from setuptools import setup

REQUIREMENTS = Path("./requirements.txt").read_text()
TEST_REQUIREMENTS = Path("./test-requirements.txt").read_text()

setup(
# to install test requirements, run `pip install -e ".[tests]"`
extras_require={
'tests': TEST_REQUIREMENTS
},
install_requires=REQUIREMENTS
)
setup()
1 change: 0 additions & 1 deletion test-requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions tests/requirements.txt

This file was deleted.

0 comments on commit b868fc8

Please sign in to comment.