Skip to content

Commit

Permalink
BLD: Consolidate build configurations and rebuilt requirements (#27)
Browse files Browse the repository at this point in the history
* BLD: Consolidated build configurations and rebuilt requirements

* Fixed pyproject vars and added atomicwrites dependency

* Fix build issues in test and added Dockerfile

* Added missing sympy dependency from broken laika package
  • Loading branch information
jmccartin authored Dec 28, 2022
1 parent 00c5fd2 commit 07f74d4
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 116 deletions.
13 changes: 0 additions & 13 deletions .coveragerc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install system-deps (for pycurl)
run: sudo apt-get install libcurl4-gnutls-dev libgnutls28-dev
run: sudo apt-get install -y libcurl4-openssl-dev libgeos-dev
- name: Install Python packgaes
run: |
# These packages are installed in the base environment but may be older
Expand All @@ -33,4 +33,4 @@ jobs:
- name: Test with pytest
run: |
coverage run -m pytest -vv
coverage report -m
coverage report -m
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.9

# Java needed for Spark API
RUN apt-get update -y \
&& apt-get install -y libcurl4-openssl-dev libgeos-dev

WORKDIR /tmp

COPY requirements-dev.txt .
COPY tid tid/
COPY .codecov.yml .
COPY pyproject.toml .

# Install python dependencies
RUN pip install -r requirements-dev.txt

ENTRYPOINT coverage run -m pytest -vv
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
This library is designed to look for traveling ionospheric disturbances
This branch is in a "being rewritten" state.

## Setup
Some platform-specific dependencies must be installed first:
### Ubuntu (20.04)
`sudo apt install gcc g++ libcurl4-dev libgeos-dev proj-bin`
### MacOS
`brew install proj`

Following this, you should be able to install the requirements with

`python -m pip install -r requirements.txt`

## Contributing
Please ensure pylint and mypy are happy before pushing code.
Expand Down
71 changes: 65 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "tid"
version = "0.1.0"
description = "Ionospheric measurements from GPS to detect launches."
authors = [
{name = "Tyler Nighswander"},
{name = "Michael Nute"}
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Natural Language :: English",
"Programming Language :: Python :: 3",
]
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"atomicwrites",
"awkward",
"cartopy",
"georinex",
"hatanaka",
"h5py",
"laika@git+https://github.com/commaai/laika#egg=laika",
"matplotlib",
"numpy",
"pyyaml",
"ruptures",
"scipy",
"sympy",
"xarray"
]

[project.urls]
repository = "https://github.com/tylerni7/missile-tid"

[tool.setuptools.packages.find]
exclude = ["docs", "tests"]
namespaces = false # true by default

[tool.mypy]
python_version = "3.8"

Expand All @@ -23,12 +67,27 @@ ignore_missing_imports = true

[tool.pylint.'MESSAGES CONTROL']
max-line-length = 100
max-attributes=12
max-args=10
max-locals=20
min-public-methods=0
max-attributes = 12
max-args = 10
max-locals = 20
min-public-methods = 0
# accepted short names: i,j,k for iteration
# t for time
# f1,f2 for frequencies
good-names=['i,j,k,t,f1,f2']
ignore=["tests"]
good-names = ["i,j,k,t,f1,f2"]
ignore = ["tests"]

[tool.coverage.run]
source = ["tid"]

[tool.coverage.report]
omit = [
"*/python?.?/*",
"*/site-packages/nose/*",
# ignore _version.py and versioneer.py
".*version.*",
"*_version.py"
]
exclude_lines = [
"if __name__ == '__main__':"
]
73 changes: 59 additions & 14 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,59 @@
# These are required for developing the package (running the tests, building
# the documentation) but not necessarily required for _using_ it.
codecov
coverage
flake8
pytest
sphinx
twine
# These are dependencies of various sphinx extensions for documentation.
ipython
matplotlib
numpydoc
sphinx-copybutton
sphinx_rtd_theme
atomicwrites==1.4.1
attrs==22.2.0
awkward==2.0.4
awkward-cpp==5
black==22.12.0
Cartopy==0.21.1
certifi==2022.12.7
charset-normalizer==2.1.1
click==8.1.3
contourpy==1.0.6
coverage==7.0.1
cycler==0.11.0
exceptiongroup==1.1.0
flake8==6.0.0
fonttools==4.38.0
georinex==1.16.1
h5py==3.7.0
hatanaka==2.8.0
idna==3.4
importlib-resources==5.10.1
iniconfig==1.1.1
kiwisolver==1.4.4
laika @ git+https://github.com/commaai/laika@5eb0c3c2596dd12a232b83bdb057a716810e89cf
matplotlib==3.6.2
mccabe==0.7.0
mpmath==1.2.1
mypy==0.991
mypy-extensions==0.4.3
ncompress==1.0.0
numpy==1.24.1
packaging==22.0
pandas==1.5.2
pathspec==0.10.3
Pillow==9.3.0
platformdirs==2.6.0
pluggy==1.0.0
pycodestyle==2.10.0
pycurl==7.45.2
pyflakes==3.0.1
pyparsing==3.0.9
pyproj==3.4.1
pyshp==2.3.1
pytest==7.2.0
python-dateutil==2.8.2
pytz==2022.7
PyYAML==6.0
requests==2.28.1
scipy==1.9.3
setuptools-scm==7.1.0
Shapely==1.8.4
six==1.16.0
sympy==1.11.1
tomli==2.0.1
tqdm==4.64.1
typing_extensions==4.4.0
unlzw3==0.2.1
urllib3==1.26.13
xarray==2022.12.0
zipp==3.11.0
52 changes: 43 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
# List required packages in this file, one per line.

georinex
h5py
laika @ git+https://github.com/commaai/laika#egg=laika
matplotlib
numpy
ruptures
scipy
atomicwrites==1.4.1
awkward==2.0.4
awkward-cpp==5
Cartopy==0.21.1
certifi==2022.12.7
charset-normalizer==2.1.1
contourpy==1.0.6
cycler==0.11.0
fonttools==4.38.0
georinex==1.16.1
h5py==3.7.0
hatanaka==2.8.0
idna==3.4
importlib-resources==5.10.1
kiwisolver==1.4.4
laika @ git+https://github.com/commaai/laika@5eb0c3c2596dd12a232b83bdb057a716810e89cf
matplotlib==3.6.2
mpmath==1.2.1
ncompress==1.0.0
numpy==1.24.1
packaging==22.0
pandas==1.5.2
Pillow==9.3.0
pycurl==7.45.2
pyparsing==3.0.9
pyproj==3.4.1
pyshp==2.3.1
python-dateutil==2.8.2
pytz==2022.7
PyYAML==6.0
requests==2.28.1
scipy==1.9.3
setuptools-scm==7.1.0
Shapely==1.8.4
six==1.16.0
sympy==1.11.1
tomli==2.0.1
tqdm==4.64.1
typing_extensions==4.4.0
unlzw3==0.2.1
urllib3==1.26.13
xarray==2022.12.0
zipp==3.11.0
72 changes: 0 additions & 72 deletions setup.py

This file was deleted.

0 comments on commit 07f74d4

Please sign in to comment.