Skip to content

Commit

Permalink
squashed commit of updates. fixes #162, fixes #175, fixes #146, fixes #…
Browse files Browse the repository at this point in the history
…168, fixes #173, fixes #176, fixes #170 , fixes #169, fixes #158
  • Loading branch information
mondus committed Jan 18, 2022
1 parent c9b6312 commit 35af205
Show file tree
Hide file tree
Showing 19 changed files with 7,282 additions and 3,285 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://github.com/RSE-Sheffield/RSEAdmin/workflows/.github/workflows/ci.yml/badge.svg)](https://github.com/RSE-Sheffield/RSEAdmin/actions)
[![Build Status](https://travis-ci.org/RSE-Sheffield/RSEAdmin.svg?branch=master)](https://travis-ci.org/RSE-Sheffield/RSEAdmin)
[![Coverage Status](https://codecov.io/gh/RSE-Sheffield/RSEAdmin/branch/master/graph/badge.svg)](https://codecov.io/gh/RSE-Sheffield/RSEAdmin)
[![Documentation Status](https://readthedocs.org/projects/rseadmin/badge/?version=latest)](https://rseadmin.readthedocs.io/en/latest/?badge=latest)

Expand Down Expand Up @@ -27,7 +27,7 @@ The site is populated with random demo data which is reset at midnight every nig
To develop or test the site locally Poetry is used for dependency management. The ideal is that Poetry is simpler than using [conda][conda] and avoids manually creating a [virtualenv][virtualenv]. To configure Poetry;

1. Ensure you have Python >= 3.6 installed
1. Install [Poetry][poetry], a tool for Python project management - see [notes on how to install](https://pypi.org/project/poetry/)
1. Install [Poetry][poetry], a tool for Python project management (this currently requires preview edition 1.0.0 beta) - see [notes on how to install](https://pypi.org/project/poetry/)
1. Clone this repo
1. From the repo directory call `poetry install` to install project dependencies in an isolated hidden virtualenv
Dependencies are determined using info from `pyproject.toml`
Expand Down Expand Up @@ -87,7 +87,7 @@ The site has a self explanatory navigation menu which varies depending on the pe

## Testing

The site uses continuous integration. You can run all tests locally as follows. This requires the installation of [https://github.com/mozilla/geckodriver](GeckoDriver (Firefox web driver)):
The site uses continuous integration. You can run all tests locally as follows. This requires the installation of [https://github.com/mozilla/geckodriver](GeckoDriver (Firefox web driver)) which must be available on your `$PATH`:

```sh
poetry run python manage.py test
Expand Down Expand Up @@ -128,7 +128,7 @@ mkvirtualenv --python=/usr/bin/python3.6 rseadmin-virtualenv
(rseadmin-virtualenv)$ pip install -r requirements.txt
```

Note: The above assumes that a up-to-date `requirements.txt` file exists within the repo which matches the poetry dependencies. This should always be the case however if you change any poetry dependencies the requirements file should be updated by calling (requires Poetry >= 1.x);
Note: The above assumes that a upto date `requirements.txt` file exists within the repo which matches the poetry dependencies. This should always be the case however if you change any poetry dependencies the requirements file should be updated by calling (requires peotry v1+);

```
poetry export -f requirements.txt -o requirements.txt
Expand Down Expand Up @@ -181,7 +181,7 @@ Turn on `Force HTTPS` and then restart the app from the top of the page. Your si

### Updating the site

If you want to update the site to include new features from `main` then simply call the following commands from your install directory on your web host
If you want to update the site to include new features from master then simply call the following commands from your install directory on your web host

```sh
git pull
Expand Down
12 changes: 9 additions & 3 deletions RSEAdmin/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import os

# Default primary key field (required for Djano 3.2+)
DEFAULT_AUTO_FIELD='django.db.models.AutoField'

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
#BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
Expand Down Expand Up @@ -135,12 +138,15 @@
HOME_PAGE_NUMBER_ITEMS = 7

# Warning level for RSE capacity (in percent)
HOME_PAGE_RSE_MIN_CAPACITY_WARNING_LEVEL = 80
HOME_PAGE_RSE_MIN_CAPACITY_WARNING_LEVEL = 70

# Days to consider as soon
HOME_PAGE_DAYS_SOON = 365
HOME_PAGE_DAYS_SOON = 90

# Days to consider as recent on home page
HOME_PAGE_DAYS_RECENT = 30

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# When true allocations can only be made within the projects start and end date
# When false allocations can be at any point in time against the project
STRICT_ALLOCATIONS = False

7 changes: 3 additions & 4 deletions RSEAdmin/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.urls import re_path
from django.contrib import admin

urlpatterns = [
re_path(r'^admin/', admin.site.urls),
re_path(r'^', include('rse.urls')),
re_path(r'^', include('timetracking.urls')),
url(r'^admin/', admin.site.urls),
url(r'^', include('rse.urls')),
url(r'^', include('timetracking.urls')),
]
Loading

0 comments on commit 35af205

Please sign in to comment.