-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pyproject.toml; add devcontainer for development; bump some packages
- Loading branch information
Evan Babb
committed
Nov 13, 2024
1 parent
2379562
commit 7adcf66
Showing
14 changed files
with
188 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "[Optional] Your project name here", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "roundware-dev", | ||
"remoteUser": "root", | ||
"runServices": ["roundware-db"], | ||
"shutdownAction": "stopCompose", | ||
"containerEnv": { | ||
"DJANGO_SETTINGS_MODULE": "roundware.settings.testing", | ||
}, | ||
"workspaceFolder": "/code", | ||
"postCreateCommand": [ | ||
"./.devcontainer/postCreate.sh" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# install git in our devcontainer | ||
apt-get update -y | ||
apt-get install -y git | ||
apt-get clean | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# migrate the database | ||
python -m roundware.manage migrate | ||
|
||
# load fixture data | ||
python -m roundware.manage loaddata default_auth.json | ||
python -m roundware.manage loaddata sample_project.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
FROM ubuntu:20.04 as roundware | ||
FROM ubuntu:24.04 | ||
RUN mkdir /code | ||
ENV PATH=/code:$PATH | ||
ENV PYTHONPATH=/code | ||
WORKDIR /code | ||
RUN apt-get update | ||
|
||
WORKDIR /code | ||
ADD requirements.apt . | ||
RUN apt-get update | ||
RUN DEBIAN_FRONTEND=noninteractive xargs -a requirements.apt apt-get install -y --fix-missing | ||
RUN python3 -m pip install pip setuptools --upgrade | ||
RUN which python3 && python3 --version | ||
ADD requirements ./requirements | ||
ADD requirements.txt . | ||
ADD scripts ./scripts | ||
ADD roundware ./roundware | ||
RUN python3 -m pip install -r requirements.txt | ||
RUN python3 -m pip install -r requirements/dev.txt | ||
RUN python3 roundware/manage.py collectstatic | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update -y && \ | ||
xargs -a requirements.apt apt-get install -y --fix-missing && \ | ||
apt-get upgrade -y gdal-bin \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV VIRTUAL_ENV=/pythonenv/roundware-venv | ||
RUN mkdir /pythonenv/ | ||
RUN python3 -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
RUN python3 -m pip install pip setuptools --upgrade && \ | ||
which python3 \ | ||
&& python3 --version | ||
|
||
ADD pyproject.toml . | ||
ADD scripts/ ./scripts | ||
ADD roundware/ ./roundware | ||
|
||
RUN python3 -m pip install . | ||
RUN python3 -m roundware.manage collectstatic | ||
|
||
ADD .coveragerc . | ||
ADD .coveragerc . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# pyproject.toml for installing instrument-data-collector | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "roundware" | ||
description = "Roundware Server" | ||
license = {text = "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)"} | ||
dynamic = ['version'] | ||
authors = [ | ||
{"name" = "Halsey Burgund", "email" = "[email protected]"}, | ||
{"name" = "Mike MacHenry"}, | ||
{"name" = "Ben McAllister"}, | ||
{"name" = "Jule Slootbeek"}, | ||
{"name" = "Bryan Wilson"}, | ||
{"name" = "Brad Erickson", "email" = "[email protected]" }, | ||
{"name" = "Evan Babb", "email" = "[email protected]"}, | ||
] | ||
|
||
maintainers = [ | ||
{"name" = "Halsey Burgund", "email" = "[email protected]"}, | ||
{"name" = "Evan Babb", "email" = "[email protected]"}, | ||
] | ||
|
||
requires-python = ">=3.11" | ||
|
||
dependencies = [ | ||
"Django==3.0", | ||
# Creates REST APIs | ||
"djangorestframework", | ||
# locks down access to api endpoints | ||
"django-dry-rest-permissions", | ||
# Used for DRF filtering | ||
"django-filter<2.3", | ||
# Used in roundware/rw/admin.py, roundware/rw/forms.py, roundware/rw/views, and more. | ||
"django-guardian==2.2.0", | ||
# Used by roundware/api1/commands.py | ||
"psutil==3.4.2", | ||
# Used by roundware/rw/fields.py | ||
# django-validated-file==2.0.1 | ||
"python-magic==0.4.8", | ||
# Used in roundware/rw/views.py | ||
"django-braces==1.14.0", | ||
# Loaded in roundware/urls.py | ||
# django-adminplus==0.2.1 | ||
# Used in roundware/rw/forms.py | ||
"django-crispy-forms==1.9.1", | ||
# Used in roundware/rw/widgets.py | ||
"django-floppyforms==1.9.0", | ||
# Used in roundware/rw/views.py: | ||
"django-extra-views==0.13.0", | ||
# Used in roundware/rw/fields.py and roundware/rw/widgets.py | ||
"django-sortedm2m==3.1.1", | ||
# Required for RDF Date parsing | ||
"python-dateutil==2.2", | ||
# Used in roundwared/icecast2.py | ||
"requests<2.5", | ||
# Used in admin, including Batch Tag Add | ||
"django-formset-js==0.4.0", | ||
# database adapter for PostgreSQL | ||
"psycopg2", | ||
# geographic distance calculator utilities | ||
"geopy", | ||
# cors support to remove php layer | ||
"django-cors-headers==3.3.0", | ||
# fiona is a useful tool for processing geographic files (ETL) | ||
"fiona", | ||
# geographic extensions for djangorestframework-gis | ||
"djangorestframework-gis<=0.16", | ||
# leaflet map utilities for django admin | ||
"django-leaflet", | ||
# Bootstrap admin theme for Django 1.9 | ||
# https://github.com/roundware/django-admin-bootstrapped/zipball/3.0.0 | ||
# audio conversions | ||
"ffmpeg-python==0.2.0" | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"ipython", | ||
] | ||
test = [ | ||
"coverage", | ||
"webtest", | ||
"django-webtest", | ||
"model_bakery", | ||
"mock", | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "roundware.__version__"} | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ pacpl | |
python3 | ||
python3-dev | ||
python3-pip | ||
python3-venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '0.4.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters