Skip to content

Commit def6ee4

Browse files
author
alex
committed
Better Progress Tracking
1 parent 97542fd commit def6ee4

17 files changed

+426
-113
lines changed

.gitignore

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
*.pyc
2+
.idea
3+
/staticfiles
14
data.json
2-
static/
3-
scap/static/
4-
scap/__pycache__/
5-
SCAPTestProject/__pycache__/
6-
scap/migrations/
7-
media/
5+
/scap/migrations
6+
/static
7+
/media
8+
/scapadmin/migrations
9+
/scap/static/assets
810
logfile
9-
/scap/migrations/
10-
dump.rdb
11-
.idea/
11+
db.sqlite3

.idea/inspectionProfiles/Project_Default.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+1-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+21-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

environment.yml

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: SCAP_WebApp
2+
channels:
3+
- defaults
4+
dependencies:
5+
- asgiref=3.5.2=py39haa95532_0
6+
- blas=1.0=mkl
7+
- bottleneck=1.3.5=py39h080aedc_0
8+
- brotli=1.0.9=h2bbff1b_7
9+
- brotli-bin=1.0.9=h2bbff1b_7
10+
- ca-certificates=2023.05.30=haa95532_0
11+
- contourpy=1.0.5=py39h59b6b97_0
12+
- cycler=0.11.0=pyhd3eb1b0_0
13+
- django=4.1=py39haa95532_0
14+
- fonttools=4.25.0=pyhd3eb1b0_0
15+
- freetype=2.12.1=ha860e81_0
16+
- giflib=5.2.1=h8cc25b3_3
17+
- glib=2.69.1=h5dc1a3c_2
18+
- gst-plugins-base=1.18.5=h9e645db_0
19+
- gstreamer=1.18.5=hd78058f_0
20+
- icu=58.2=ha925a31_3
21+
- importlib_resources=5.2.0=pyhd3eb1b0_1
22+
- intel-openmp=2023.1.0=h59b6b97_46319
23+
- jpeg=9e=h2bbff1b_1
24+
- kiwisolver=1.4.4=py39hd77b12b_0
25+
- krb5=1.19.4=h5b6d351_0
26+
- lerc=3.0=hd77b12b_0
27+
- libbrotlicommon=1.0.9=h2bbff1b_7
28+
- libbrotlidec=1.0.9=h2bbff1b_7
29+
- libbrotlienc=1.0.9=h2bbff1b_7
30+
- libclang=14.0.6=default_hb5a9fac_1
31+
- libclang13=14.0.6=default_h8e68704_1
32+
- libdeflate=1.17=h2bbff1b_0
33+
- libffi=3.4.4=hd77b12b_0
34+
- libiconv=1.16=h2bbff1b_2
35+
- libogg=1.3.5=h2bbff1b_1
36+
- libpng=1.6.39=h8cc25b3_0
37+
- libtiff=4.5.0=h6c2663c_2
38+
- libvorbis=1.3.7=he774522_0
39+
- libwebp=1.2.4=hbc33d0d_1
40+
- libwebp-base=1.2.4=h2bbff1b_1
41+
- libxml2=2.10.3=h0ad7f3c_0
42+
- libxslt=1.1.37=h2bbff1b_0
43+
- lz4-c=1.9.4=h2bbff1b_0
44+
- matplotlib=3.7.1=py39haa95532_1
45+
- matplotlib-base=3.7.1=py39hf11a4ad_1
46+
- mkl=2023.1.0=h8bd8f75_46356
47+
- mkl-service=2.4.0=py39h2bbff1b_1
48+
- mkl_fft=1.3.6=py39hf11a4ad_1
49+
- mkl_random=1.2.2=py39hf11a4ad_1
50+
- munkres=1.1.4=py_0
51+
- numexpr=2.8.4=py39h7b80656_1
52+
- numpy=1.24.3=py39h79a8e48_1
53+
- numpy-base=1.24.3=py39h8a87ada_1
54+
- openssl=1.1.1u=h2bbff1b_0
55+
- packaging=23.0=py39haa95532_0
56+
- pandas=1.5.3=py39hf11a4ad_0
57+
- pcre=8.45=hd77b12b_0
58+
- pillow=9.4.0=py39hd77b12b_0
59+
- pip=23.0.1=py39haa95532_0
60+
- ply=3.11=py39haa95532_0
61+
- pyparsing=3.0.9=py39haa95532_0
62+
- pyqt=5.15.7=py39hd77b12b_0
63+
- pyqt5-sip=12.11.0=py39hd77b12b_0
64+
- python=3.9.16=h6244533_2
65+
- python-dateutil=2.8.2=pyhd3eb1b0_0
66+
- python-tzdata=2021.1=pyhd3eb1b0_0
67+
- pytz=2022.7=py39haa95532_0
68+
- qt-main=5.15.2=he8e5bd7_8
69+
- qt-webengine=5.15.9=hb9a9bb5_5
70+
- qtwebkit=5.212=h2bbfb41_5
71+
- setuptools=67.8.0=py39haa95532_0
72+
- sip=6.6.2=py39hd77b12b_0
73+
- six=1.16.0=pyhd3eb1b0_1
74+
- sqlite=3.41.2=h2bbff1b_0
75+
- sqlparse=0.4.3=py39haa95532_0
76+
- tbb=2021.8.0=h59b6b97_0
77+
- tk=8.6.12=h2bbff1b_0
78+
- toml=0.10.2=pyhd3eb1b0_0
79+
- tornado=6.2=py39h2bbff1b_0
80+
- tzdata=2023c=h04d1e81_0
81+
- vc=14.2=h21ff451_1
82+
- vs2015_runtime=14.27.29016=h5e58377_2
83+
- wheel=0.38.4=py39haa95532_0
84+
- xz=5.4.2=h8cc25b3_0
85+
- zipp=3.11.0=py39haa95532_0
86+
- zlib=1.2.13=h8cc25b3_0
87+
- zstd=1.5.5=hd43e919_0
88+
- pip:
89+
- asttokens==2.2.1
90+
- backcall==0.2.0
91+
- colorama==0.4.6
92+
- coverage==7.2.7
93+
- decorator==5.1.1
94+
- defusedxml==0.7.1
95+
- diff-match-patch==20230430
96+
- django-colorfield==0.9.0
97+
- django-import-export==3.2.0
98+
- et-xmlfile==1.1.0
99+
- executing==1.2.0
100+
- ipython==8.14.0
101+
- jedi==0.18.2
102+
- markuppy==1.14
103+
- matplotlib-inline==0.1.6
104+
- nested-lookup==0.2.25
105+
- odfpy==1.4.1
106+
- openpyxl==3.1.2
107+
- pandas-highcharts==0.5.2
108+
- parso==0.8.3
109+
- pickleshare==0.7.5
110+
- prompt-toolkit==3.0.38
111+
- pure-eval==0.2.2
112+
- pygments==2.15.1
113+
- pyyaml==6.0
114+
- stack-data==0.6.2
115+
- tablib==3.4.0
116+
- traitlets==5.9.0
117+
- typing-extensions==4.6.3
118+
- uuid==1.30
119+
- wcwidth==0.2.6
120+
- xlrd==2.0.1
121+
- xlwt==1.3.0
122+
prefix: C:\ProgramData\Anaconda3\envs\SCAP_WebApp

requirements.txt

+37-38
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
affine==2.4.0
2-
attrs==23.1.0
3-
boto3==1.28.54
4-
botocore==1.31.54
5-
certifi==2023.7.22
6-
click==8.1.7
7-
click-plugins==1.1.1
8-
cligj==0.7.2
9-
colorama==0.4.6
10-
defusedxml==0.7.1
11-
diff-match-patch==20230430
12-
django-import-export==3.3.1
13-
et-xmlfile==1.1.0
14-
Fiona==1.9.4.post1
15-
geopandas==0.13.2
16-
jmespath==1.0.1
17-
MarkupPy==1.14
18-
numpy==1.25.2
19-
odfpy==1.4.1
20-
openpyxl==3.1.2
21-
packaging==23.1
22-
pandas==2.0.3
23-
psycopg2==2.9.7
24-
psycopg2-binary==2.9.7
25-
pyparsing==3.1.1
26-
pyproj==3.6.0
27-
python-dateutil==2.8.2
28-
pytz==2023.3
29-
PyYAML==6.0.1
30-
rasterio==1.3.8
31-
s3transfer==0.6.2
32-
shapely==2.0.1
33-
six==1.16.0
34-
snuggs==1.4.7
35-
tablib==3.5.0
36-
urllib3==1.26.16
37-
xlrd==2.0.1
38-
xlwt==1.3.0
1+
asttokens==2.2.1
2+
backcall==0.2.0
3+
colorama==0.4.6
4+
coverage==7.2.7
5+
decorator==5.1.1
6+
defusedxml==0.7.1
7+
diff-match-patch==20230430
8+
django-colorfield==0.9.0
9+
django-import-export==3.2.0
10+
et-xmlfile==1.1.0
11+
executing==1.2.0
12+
fonttools==4.25.0
13+
ipython==8.14.0
14+
jedi==0.18.2
15+
MarkupPy==1.14
16+
matplotlib-inline==0.1.6
17+
munkres==1.1.4
18+
nested-lookup==0.2.25
19+
odfpy==1.4.1
20+
openpyxl==3.1.2
21+
pandas-highcharts==0.5.2
22+
parso==0.8.3
23+
pickleshare==0.7.5
24+
Pillow==9.4.0
25+
ply==3.11
26+
prompt-toolkit==3.0.38
27+
pure-eval==0.2.2
28+
Pygments==2.15.1
29+
PyYAML==6.0
30+
stack-data==0.6.2
31+
tablib==3.4.0
32+
traitlets==5.9.0
33+
typing_extensions==4.6.3
34+
uuid==1.30
35+
wcwidth==0.2.6
36+
xlrd==2.0.1
37+
xlwt==1.3.0

scap/admin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AOIFeatureAdmin(ImportExportModelAdmin, admin.ModelAdmin):
1111

1212

1313
class CurrentTaskAdmin(ImportExportModelAdmin, admin.ModelAdmin):
14-
list_display = ('id','overall_progress')
14+
list_display = ('id','stage_progress')
1515

1616

1717
class PilotCountryAdmin(ImportExportModelAdmin, admin.ModelAdmin):

scap/api.py

+18-6
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,15 @@ def get_available_fcs(collection):
564564
owner = collection.owner
565565
scap_admin = User.objects.get(username='scap_admin')
566566

567+
available_states = ["Processed", "Available"]
568+
567569
available_fcs_scap = []
568570
if owner != scap_admin:
569-
available_fcs_scap = list(ForestCoverCollection.objects.filter(owner=scap_admin))
571+
available_fcs_scap = list(ForestCoverCollection.objects.filter(owner=scap_admin,
572+
processing_status__in=available_states))
570573

571-
available_fcs = list(ForestCoverCollection.objects.filter(owner=owner)) + available_fcs_scap
574+
available_fcs = (list(ForestCoverCollection.objects.filter(owner=owner, processing_status__in=available_states)) +
575+
available_fcs_scap)
572576

573577
return available_fcs
574578

@@ -577,11 +581,15 @@ def get_available_aois(collection):
577581
owner = collection.owner
578582
scap_admin = User.objects.get(username='scap_admin')
579583

584+
available_states = ["Processed", "Available"]
585+
580586
available_aois_scap = []
581587
if owner != scap_admin:
582-
available_aois_scap = list(AOICollection.objects.filter(owner=scap_admin))
588+
available_aois_scap = list(AOICollection.objects.filter(owner=scap_admin,
589+
processing_status__in=available_states))
583590

584-
available_aois = list(AOICollection.objects.filter(owner=owner)) + available_aois_scap
591+
available_aois = (list(AOICollection.objects.filter(owner=owner, processing_status__in=available_states)) +
592+
available_aois_scap)
585593

586594
return available_aois
587595

@@ -590,11 +598,15 @@ def get_available_agbs(collection):
590598
owner = collection.owner
591599
scap_admin = User.objects.get(username='scap_admin')
592600

601+
available_states = ["Processed", "Available"]
602+
593603
available_agbs_scap = []
594604
if owner != scap_admin:
595-
available_agbs_scap = list(AGBCollection.objects.filter(owner=scap_admin))
605+
available_agbs_scap = list(AGBCollection.objects.filter(owner=scap_admin,
606+
processing_status__in=available_states))
596607

597-
available_agbs = list(AGBCollection.objects.filter(owner=owner)) + available_agbs_scap
608+
available_agbs = (list(AGBCollection.objects.filter(owner=owner, processing_status__in=available_states)) +
609+
available_agbs_scap)
598610

599611
return available_agbs
600612

0 commit comments

Comments
 (0)