#244 change Makefile and other scripts into ./run, drop spec
Merged 2 years ago by kparal. Opened 2 years ago by kparal.

file modified
+4 -5
@@ -1,4 +1,5 @@ 

  # editors

+ /.atomgrammars

  /.idea/

  /.ropeproject/

  *.swp
@@ -9,17 +10,15 @@ 

  .sass-cache/

  *__pycache__*

  

- # compile artifacts

- /docs/_build/

- /*.src.rpm

- /*.tar.gz

+ # build artifacts

+ /blockerbugs.egg-info/

+ /build/

  *.pyc

  *.pyo

  

  # test suite

  /.coverage

  /.pytest_cache/

- /htmlcov/

  

  # local config

  /blockerbugs_db.sqlite*

file removed
-138
@@ -1,138 +0,0 @@ 

- # Copyright 2018, Red Hat, Inc.

- # License: GPL-2.0+ <http://spdx.org/licenses/GPL-2.0+>

- # See the LICENSE file for more details on Licensing

- 

- #######################################################################

- #      _____            _        _ _           _   _                  #

- #     / ____|          | |      (_) |         | | (_)                 #

- #    | |     ___  _ __ | |_ _ __ _| |__  _   _| |_ _ _ __   __ _      #

- #    | |    / _ \| '_ \| __| '__| | '_ \| | | | __| | '_ \ / _` |     #

- #    | |___| (_) | | | | |_| |  | | |_) | |_| | |_| | | | | (_| |     #

- #     \_____\___/|_| |_|\__|_|  |_|_.__/ \__,_|\__|_|_| |_|\__, |     #

- #                                                           __/ |     #

- #     If you want to add/fix anything here, please create  |___/      #

- #     PR at qa-make https://pagure.io/fedora-qa/qa-make               #

- #                                                                     #

- #######################################################################

- 

- # Allows to print variables, eg. make print-SRC

- print-%  : ; @echo $* = $($*)

- 

- # Get variables from Makefile.cfg

- SRC=$(shell grep -s SRC Makefile.cfg | sed 's/SRC=//')

- VENV=$(shell grep -s VENV Makefile.cfg | sed 's/VENV=//')

- MODULENAME=$(shell grep -s MODULENAME Makefile.cfg | sed 's/MODULENAME=//')

- 

- # Try to detect SRC in case we didn't find Makefile.cfg

- ifeq ($(SRC),)

- SRC=$(shell rpmspec -q --queryformat="%{NAME}\n" *.spec | head -1)

- SPECNUM=$(shell ls -1 *.spec | wc -l)

- ifneq ($(SPECNUM),1)

- $(error Make sure you have either one spec file in the directory or configure it in Makefile.cfg)

- endif

- endif

- 

- # Variables used for packaging

- SPECFILE=$(SRC).spec

- BASEARCH:=$(shell uname -i)

- DIST:=$(shell rpm --eval '%{dist}')

- TARGETVER:=$(shell lsb_release -r |grep -o '[0-9]*')

- TARGETDIST:=fc$(TARGETVER)

- VERSION:=$(shell rpmspec -q --queryformat="%{VERSION}\n" $(SPECFILE) | head -1)

- RELEASE:=$(shell rpmspec -q --queryformat="%{RELEASE}\n" $(SPECFILE) | head -1 | sed 's/$(DIST)/\.$(TARGETDIST)/g')

- NVR:=$(SRC)-$(VERSION)-$(RELEASE)

- GITBRANCH:=$(shell git rev-parse --abbrev-ref HEAD)

- BUILDTARGET:=fedora-$(TARGETVER)-x86_64

- KOJITARGET:=$(shell echo $(TARGETDIST) | sed 's/c//' | sed 's/el/epel-/')

- 

- .PHONY: update-makefile

- update-makefile:

- 	curl --fail https://pagure.io/fedora-qa/qa-make/raw/master/f/Makefile -o Makefile.new

- 	if ! cmp Makefile Makefile.new ; then mv Makefile.new Makefile ; fi

- 

- .PHONY: test

- .ONESHELL: test

- test: $(VENV)

- 	set -e

- 	source $(VENV)/bin/activate;

- 	pytest --cov-report=term-missing --cov $(MODULENAME);

- 	deactivate

- 

- .PHONY: test-ci

- .ONESHELL: test-ci

- test-ci: $(VENV)

- 	set -e

- 	source $(VENV)/bin/activate

- 	pytest --cov-report=xml --cov $(MODULENAME)

- 	deactivate

- 

- .PHONY: pylint

- pylint:

- 	pylint -f parseable $(SRC) | tee pylint.out

- 

- .PHONY: pep8

- pep8:

- 	pep8 $(SRC)/*.py $(SRC)/*/*.py | tee pep8.out

- 

- .PHONY: ci

- ci: test-ci pylint pep8

- 

- .PHONY: docs

- docs:

- 	sphinx-build  -b html -d docs/_build/doctrees docs/source docs/_build/html

- 	find docs/source/ -name '*.md' -exec cp {} docs/_build/html/ \;

- 

- .PHONY: clean

- clean:

- 	rm -rf dist

- 	rm -rf $(SRC).egg-info

- 	rm -rf build

- 	rm -f pep8.out

- 	rm -f pylint.out

- 

- # FIXME: Rewrite this to avoid parsing the spec file, e.g. by using `git describe`.

- # Alternatively, don't use `git archive` but use `setup.py sdist` instead.

- .PHONY: archive

- archive: $(SRC)-$(VERSION).tar.gz

- 

- .PHONY: $(SRC)-$(VERSION).tar.gz

- $(SRC)-$(VERSION).tar.gz:

- 	if [ -z "$(shell git tag --points-at $(GITBRANCH))" ]; then echo \

- 		"WARNING: Creating archive from an untagged commit, the app version will be 'unknown'"; fi

- 	git archive $(GITBRANCH) --prefix=$(SRC)-$(VERSION)/ | gzip -c9 > $@

- 	mkdir -p build/$(VERSION)-$(RELEASE)

- 	mv $(SRC)-$(VERSION).tar.gz build/$(VERSION)-$(RELEASE)/

- 

- .PHONY: srpm

- srpm: archive

- 	mock -r $(BUILDTARGET) --buildsrpm --spec $(SPECFILE) --sources build/$(VERSION)-$(RELEASE)/

- 	cp /var/lib/mock/$(BUILDTARGET)/result/$(NVR).src.rpm build/$(VERSION)-$(RELEASE)/

- 

- .PHONY: build

- build: srpm

- 	mock -r $(BUILDTARGET) --no-clean --rebuild build/$(VERSION)-$(RELEASE)/$(NVR).src.rpm

- 	cp /var/lib/mock/$(BUILDTARGET)/result/*.rpm build/$(VERSION)-$(RELEASE)/

- 

- .PHONY: scratch

- scratch: srpm

- 	koji build --scratch $(KOJITARGET) build/$(VERSION)-$(RELEASE)/$(NVR).src.rpm

- 

- .PHONY: nvr

- nvr:

- 	@echo $(NVR)

- 

- .PHONY: cleanvenv

- cleanvenv:

- 	rm -rf $(VENV)

- 

- .PHONY: virtualenv

- virtualenv: $(VENV)

- 

- .PHONY: $(VENV)

- .ONESHELL: $(VENV)

- $(VENV):

- 	virtualenv --system-site-packages $(VENV)

- 	set -e

- 	source $(VENV)/bin/activate

- 	pip install -r requirements.txt

- 	deactivate

file removed
-429
@@ -1,429 +0,0 @@ 

- Name:           blockerbugs

- # NOTE: if you update version, *make sure* to also update

- # `blockerbugs/__init__.py` and `docs/source/conf.py`

- Version:        1.5

- Release:        1%{?dist}

- Summary:        Fedora QA Blocker Tracking Application

- 

- License:        GPLv2+

- URL:            https://pagure.io/fedora-qa/blockerbugs

- Source0:        https://releases.pagure.org/fedora-qa/blockerbugs/blockerbugs-%{version}.tar.gz

- 

- BuildArch:      noarch

- 

- # required by type hints (in the form they are used)

- Requires:       python3 >= 3.9

- 

- Requires:       python3-bodhi-client

- Requires:       python3-email-validator

- Requires:       python3-flask

- Requires:       python3-flask-sqlalchemy

- Requires:       python3-flask-wtf

- Requires:       python3-fedora

- Requires:       python3-fedora-flask

- Requires:       python3-alembic

- Requires:       python3-psycopg2

- # bugzilla 3.2.0 because of API auth changes:

- # https://listman.redhat.com/archives/bugzilla-announce-list/2022-February/msg00000.html

- Requires:       python3-bugzilla >= 3.2.0

- Requires:       python3-flask-admin

- Requires:       python3-iso8601

- Requires:       python3-openid

- Requires:       python3-openid-cla

- Requires:       python3-openid-teams

- Requires:       python3-sqlalchemy

- Requires:       python3-koji

- 

- BuildRequires:  python3-bodhi-client

- BuildRequires:  python3-pytest

- BuildRequires:  python3-pytest-cov

- BuildRequires:  python3-devel >= 3.9

- BuildRequires:  python3-setuptools

- BuildRequires:  python3-munch

- BuildRequires:  python3-email-validator

- BuildRequires:  python3-flask

- BuildRequires:  python3-flask-sqlalchemy

- BuildRequires:  python3-flask-admin

- BuildRequires:  python3-fedora-flask

- BuildRequires:  python3-mock

- BuildRequires:  python3-koji

- BuildRequires:  python3-sqlalchemy

- BuildRequires:  python3-sphinx

- BuildRequires:  python3-bugzilla

- BuildRequires:  python3-iso8601

- 

- %description

- The blocker tracking app is a web front end to the currently proposed blocker

- and freeze exception bugs for Fedora releases under development.

- 

- %prep

- %setup -q

- 

- %check

- %{python3} setup.py test

- 

- %build

- %py3_build

- sphinx-build  -b html -d docs/_build/doctrees docs/source docs/_build/html

- sphinx-build  -b man -d docs/_build/doctrees docs/source docs/_build/man

- 

- %install

- %py3_install

- 

- # alembic stuff

- mkdir -p %{buildroot}%{_datadir}/blockerbugs

- cp -r alembic %{buildroot}%{_datadir}/blockerbugs/.

- cp alembic.ini %{buildroot}%{_datadir}/blockerbugs/.

- 

- # apache config and wsgi stuff

- mkdir -p %{buildroot}%{_datadir}/blockerbugs/conf

- cp conf/blockerbugs.conf %{buildroot}%{_datadir}/blockerbugs/conf/.

- cp conf/blockerbugs.cron.example %{buildroot}%{_datadir}/blockerbugs/conf/.

- cp conf/blockerbugs.wsgi %{buildroot}%{_datadir}/blockerbugs/.

- 

- # configuration file

- mkdir -p %{buildroot}%{_sysconfdir}/blockerbugs

- install conf/settings.py.example %{buildroot}%{_sysconfdir}/blockerbugs/settings.py.example

- 

- # man page for CLI

- mkdir -p %{buildroot}/%{_mandir}/man1/

- cp -v docs/_build/man/*.1 %{buildroot}/%{_mandir}/man1/

- 

- %pre

- 

- # add a user and group mostly for running the cron job

- %{_sbindir}/groupadd -r %{name} &>/dev/null || :

- %{_sbindir}/useradd  -r -s /sbin/nologin -d %{_datadir}/%{name} -M \

-                      -c 'Blocker Tracking App' -g %{name} %{name} &>/dev/null || :

- 

- %files

- %doc docs/_build/html/*

- %doc %{_mandir}/man1/blockerbugs*

- 

- %{python3_sitelib}/%{name}/

- %{python3_sitelib}/%{name}-*.egg-info

- 

- %{_bindir}/blockerbugs

- %dir %{_sysconfdir}/blockerbugs

- %{_sysconfdir}/blockerbugs/*

- %dir %{_datadir}/blockerbugs

- %{_datadir}/blockerbugs/*

- 

- 

- %changelog

- * Mon Sep 13 2021 Tim Flink <tflink@fedoraproject.org> - 1.4.1-1

- - hotfix to address change to rhbz and the number of results returned

- 

- * Mon Aug 23 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.4.0-1

- - SQLAlchemy: add naming conventions

- - replace partner-bugzilla with bugzilla.stage

- - db models: replace backref= with back_populates=

- - docstrings: add module docstrings

- - display bugs with dependencies

- - bugzilla: disable "quick" sync in favor of a full sync

- 

- * Tue May 18 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.3.1-1

- - blocker_list: don't display update popup needlessly

- - Werkzeug ProxyFix changed with 1.0 release, fixing our usage

- - updating flask and werkzeug versions to match new production

- 

- * Wed May 05 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.3.0-1

- - blocker_list.html: make it more readable, don't wrap status icons

- - pytest: ignore a DeprecationWarning from the openid package

- - show review vote counts only for Proposed bugs

- - discussions: add component to the ticket title, reshuffle

- - blocker_list: prevent wrapping votes in the middle

- - allow the dev to log in as any user, always in admin group

- - init_db.sh: update to F35 release

- - requirements: work around idna dependency error

- - .gitignore: re-shuffle into sections

- - .gitignore: add /.pytest_cache/

- 

- * Fri Apr 09 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.2.1-1

- - Fix the migration from 72031671860e

- 

- * Wed Mar 24 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.2.0-1

- - Prioritized Bugs hotfix

- - show TBD when a discussion link doesn't exist, show if user already voted

- - Show discussion vote counts in web UI and IRC format

- - tests: ignore a Koji deprecation warning

- - tests: avoid ORM warnings

- - supress warnings about SQLALCHEMY_TRACK_MODIFICATIONS

- - initialize FAS only when needed

- - run tests with just 'pytest'

- - init: add pre-config logging

- - cli: add --debug option

- 

- * Wed Jan 20 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.1.0-1

- - discussions: ignore closed tickets

- 

- * Wed Jan 13 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.0.0-1

- - cli: add close-inactive-discussions command

- - pagure_bot: don't double-parse commands

- - discussions: update review voting guide

- - pagure_bot: add more unit tests, restructure a few existing ones

- - pagure_bot: make comment parsing more reliable

- - pagure_bot: make agreed_revote_parser more standalone

- - pagure_bot: add docstrings

- - pagure_bot: handle "FE" abbreviation in a safer way

- - pagure_bot: small readability improvements

- - Revise Pagure comment parsers, make more liberal

- - get_bz_query: use last_update_string for bug creation too

- - discussion_sync: commit after creating each ticket

- - discussions: add a short voting hint to tickets

- - discussions: prefix ticket title with "rhbz#"

- - cli: add 'update-discussion'

- - Fix bugimg for reopened bugs

- 

- * Wed Sep 30 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.7.4-1

- - Bug proposal/rejection status as SVG endpoint

- - sync_updates: allow Bugs for same bug ID but different milestone

- 

- * Tue Aug 25 2020 Tim Flink <tflink@fedoraproject.org> - 0.7.3-1

- - Fix some log messages

- - Only create one ticket per bug, regardless of how many milestones it's in

- - Change some terminology for links to blocker discussions

- 

- * Wed Aug 19 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.7.2-1

- - Add BEHIND_PROXY to config.py

- 

- * Wed Aug 19 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.7.1-1

- - Fix db-uri leakage and add Proxy support (jskladan)

- 

- * Tue Aug 18 2020 Tim Flink <tflink@fedoraproject.org> - 0.7.0-1

- - Add support for async blocker discussion in a pagure repo

- - Look for Flatpak and module updates in addition to rpms

- - Dependency updates and many bug fixes

- 

- * Wed Jun 19 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.6.1-1

- - Don't log an exception we're ignoring like we didn't ignore it

- 

- * Mon Apr 8 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.6.0-1

- - Support Python 3 and use it on Fedora >= 29 and RHEL >= 8

- - Cleanup some css and js files and load them from CDN

- - Fix UI problems introduced in 0.5.0

- - Modernize spec file

- 

- * Wed Jan 30 2019 Tim Flink <tflink@fedoraproject.org> - 0.5.0-4

- - changing arch back to noarch, using ExclusiveArch correctly this time

- 

- * Wed Jan 30 2019 Tim Flink <tflink@fedoraproject.org> - 0.5.0-3

- - removing ExclusiveArch, changing Arch to x86_64 so that the srpm can be built sanely in Koji

- 

- * Wed Jan 30 2019 Tim Flink <tflink@fedoraproject.org> - 0.5.0-2

- - added ExclusiveArch to make it build on x86_64

- 

- * Tue Jan 8 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.5.0-1

- - New Bootstrap based frontend

- - Dropped Spins Support

- - Removed use of flask-assets

- - Preliminary Python 3 Support (Python 2 is still used by default)

- 

- * Wed Aug 15 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.4.15-1

- - Adapt to Bodhi changes to exit nicely if some Release does not exist in Bodhi

- - Removed deprecated flask imports

- - Switched to Python 3 compatible print

- - Switched from bunch to munch (Python 3 preparations)

- 

- * Thu Mar 22 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.4.14-1

- - nicer favicon

- - change alpha criteria links to basic

- 

- * Mon Aug 14 2017 Kamil Páral <kparal@redhat.com> - 0.4.13-1

- - Correct update URLs

- - Add tab for candidate compose / stable push request text

- - project moved to Pagure

- - enable release switcher to show more releases

- 

- * Tue Nov 8 2016 Tim Flink <tflink@fedoraproject.org> - 0.4.4.12-1

- - limit cleanup to specified release (D1049)

- 

- * Fri Sep 30 2016 Tim Flink <tflink@fedoraproject.org> - 0.4.4.11-1

- - fix bug proposal form (D1017)

- 

- * Wed Sep 14 2016 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.4.10-1

- - Use unicode instead of str on data passed from forms (D835)

- - Prevent openid from caching session on disk (D997)

- - Default to the current milestone when proposing a blocker (D974)

- - Rebuild CSS and amend docs (D998)

- 

- * Wed Apr 27 2016 Tim Flink <tflink@fedoraproject.org> - 0.4.4.9-1

- - don't consider previous release and 0-day blockers 'proposed' (D829)

- 

- * Tue Apr 26 2016 Tim Flink <tflink@fedoraproject.org> - 0.4.4.8-1

- - Fixing alembic revision numbers so there isn't a 'multiple head' situation (D828)

- 

- * Tue Apr 26 2016 Tim Flink <tflink@fedoraproject.org> - 0.4.4.7-1

- - Allow users to see bugs whose blocker status has chnaged (D22)

- - Handle 0-day and stable blockers (D689)

- 

- * Tue Dec 1 2015 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.4.6-1

- - Be more generic when catching Invalid release exc (D669)

- 

- * Thu Nov 5 2015 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.4.5-1

- - Fix crashing when syncing release that is not in bodhi (T644)

- 

- * Thu Aug 20 2015 Tim Flink <tflink@fedoraproject.org> - 0.4.4.4-1

- - Adjusting update sync to work with new data member names in bodhi2 api

- 

- * Tue Aug 18 2015 Tim Flink <tflink@fedoraproject.org> - 0.4.4.3-1

- - change bodhi client usage to prepare for bodhi2 (T569)

- 

- * Thu Jan 22 2015 Tim Flink <tflink@fedoraproject.org> - 0.4.4.1-1

- - Actually use the configured URL when connecting to bodhi. (T386)

- 

- * Thu Jan 22 2015 Tim Flink <tflink@fedoraproject.org> - 0.4.4.1-1

- - Updating some links on landing page

- - Making Bodhi URL configurable (T386)

- 

- * Wed Jan 14 2015 Tim Flink <tflink@fedoraproject.org> - 0.4.4-1

- - updating package to target el7 instead of el6

- - several small changes to allow running on el7

- 

- * Wed Nov 19 2014 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.3.6-1

- - Fix syncing when needinfo has no requestee T373

- - HTTP 500 errors on incorrect bugzilla credential entry T358

- - Do not hardcode links to release criteria on blocker proposal page T360

- 

- * Thu Oct 9 2014 Tim Flink <tflink@fedoraproject.org> - 0.4.3.5-1

- - Fixing imports of flask admin to remove warning. T348

- - Removing py.test from install_requires so that cli works at install. T349

- 

- * Tue Sep 9 2014 Tim Flink <tflink@fedoraproject.org> - 0.4.3.4-1

- - Fixing milestone relationship for synced updates. T327

- - Adding milestone/current endpoint to API. T328

- 

- * Wed Jul 9 2014 Tim Flink <tflink@fedoraproject.org> - 0.4.3.3-1

- - updating for use with python-bugzilla 1.1.0

- 

- * Thu Feb 27 2014 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.3.2-1

- - update to 0.4.3.2

- 

- * Thu Feb 13 2014 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.3.1-1

- - remove bugzilla cookie code

- 

- * Wed Nov 20 2013 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.3-1

- - fix for #435

- 

- * Thu Nov 14 2013 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.2-1

- - update to 0.4.2-1

- 

- * Thu Nov 14 2013 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.1.1-1

- - add minify command to the cli

- 

- * Wed Nov 13 2013 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.1-1

- - add python-cssmin as dep

- 

- * Tue Nov 12 2013 Martin Krizek <mkrizek@fedoraproject.org> - 0.4.0-1

- - update to 0.4.0-1

- 

- * Thu Oct 10 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.13-3

- - removing status restriction on bugzilla query during sync (#421)

- 

- * Tue Oct 1 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.13-2

- - removing /var/www/blockerbugs from dirs as it isn't used anymore

- 

- * Thu Sep 26 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.13-1

- - using bodhi update ID urls where possible (fixes #386)

- 

- * Thu Sep 26 2013 Ilgiz Islamgulov <ilgizisl@gmail.com> - 0.3.0.12-1

- - added missed GPL headers and

- 

- * Tue Sep 24 2013 Ilgiz Islamgulov <ilgizisl@gmail.com> - 0.3.0.11-1

- - adding 404 response status code for page not found

- 

- * Tue Sep 24 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.10-1

- - fixing bugzilla login and fixing filter in the spin admin page

- 

- * Tue Sep 24 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.9-1

- - adding build information to the spin information returned in the API

- 

- * Fri Sep 13 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.8-1

- - fixing some bugs in the admin interface

- 

- * Fri Sep 13 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.7-1

- - adding new flask-admin based admin interface and api auth

- 

- * Fri Sep 13 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.6.3-1

- - removing need for python-bugzilla cookiefile after review (#414)

- 

- * Thu Sep 5 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.6.2-2

- - fixing file declarations to remove un-needed dir

- 

- * Thu Sep 5 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.6.2-1

- - moving python-bugzilla cookiefile to /var/www/blockerbugs

- 

- * Thu Sep 5 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.6.1-1

- - fixing seliux issue preventing proposal from webui (#414)

- 

- * Mon Aug 26 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.6-1

- - fixing issues with python 2.6

- 

- * Thu Aug 22 2013 Martin Krizek <mkrizek@redhat.com> - 0.3.0.5-3

- - Add python-flask-assets and uglify-js as dep

- 

- * Fri Aug 16 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.5-2

- - adding openid deps and api module to setup.py

- 

- * Fri Aug 16 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.5-1

- - implementing api for spins, updates and bugs

- - improving update sync to be more efficient and not leave orphan updates visable

- 

- * Thu Jul 25 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.4-2

- - adding python-openid, python-openid-teams, python-openid-cla as deps

- 

- * Thu Jul 25 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.4-1

- - migrating to fas-openid for authentication (#383)

- 

- * Mon Jul 8 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.3-1

- - fixing crash on milestone modification (#390)

- 

- * Thu May 30 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.2-1

- - fixing sync trigger on component rename (#330) and full sync

- 

- * Tue Apr 30 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.1-1

- - Several minor visual fixes and fixing the admin page rendering

- 

- * Tue Apr 23 2013 Tim Flink <tflink@fedoraproject.org> - 0.3.0.0-1

- - Made some minor visual changes for 0.3 release

- 

- * Thu Apr 11 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.7.4-1

- - Added a visually obvious staging configuration

- 

- * Thu Apr 11 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.7.3-2

- - Added the blockerbugs group for user creation

- 

- * Thu Apr 11 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.7.3-1

- - Fixed a few minor bugs in the proposal process and cleaned up a template

- 

- * Wed Apr 10 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.7.2-1

- - Centralized logging setup, changed logger creation and added syslog logger option

- - Added blockerbugs user for cron job running

- 

- * Fri Mar 29 2013 Martin Krizek <mkrizek@fedoraproject.org> - 0.2.7.1-2

- - Added log file location

- 

- * Mon Mar 25 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.7.1-1

- - Fixed issue with cli utility using incorrect variable names

- 

- * Mon Mar 25 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.7.0-1

- - Merged in bugzilla account integration and blocker proposal functionality

- 

- * Wed Mar 13 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6.2-2

- - Changed el6 build to use sphinx 1.0 for manpage generation support

- 

- * Tue Mar 12 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6.2-1

- - Added manpage for blockerbugs cli

- - Enabled check for fedora, need build of python-dingus on el6

- 

- * Mon Mar 11 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6.1-3

- - Updated default value for bugzilla cookie

- 

- * Mon Mar 11 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6.1-2

- - Changed config file generation to installation of example

- 

- * Mon Mar 11 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6.1-1

- - New upstream version with fewer dependencies and added example cron job

- 

- * Wed Mar 6 2013 Tim Flink <tflink@fedoraproject.org> - 0.2.6-1

- - Initial package for the blocker tracking app

file removed
-153
@@ -1,153 +0,0 @@ 

- # Makefile for Sphinx documentation

- #

- 

- # You can set these variables from the command line.

- SPHINXOPTS    =

- SPHINXBUILD   = sphinx-build

- PAPER         =

- BUILDDIR      = _build

- 

- # Internal variables.

- PAPEROPT_a4     = -D latex_paper_size=a4

- PAPEROPT_letter = -D latex_paper_size=letter

- ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

- # the i18n builder cannot share the environment and doctrees with the others

- I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

- 

- .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

- 

- help:

- 	@echo "Please use \`make <target>' where <target> is one of"

- 	@echo "  html       to make standalone HTML files"

- 	@echo "  dirhtml    to make HTML files named index.html in directories"

- 	@echo "  singlehtml to make a single large HTML file"

- 	@echo "  pickle     to make pickle files"

- 	@echo "  json       to make JSON files"

- 	@echo "  htmlhelp   to make HTML files and a HTML help project"

- 	@echo "  qthelp     to make HTML files and a qthelp project"

- 	@echo "  devhelp    to make HTML files and a Devhelp project"

- 	@echo "  epub       to make an epub"

- 	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"

- 	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"

- 	@echo "  text       to make text files"

- 	@echo "  man        to make manual pages"

- 	@echo "  texinfo    to make Texinfo files"

- 	@echo "  info       to make Texinfo files and run them through makeinfo"

- 	@echo "  gettext    to make PO message catalogs"

- 	@echo "  changes    to make an overview of all changed/added/deprecated items"

- 	@echo "  linkcheck  to check all external links for integrity"

- 	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"

- 

- clean:

- 	-rm -rf $(BUILDDIR)/*

- 

- html:

- 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

- 	@echo

- 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

- 

- dirhtml:

- 	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml

- 	@echo

- 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

- 

- singlehtml:

- 	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml

- 	@echo

- 	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

- 

- pickle:

- 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle

- 	@echo

- 	@echo "Build finished; now you can process the pickle files."

- 

- json:

- 	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json

- 	@echo

- 	@echo "Build finished; now you can process the JSON files."

- 

- htmlhelp:

- 	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp

- 	@echo

- 	@echo "Build finished; now you can run HTML Help Workshop with the" \

- 	      ".hhp project file in $(BUILDDIR)/htmlhelp."

- 

- qthelp:

- 	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp

- 	@echo

- 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \

- 	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"

- 	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FedoraBlockerBugTracker.qhcp"

- 	@echo "To view the help file:"

- 	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FedoraBlockerBugTracker.qhc"

- 

- devhelp:

- 	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp

- 	@echo

- 	@echo "Build finished."

- 	@echo "To view the help file:"

- 	@echo "# mkdir -p $$HOME/.local/share/devhelp/FedoraBlockerBugTracker"

- 	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FedoraBlockerBugTracker"

- 	@echo "# devhelp"

- 

- epub:

- 	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub

- 	@echo

- 	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

- 

- latex:

- 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex

- 	@echo

- 	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."

- 	@echo "Run \`make' in that directory to run these through (pdf)latex" \

- 	      "(use \`make latexpdf' here to do that automatically)."

- 

- latexpdf:

- 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex

- 	@echo "Running LaTeX files through pdflatex..."

- 	$(MAKE) -C $(BUILDDIR)/latex all-pdf

- 	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

- 

- text:

- 	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text

- 	@echo

- 	@echo "Build finished. The text files are in $(BUILDDIR)/text."

- 

- man:

- 	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man

- 	@echo

- 	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

- 

- texinfo:

- 	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo

- 	@echo

- 	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."

- 	@echo "Run \`make' in that directory to run these through makeinfo" \

- 	      "(use \`make info' here to do that automatically)."

- 

- info:

- 	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo

- 	@echo "Running Texinfo files through makeinfo..."

- 	make -C $(BUILDDIR)/texinfo info

- 	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

- 

- gettext:

- 	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale

- 	@echo

- 	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

- 

- changes:

- 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes

- 	@echo

- 	@echo "The overview file is in $(BUILDDIR)/changes."

- 

- linkcheck:

- 	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck

- 	@echo

- 	@echo "Link check complete; look for any errors in the above output " \

- 	      "or in $(BUILDDIR)/linkcheck/output.txt."

- 

- doctest:

- 	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest

- 	@echo "Testing of doctests in the sources finished, look at the " \

- 	      "results in $(BUILDDIR)/doctest/output.txt."

file modified
+33 -37
@@ -81,8 +81,7 @@ 

  Install dependencies into the Virtualenv

  ========================================

  

- To get all of the python packages into the virtualenv, use pip inside the

- virtualenv (ie. activate the virtualenv first)::

+ While the virtualenv is active, install the project dependencies::

  

    pip install -r requirements.txt

  
@@ -90,75 +89,73 @@ 

  

    pip install -r requirements-development.txt

  

+ Finally install the project itself in editable mode::

+ 

+   pip install -e .

  

  Configuring dev environment

  ===========================

  

- To generate an initial config using a PostgreSQL database, use the following command::

+ To generate an initial config using a PostgreSQL database, run the following command from the project root::

  

-   python run_cli.py generate_config -d 'postgresql+psycopg2://postgres:your-password@localhost:5432/blockerbugs'

+   ./run cli generate_config -d 'postgresql+psycopg2://postgres:your-password@localhost:5432/blockerbugs'

  

  The configuration file will be generated in the ``conf/`` directory. While you

  would copy this config file to ``/etc/blockerbugs`` in a production system, for

  a development installation, just leave it in the ``conf/`` directory.

  

- The config generated by ``run_cli.py`` is very basic and may require tweaking

- to get the environment that you're looking for.

+ The generated config is very basic and may require tweaking to get the environment that you're looking for.

  

  **FIXME: LINK TO CONFIGURATION OPTIONS**

  

  .. _initializing_env:

  

- Initializing the Environment (Lazy Method)

- ------------------------------------------

+ Initializing the environment (simple method)

+ --------------------------------------------

  

  The quick and easy way to initialize the environment with default settings for

  a recent Fedora release is to run::

  

-   bash init_db.sh

+   ./run setup

  

- This shell script will initialize the configured database, set up a release and

+ This script will initialize the configured database, set up a release and

  several milestones. The script is kept up to date for current Fedora releases

- so that you don't need to memorize the relevant blocker and Freeze Exception

+ so that you don't need to figure out the relevant blocker and Freeze Exception

  tracker bugs.

  

- Initializing the Environment (Detailed Method)

- ----------------------------------------------

+ Initializing the environment (manual method)

+ --------------------------------------------

  

- Most configuration post-installation is done using the cli. However, when working

- in a development environment, that cli isn't directly available and we need to

- use the ``run_cli.py`` helper script which exposes the same commands.

+ Most configuration post-installation on a real deployment is done using the ``blockerbugs`` command. When working in a development environment, you can run the same commands using ``./run cli`` script.

  

  Once the config file has been generated, the database needs to be initialized::

  

-   python run_cli.py init_db

+   ./run cli init_db

+ 

+ And a release and milestones need to be defined. NOTE: The following commands are just examples::

  

- There are some internal variables in the db which are wise to set before attempting

- to run a sync. These are easily set using the ``run_cli.py`` script::

+   ./run cli add_release -r 25

  

-   python run_cli.py add_release -r 25

+   ./run cli add_milestone -r 25 -m beta -b 1277287 -a 1277288

+   ./run cli add_milestone -r 25 -m final -b 1277289 -a 1277290

  

-   python run_cli.py add_milestone -r 25 -m alpha -b 1277284 -a 1277285

-   python run_cli.py add_milestone -r 25 -m beta -b 1277287 -a 1277288

-   python run_cli.py add_milestone -r 25 -m final -b 1277289 -a 1277290

+ This will add a Fedora 25 release and its milestones with Blocker and FreezeException trackers for each of them. See the ``run`` script, or the `Trackers wiki page`_ for more up-to-date values.

  

- This will add a Fedora 25 release and its milestones with Blocker and

- FreezeException trackers for each of them. See ``init_db.sh`` for more

- up-to-date values.

+ .. _Trackers wiki page: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Trackers

  

  

- Running Sync Against Bugzilla and Bodhi

+ Running sync against Bugzilla and Bodhi

  =======================================

  

  To do an initial sync, simply run the following command::

  

-   DEV='true' python run_cli.py sync

+   ./run cli sync

  

  Alternatively, it is possible to sync only selected parts::

  

-   DEV='true' python run_cli.py sync-bugs

-   DEV='true' python run_cli.py sync-updates

-   DEV='true' python run_cli.py sync-discussions

+   ./run cli sync-bugs

+   ./run cli sync-updates

+   ./run cli sync-discussions

  

  

  Running the web UI
@@ -166,7 +163,7 @@ 

  

  Run the web UI with::

  

-   DEV='true' python runapp.py

+   ./run app

  

  and then visit `<http://127.0.0.1:9999/>`_.

  
@@ -179,7 +176,7 @@ 

  Unit tests have been written using `pytest <http://pytest.org/>`_ and can be

  run from the root project directory with::

  

-   pytest

+   ./run test

  

  

  Configuring and running linters
@@ -196,8 +193,7 @@ 

  If your editor doesn't support linter integration, you can still run them from

  the command line manually (inside the virtualenv)::

  

-   flake8

-   mypy

+   ./run lint

  

  

  Building documentation
@@ -205,9 +201,9 @@ 

  

  While the virtualenv is active, you can build all documentation with this command::

  

-   make docs

+   ./run docs

  

- You can then inspect the resulting docs in ``docs/_build/html``. Not everything is built as HTML, so check ``docs/source`` as well.

+ You can then inspect the resulting docs in ``build/docs/html``. Open ``index.html`` to see the home page. Not everything is built as HTML and linked from there, so check directory contents as well, or even the docs source directory at ``docs/source``.

  

  

  More info on development

@@ -107,9 +107,9 @@ 

  

  In order to display the current code coverage, run this from the project root directory::

  

-   pytest --cov

+   ./run coverage

  

- You'll see a coverage report including line numbers missing coverage in your terminal. You can also browse an interactive HTML report which highlights individual lines missing coverage in ``htmlcov/index.html``.

+ You'll see a coverage report including line numbers missing coverage in your terminal. You can also browse an interactive HTML report which highlights individual lines missing coverage in ``build/coverage/index.html``.

  

  

  Release Process
@@ -120,85 +120,10 @@ 

    * merge ``origin/develop`` into ``origin/master``, resolving any merge

      conflicts or issues.

  

-   * Make sure that the version strings in ``blockerbugs.spec`` and ``blockerbugs/__init__.py``

-     match and are correct. ``blockerbugs.spec`` should have a useful statement

-     in the changelog corresponding to the changes in this latest release

- 

    * Create an annotated git tag on master

  

    * Push the changes in master and the new tag to origin

  

-   * Build an SRPM with the new release and submit a scratch build to Koji

- 

-   * Request that the new build be pulled into infra's repository and deploy on

-     staging

- 

-   * After a reasonable amount of testing, deploy to production

- 

- 

- Building a Blockerbugs RPM

- ==========================

- 

- Step-by-step process for building an rpm (el7, probably) for devel, staging and production.

- 

- These instructions are deliberately abstracted for version and branch so that

- they can be used for other things than just releases. The relevant variables are:

- 

-   * ``$VERSION`` - the version as set in both ``__init__.py`` and ``blockerbugs.spec``

- 

-   * ``$RELEASE`` - the release as set in  ``blockerbugs.spec``

- 

-   * ``$BRANCH`` - the git branch you're working with (master, develop, feature/t123-foobar etc.)

- 

-   * ``$BASEDIR`` - the base directory for your git checkout

- 

- Make sure that all the files you're working on are committed in your git repo and

- create a tarball by running this command in ``$BASEDIR``::

- 

-   python run_cli.py minify

-   git archive --format=tar --prefix=blockerbugs-$VERSION/ $BRANCH | gzip -c > blockerbugs-$VERSION.tar.gz

- 

- or::

- 

-   make archive

- 

- Create an srpm using mock and copy the result into ``$BASEDIR``::

- 

-   mock -r epel-7-x86_64 --buildsrpm --spec blockerbugs.spec --sources $BASEDIR

-   cp /var/lib/mock/epel-7-x86_64/result/blockerbugs*.src.rpm $BASEDIR/.

- 

- or::

- 

-   make srpm

- 

- From here, you can either build the rpm locally using mock or using a koji scratch

- build.

- 

- Building Locally with Mock

- --------------------------

- 

- Run this command to build an rpm locally with mock (using ``--no-clean`` will prevent

- mock from rebuilding the environment)::

- 

-   mock -r epel-7-x86_64 --rebuild $BASEDIR/blockerbugs-$VERSION-$RELEASE.el7.centos.src.rpm

-   cp /var/lib/mock/epel-7-x86_64/result/blockerbugs*.noarch.rpm $BASEDIR/.

- 

- or::

- 

-   make build

- 

- Building a Koji Scratch Build

- -----------------------------

- 

- The blocker tracking app isn't in the main Fedora repos, so we can't do official

- builds but we can do scratch builds with this command::

- 

-   koji build --scratch epel7-candidate $BASEDIR/blockerbugs-$VERSION-$RELEASE.el7.centos.src.rpm

- 

- or::

- 

-   make kojibuild

- 

  

  .. _using-alembic:

  

file removed
-19
@@ -1,19 +0,0 @@ 

- #!/usr/bin/bash

- # this is a simple script to aid in the setup of a new db

- 

- # generate config

- python3 run_cli.py generate_config -d 'sqlite:////var/tmp/blockerbugs_db.sqlite'

- 

- # init db

- python3 run_cli.py init_db

- 

- # add releases

- python3 run_cli.py add_release -r 35

- 

- # add milestones

- python3 run_cli.py add_milestone -r 35 -m beta -b 1891953 -a 1891954

- python3 run_cli.py add_milestone -r 35 -m final -b 1891955 -a 1891956

- 

- # staging bugzilla alternative numbers:

- #python3 run_cli.py add_milestone -r 35 -m beta -b 1891953 -a 1891954

- #python3 run_cli.py add_milestone -r 35 -m final -b 1891955 -a 1891956

run
file added
+165
@@ -0,0 +1,165 @@ 

+ #!/bin/bash

+ # Copyright Red Hat

+ # License: GPL-2.0+ <http://spdx.org/licenses/GPL-2.0+>

+ # See the LICENSE file for more details on Licensing

+ 

+ # This is the main entrypoint for running commands as a developer. Use --help to show available

+ # commands.

+ 

+ set -o errexit -o nounset -o pipefail

+ 

+ # This makes sure the development config gets loaded for all operations.

+ # TODO: Investigate whether we can make the dev config the default and avoid setting this variable.

+ export DEV=true

+ 

+ function print_usage_and_exit {

+     cat << EOF

+ Usage: $0 [app|cli|test|coverage|lint|docs|setup|archive|clean|help] [COMMAND ARGUMENTS...]

+ 

+ Run a developer-related command. Note that some commands require the database to

+ be already running, and most require the virtualenv to be active.

+ 

+ Available commands:

+   app: Start the web-based blockerbugs app.

+   cli: Execute the blockerbugs CLI runner (the same one as is accessible as

+        'blockerbugs' command when installed). Use '$0 cli --help' for help.

+   test: Execute the test suite.

+   coverage: Execute the test suite and measure test coverage. Create a report in

+             build/coverage/.

+   lint: Run supported linters - flake8 and mypy.

+   docs: Build the documentation, placed into build/docs/.

+   setup: Perform an initial DB setup and configure current release, milestones

+          and bug trackers. Can be re-executed when there is a new release.

+   archive: Create a git archive from the current commit, placed into

+            build/archive/.

+   clean: Delete all build artifacts, also including archives, docs, coverage

+          reports, etc.

+   help: Show this usage message.

+ EOF

+     exit 1

+ }

+ 

+ # Run the main program loop

+ function main {

+     if [ $# -eq 0 ]; then

+         print_usage_and_exit

+     fi

+ 

+     case "$1" in

+         app)

+             run_app;;

+         cli)

+             # Forward any cmdline arguments

+             shift

+             run_cli "$@";;

+         test)

+             run_test;;

+         coverage)

+             run_coverage;;

+         lint)

+             run_lint;;

+         docs)

+             run_docs;;

+         setup)

+             run_setup;;

+         archive)

+             run_archive;;

+         clean)

+             run_clean;;

+         help | --help | -h)

+             print_usage_and_exit;;

+         *)

+             print_usage_and_exit;;

+     esac

+ }

+ 

+ function run_app {

+     local cmd='python scripts/runapp.py'

+     echo "Executing command: $cmd"

+     exec $cmd

+ }

+ 

+ function run_cli {

+     local cmd_array=(python blockerbugs/cli.py "$@")

+     echo "Executing command:" "${cmd_array[@]}"

+     "${cmd_array[@]}"

+ }

+ 

+ function run_test {

+     local cmd='pytest'

+     echo "Executing command: $cmd"

+     exec $cmd

+ }

+ 

+ function run_coverage {

+     local cmd='pytest --cov'

+     echo "Executing command: $cmd"

+     exec $cmd

+ }

+ 

+ function run_lint {

+   local cmd='flake8 --statistics'

+   local flake8_rc=0

+   echo "Executing command: $cmd"

+   echo "********************** flake8 **********************"

+   $cmd && flake8_rc=$? || flake8_rc=$?

+ 

+   echo

+   cmd='mypy'

+   local mypy_rc=0

+   echo "Executing command: $cmd"

+   echo "********************** mypy **********************"

+   $cmd && mypy_rc=$? || mypy_rc=$?

+ 

+   # If one of them returned non-zero, return a global non-zero

+   if [ "$flake8_rc" -eq 0 ]; then

+       exit "$mypy_rc"

+   else

+       exit "$flake8_rc"

+   fi

+ }

+ 

+ function run_docs {

+     local cmd='sphinx-build -W -b html docs/source build/docs/html'

+     echo "Executing command: $cmd"

+     $cmd

+ 

+     cmd='cp docs/source/*.md build/docs/html/'

+     echo "Executing command: $cmd"

+     exec $cmd

+ }

+ 

+ function run_setup {

+     # init_db is non-destructive, doesn't wipe existing data (but performs db upgrades)

+     run_cli init_db

+     run_cli add_release -r 37

+     run_cli add_milestone -r 37 -m beta -b 1996156 -a 1996157

+     run_cli add_milestone -r 37 -m final -b 1996158 -a 1996159

+ }

+ 

+ function run_archive {

+     if ! git diff --quiet; then

+         echo "WARNING: Local repo is dirty. The archive won't include uncommitted files!"

+     fi

+     local version

+     version="$(git describe)"

+     if echo $version | grep -E -q -- '-[0-9]+-g'; then

+         echo "WARNING: The current commit doesn't have an annotated tag, the app version will be "\

+              "'unknown'!"

+     fi

+     mkdir -p build/archive

+     # TODO: Consider using `setup.py sdist` instead of `git archive`. Works better with versioneer.

+     local cmd_array=(git archive HEAD "--prefix=blockerbugs-${version}/" --format tar.gz

+         -o "build/archive/blockerbugs-${version}.tar.gz")

+     echo "Executing command:" "${cmd_array[@]}"

+     exec "${cmd_array[@]}"

+ }

+ 

+ function run_clean {

+     cmd='rm -rf blockerbugs.egg-info/ build/'

+     echo "Executing command: $cmd"

+     exec $cmd

+ }

+ 

+ # Run the main program loop

+ main "$@"

file removed
-9
@@ -1,9 +0,0 @@ 

- """A command line interface entry point"""

- 

- import sys

- from blockerbugs import cli

- 

- if __name__ == '__main__':

-     exit = cli.main()

-     if exit:

-         sys.exit(exit)

scripts/runapp.py runapp.py
file renamed
file was moved with no change to the file
file modified
+1 -1
@@ -36,7 +36,7 @@ 

  python_functions=test should

  python_files=test_* testfunc_*

  testpaths = testing

- addopts = --cov-config=setup.cfg --cov-report term-missing --cov-report html

+ addopts = --cov-config=setup.cfg --cov-report term-missing --cov-report html:build/coverage/

  filterwarnings =

      ignore:the imp module is deprecated in favour of importlib:DeprecationWarning:koji

      ignore:defusedxml.cElementTree is deprecated, import from defusedxml.ElementTree instead:DeprecationWarning:openid

file modified
+3
@@ -25,3 +25,6 @@ 

      """This is executed before testing starts"""

      # make sure that the testing config is used

      os.environ['TEST'] = 'true'

+     # and that another config is not specified by mistake

+     os.environ.pop('DEV', None)

+     os.environ.pop('PROD', None)

Since we no longer deploy BBA as an RPM, the spec file is not needed anymore.
The Makefile has been outdated for quite some time, and now it had minimal use.
Because of how hard it is to write and maintain a Makefile, I rewrote the
remaining useful bits into a ./run bash script. It is a generic launcher for
most developer-related commands, and it has help(!), so it's now easy to
remember or figure out how to do things. The run script now also includes
init_db.sh and run_cli.py. It references runapp.py, so that there is a
single launcher for everything. Documentation is updated, and RPM building
instructions are removed.

Additional notes:

  • docs/Makefile is removed, because we didn't use it
  • runapp.py is moved to scripts/, to reduce top-level clutter
  • all artifacts are now placed into build/, which makes it easier to find them
    and also to git ignore them
  • creating a git archive now produces useful warnings
  • run setup is now updated to F37 staging tracker numbers

rebased onto 2a32cf0

2 years ago

Build succeeded.

rebased onto ac66385

2 years ago

Commit e298bdc fixes this pull-request

Pull-Request has been merged by kparal

2 years ago