Skip to content

Commit

Permalink
Merge pull request #1376 from OpenDataServices/2022-03-01-tidyup
Browse files Browse the repository at this point in the history
2022 03 01 tidyup
  • Loading branch information
odscjames committed Mar 1, 2023
2 parents 6b0113e + 82024fd commit 6ddf5fc
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 37 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Expand Up @@ -24,16 +24,14 @@ jobs:
- name: Install requirements_dev.txt
run: pip install -r requirements_dev.txt
- name: Install requirements_iati.txt
run: pip install -r requirements_iati.txt
- name: Install Ubuntu Translation Libraries
run: sudo apt install gettext
- name: Test IATI
run: DJANGO_SETTINGS_MODULE=cove_iati.settings py.test -n 2 cove_iati --cov-append --cov
run: py.test -n 2 cove_iati --cov-append --cov
- name: Migrate Database
run: DJANGO_SETTINGS_MODULE=cove_iati.settings python manage.py migrate
run: python manage.py migrate
- name: Compile Messages
run: DJANGO_SETTINGS_MODULE=cove_iati.settings python manage.py compilemessages
run: python manage.py compilemessages
- name: Report to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 10 additions & 10 deletions README.rst
Expand Up @@ -76,29 +76,29 @@ Steps to installation:
* Compile the translations
* Run the development server

The following steps are for Ubuntu but equivalent packages are available for other distros.

.. code:: bash
sudo apt-get install build-essential libxml2-dev libxslt1-dev python3-dev
Run:

.. code:: bash
git clone https://github.com/OpenDataServices/cove.git
cd cove
python3 -m venv .ve
source .ve/bin/activate
pip install -r requirements_dev.txt
DJANGO_SETTINGS_MODULE={cove_MODULENAME}.settings python manage.py migrate
python manage.py migrate
python manage.py compilemessages
The following steps are for Ubuntu but equivalent packages are available for other distros.

.. code:: bash
sudo apt-get install build-essential libxml2-dev libxslt1-dev python3-dev
pip install -r requirements_iati.txt
Then run the development server:

.. code:: bash
DJANGO_SETTINGS_MODULE=cove_iati.settings python manage.py runserver
python manage.py runserver
Deployment
Expand Down
6 changes: 4 additions & 2 deletions docs/lib.md
Expand Up @@ -35,6 +35,8 @@ For example, see [Cove for BODS](https://github.com/openownership/cove-bods) or
Running a Cove instance in this shared Cove repository
------------------------------------------------------

Some standards are still run in this shared repository, in packages like `cove_iati`.
The IATI standard is still run in this repository, in the package `cove_iati`.

They use the Lib-Cove-Web and the Lib-Cove libraries mentioned above.
It uses the Lib-Cove-Web and the Lib-Cove libraries mentioned above.

No new COVE's should be created in this repository - they should have their own repository.
2 changes: 1 addition & 1 deletion manage.py
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cove.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cove_iati.settings")

from django.core.management import execute_from_command_line

Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
@@ -1,4 +1,4 @@
[pytest]
DJANGO_SETTINGS_MODULE=cove.settings
DJANGO_SETTINGS_MODULE=cove_iati.settings
DEBUG=True
python_files=test*.py
15 changes: 15 additions & 0 deletions requirements.in
Expand Up @@ -22,3 +22,18 @@ bleach
xmltodict
rangedict
openpyxl

# We have a fork of the bdd-tester repo, in order to add a single commit that
# fixes the previous commit we were using, to work with the new pip resolver.
#
# This means the behaviour with the new pip resolver will be the same as
# what happened with the old resolver (where subsequent requirements were
# silently ignored).
#
# We really shouldn't do any more work on this fork, and should instead update
# to the latest upstream version of bdd-tester, which also fixes this
# requirements issue.
# We've not done this yet because this requires changes to cove, and some
# careful testing, which we currently don't have time to do.
-e git+https://github.com/OpenDataServices/bdd-tester.git@e1a1a578e28222904f3f1567409b068222ec02e6#egg=bdd-tester
-e git+https://github.com/OpenDataServices/iati-utils.git@704fa589ad2d3743d3928dcbeeeb06a5e73f8437#egg=iatiutils
24 changes: 23 additions & 1 deletion requirements.txt 100755 → 100644
Expand Up @@ -4,6 +4,10 @@
#
# pip-compile requirements.in
#
-e git+https://github.com/OpenDataServices/bdd-tester.git@e1a1a578e28222904f3f1567409b068222ec02e6#egg=bdd-tester
# via -r requirements.in
-e git+https://github.com/OpenDataServices/iati-utils.git@704fa589ad2d3743d3928dcbeeeb06a5e73f8437#egg=iatiutils
# via -r requirements.in
appdirs==1.4.4
# via requests-cache
asgiref==3.5.2
Expand All @@ -15,6 +19,8 @@ attrs==22.1.0
# requests-cache
backports-datetime-fromisoformat==2.0.0
# via flattentool
behave==1.2.5
# via bdd-tester
bleach==5.0.1
# via -r requirements.in
btrees==4.11.3
Expand All @@ -33,6 +39,8 @@ cffi==1.15.1
# via persistent
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via iatiutils
commonmark==0.9.1
# via -r requirements.in
contextlib2==21.6.0
Expand Down Expand Up @@ -87,13 +95,22 @@ libcove==0.29.0
libcoveweb==0.25.0
# via -r requirements.in
lxml==4.9.2
# via flattentool
# via
# bdd-tester
# flattentool
# iatiutils
odfpy==1.4.1
# via flattentool
openpyxl==3.0.10
# via
# -r requirements.in
# flattentool
parse==1.19.0
# via
# behave
# parse-type
parse-type==0.6.0
# via behave
persistent==4.9.3
# via
# btrees
Expand All @@ -113,6 +130,8 @@ rangedict==0.1.7
requests==2.28.1
# via
# -r requirements.in
# bdd-tester
# iatiutils
# libcove
# libcoveweb
# requests-cache
Expand All @@ -130,8 +149,11 @@ sentry-sdk==1.12.0
# via -r requirements.in
six==1.16.0
# via
# bdd-tester
# behave
# bleach
# jsonschema
# parse-type
# python-dateutil
# rfc3339-validator
# url-normalize
Expand Down
24 changes: 23 additions & 1 deletion requirements_dev.txt 100755 → 100644
Expand Up @@ -4,6 +4,10 @@
#
# pip-compile requirements_dev.in
#
-e git+https://github.com/OpenDataServices/bdd-tester.git@e1a1a578e28222904f3f1567409b068222ec02e6#egg=bdd-tester
# via -r requirements.in
-e git+https://github.com/OpenDataServices/iati-utils.git@704fa589ad2d3743d3928dcbeeeb06a5e73f8437#egg=iatiutils
# via -r requirements.in
alabaster==0.7.12
# via sphinx
appdirs==1.4.4
Expand All @@ -27,6 +31,8 @@ babel==2.11.0
# via sphinx
backports-datetime-fromisoformat==2.0.0
# via flattentool
behave==1.2.5
# via bdd-tester
bleach==5.0.1
# via -r requirements.in
btrees==4.11.3
Expand All @@ -48,6 +54,8 @@ cffi==1.15.1
# persistent
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via iatiutils
commonmark==0.9.1
# via
# -r requirements.in
Expand Down Expand Up @@ -150,7 +158,10 @@ libcoveweb==0.25.0
libsass==0.22.0
# via -r requirements_dev.in
lxml==4.9.2
# via flattentool
# via
# bdd-tester
# flattentool
# iatiutils
markupsafe==2.1.1
# via jinja2
mccabe==0.7.0
Expand All @@ -167,6 +178,12 @@ packaging==22.0
# via
# pytest
# sphinx
parse==1.19.0
# via
# behave
# parse-type
parse-type==0.6.0
# via behave
persistent==4.9.3
# via
# btrees
Expand Down Expand Up @@ -217,7 +234,9 @@ recommonmark==0.7.1
requests==2.28.1
# via
# -r requirements.in
# bdd-tester
# coveralls
# iatiutils
# libcove
# libcoveweb
# requests-cache
Expand All @@ -239,8 +258,11 @@ sentry-sdk==1.12.0
# via -r requirements.in
six==1.16.0
# via
# bdd-tester
# behave
# bleach
# jsonschema
# parse-type
# python-dateutil
# rfc3339-validator
# transifex-client
Expand Down
15 changes: 0 additions & 15 deletions requirements_iati.txt

This file was deleted.

1 change: 0 additions & 1 deletion run_tests.sh
@@ -1,2 +1 @@
DJANGO_SETTINGS_MODULE=cove.settings py.test cove --cov --cov-report= $@
DJANGO_SETTINGS_MODULE=cove_iati.settings py.test cove_iati --cov-append --cov $@

0 comments on commit 6ddf5fc

Please sign in to comment.