Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ cython_debug/
.idea/
reports/exported/

naturerecorder.db
naturerecorder_test.db
naturerecorder_dev.db
naturerecorder.db

clean.sh
clean.bat
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ Nature Recorder is an application for recording wildlife sightings, maintaining
- Conservation status ratings, values for the conservation status within a scheme
- Species conservation status ratings, status ratings for a species with effective start and end dates
- Reports
- Simple reports built into the application
- Flexible reporting using Jupyter Notebooks, outside the application
- Flexible reporting using Jupyter Notebooks

# Getting Started

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.10-slim-bullseye AS runtime

COPY naturerecorderpy-1.14.0.0 /opt/naturerecorderpy
COPY naturerecorderpy-1.15.0.0 /opt/naturerecorderpy

WORKDIR /opt/naturerecorderpy

RUN apt-get update -y
RUN pip install -r requirements.txt
RUN pip install nature_recorder-1.14.0-py3-none-any.whl
RUN pip install nature_recorder-1.15.0-py3-none-any.whl

ENV NATURE_RECORDER_DATA_FOLDER=/var/opt/naturerecorderpy
ENV NATURE_RECORDER_DB=/var/opt/naturerecorderpy/naturerecorder.db
Expand Down
1 change: 0 additions & 1 deletion docs/source/naturerec_model/data_exchange/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ The data_exchange Package
status_import_helper
sightings_import_helper
sightings_export_helper
life_list_export_helper

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/naturerec_model/logic/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ The logic Package
status_schemes
status_ratings
species_status_ratings
reports
job_statuses
5 changes: 0 additions & 5 deletions docs/source/naturerec_model/logic/reports.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/source/naturerec_web/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ The naturerec_web Package
categories_blueprint
species_blueprint
sightings_blueprint
life_list_blueprint
status_blueprint
species_ratings_blueprint
export_blueprint
jobs_blueprint
reports_blueprint
request_utils
5 changes: 0 additions & 5 deletions docs/source/naturerec_web/life_list_blueprint.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/naturerec_web/reports_blueprint.rst

This file was deleted.

19 changes: 19 additions & 0 deletions make_venv.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@ECHO OFF

REM Deactivate and remove the old virtual environment, if present
ECHO Removing existing Virtual Environment, if present ...
deactivate > nul 2>&1
RMDIR /S /Q venv

REM Create a new environment and activate it
ECHO Creating new Virtual Environment ...
python -m venv venv
CALL venv\Scripts\activate.bat

REM Make sure pip is up to date
python -m pip install --upgrade pip

REM Install the requirements
python -m pip install -r requirements.txt

ECHO ON
17 changes: 17 additions & 0 deletions make_venv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -f

# Deactivate and remove the old virtual environment, if present
echo "Removing existing Virtual Environment, if present ..."
deactivate 2> /dev/null || true
rm -fr venv

# Create a new environment and activate it
echo "Creating new Virtual Environment ..."
python -m venv venv
. venv/bin/activate

# Make sure pip is up to date
pip install --upgrade pip

# Install the requirements
pip install -r requirements.txt
7 changes: 0 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,27 @@ click==8.0.3
colorama==0.4.6
coverage==7.8.0
cryptography==44.0.1
cycler==0.11.0
docutils==0.17.1
Flask==2.2.5
Flask-Login==0.6.3
Flask-WTF==1.2.1
fonttools==4.43.0
greenlet==3.0.3
h11==0.12.0
idna==3.7
imagesize==1.3.0
itsdangerous==2.0.1
Jinja2==3.1.6
kiwisolver==1.3.2
Mako==1.2.4
MarkupSafe==2.1.2
matplotlib==3.5.1
numpy==1.23.1
outcome==1.1.0
packaging==21.3
pandas==1.3.5
pdfkit==1.0.0
pgeocode==0.3.0
pillow==10.3.0
pycountry==20.7.3
pycparser==2.21
Pygments==2.15.1
pyOpenSSL==21.0.0
pyparsing==3.0.6
python-dateutil==2.8.2
python-dotenv==0.19.2
pytz==2021.3
Expand Down
1 change: 1 addition & 0 deletions run_coverage.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SET NATURE_RECORDER_DB=%PROJECT_ROOT%\data\naturerecorder_test.db

ECHO Project root = %PROJECT_ROOT%
ECHO Python Path = %PYTHONPATH%
ECHO Database Path = %NATURE_RECORDER_DB%

coverage run --branch --source src -m unittest discover
coverage html -d cov_html
Expand Down
2 changes: 1 addition & 1 deletion run_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export NATURE_RECORDER_DB="$PROJECT_ROOT/data/naturerecorder_test.db"

echo "Project root = $PROJECT_ROOT"
echo "Python Path = $PYTHONPATH"
echo "Test Database = $NATURE_RECORDER_DB"
echo "Database Path = $NATURE_RECORDER_DB"

coverage run --branch --source src -m unittest discover
coverage html -d cov_html
2 changes: 2 additions & 0 deletions run_tests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
SET PROJECT_ROOT=%~p0
CALL %PROJECT_ROOT%\venv\Scripts\activate.bat
SET PYTHONPATH=%PROJECT_ROOT%src
SET NATURE_RECORDER_DB=%PROJECT_ROOT%data\naturerecorder_test.db

ECHO Project root = %PROJECT_ROOT%
ECHO Python Path = %PYTHONPATH%
ECHO Database Path = %NATURE_RECORDER_DB%

python -m unittest
ECHO ON
2 changes: 2 additions & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
export PROJECT_ROOT=$( cd "$( dirname "$0" )" && pwd )
. $PROJECT_ROOT/venv/bin/activate
export PYTHONPATH=$PROJECT_ROOT/src
export NATURE_RECORDER_DB="$PROJECT_ROOT/data/naturerecorder_test.db"

echo "Project root = $PROJECT_ROOT"
echo "Python Path = $PYTHONPATH"
echo "Database Path = $NATURE_RECORDER_DB"

python -m unittest
4 changes: 2 additions & 2 deletions run_web.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@ECHO OFF
SET PROJECT_ROOT=%~p0
SET PROJECT_ROOT=C:%~p0
CALL %PROJECT_ROOT%\venv\Scripts\activate.bat
SET PYTHONPATH=%PROJECT_ROOT%src
SET NATURE_RECORDER_DB=%PROJECT_ROOT%data\naturerecorder.db
SET NATURE_RECORDER_DB=%PROJECT_ROOT%data\naturerecorder_dev.db
SET FLASK_ENV=development

ECHO Project root = %PROJECT_ROOT%
Expand Down
2 changes: 1 addition & 1 deletion run_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export PROJECT_ROOT=$( cd "$( dirname "$0" )" && pwd )
. $PROJECT_ROOT/venv/bin/activate
export PYTHONPATH=$PROJECT_ROOT/src
export NATURE_RECORDER_DB=$PROJECT_ROOT/data/naturerecorder.db
export NATURE_RECORDER_DB="$PROJECT_ROOT/data/naturerecorder_dev.db"
export FLASK_ENV=development

echo "Project root = $PROJECT_ROOT"
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def find_package_files(directory, remove_root):

setuptools.setup(
name="nature_recorder",
version="1.14.0",
version="1.15.0",
description="Wildlife sightings database",
packages=setuptools.find_packages("src"),
include_package_data=True,
Expand All @@ -42,9 +42,7 @@ def find_package_files(directory, remove_root):
"naturerec_web.categories": ["templates/categories/*.html"],
"naturerec_web.export": ["templates/export/*.html"],
"naturerec_web.jobs": ["templates/jobs/*.html"],
"naturerec_web.life_list": ["templates/life_list/*.html"],
"naturerec_web.locations": ["templates/locations/*.html"],
"naturerec_web.reports": ["templates/reports/*.html"],
"naturerec_web.sightings": ["templates/sightings/*.html"],
"naturerec_web.species": ["templates/species/*.html"],
"naturerec_web.species_ratings": ["templates/species_ratings/*.html"],
Expand Down
4 changes: 1 addition & 3 deletions src/naturerec_model/data_exchange/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from .status_import_helper import StatusImportHelper
from .sightings_import_helper import SightingsImportHelper
from .sightings_export_helper import SightingsExportHelper
from .life_list_export_helper import LifeListExportHelper


__all__ = [
"StatusImportHelper",
"SightingsImportHelper",
"SightingsExportHelper",
"LifeListExportHelper"
"SightingsExportHelper"
]
49 changes: 0 additions & 49 deletions src/naturerec_model/data_exchange/life_list_export_helper.py

This file was deleted.

7 changes: 1 addition & 6 deletions src/naturerec_model/logic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
from .categories import create_category, get_category, list_categories, update_category, delete_category
from .species import create_species, get_species, list_species, update_species, delete_species
from .locations import create_location, get_location, list_locations, update_location, geocode_postcode, delete_location
from .sightings import create_sighting, get_sighting, list_sightings, update_sighting, life_list, delete_sighting
from .sightings import create_sighting, get_sighting, list_sightings, update_sighting, delete_sighting
from .status_schemes import create_status_scheme, get_status_scheme, list_status_schemes, update_status_scheme, \
delete_status_scheme
from .status_ratings import create_status_rating, update_status_rating, delete_status_rating
from .species_status_ratings import create_species_status_rating, get_species_status_rating, \
list_species_status_ratings, close_species_status_rating, delete_species_status_rating
from .job_statuses import create_job_status, complete_job_status, list_job_status
from .reports import location_species_report, species_by_date_report, get_report_barchart
from .users import create_user, authenticate, get_user


Expand All @@ -32,7 +31,6 @@
"create_sighting",
"get_sighting",
"list_sightings",
"life_list",
"delete_sighting",
"update_sighting",
"create_status_scheme",
Expand All @@ -51,9 +49,6 @@
"create_job_status",
"complete_job_status",
"list_job_status",
"location_species_report",
"species_by_date_report",
"get_report_barchart",
"create_user",
"authenticate",
"get_user"
Expand Down
Loading