diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 89defa2..70ca413 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -26,7 +26,7 @@ RUN python -m pip install --upgrade pip COPY . . # install devcontainer requirements -RUN pip install --no-cache-dir -r .devcontainer/requirements.txt +RUN pip install -e .[dev] # install docs requirements RUN pip install --no-cache-dir -r docs/requirements.txt diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d3866d7..8227ceb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -23,7 +23,8 @@ "DavidAnson.vscode-markdownlint", "eamodio.gitlens", "esbenp.prettier-vscode", - "mhutchie.git-graph" + "mhutchie.git-graph", + "tamasfe.even-better-toml" ] } } diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt deleted file mode 100644 index 416634f..0000000 --- a/.devcontainer/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pre-commit diff --git a/pems/__init__.py b/pems/__init__.py new file mode 100644 index 0000000..ee5e7fc --- /dev/null +++ b/pems/__init__.py @@ -0,0 +1,7 @@ +from importlib.metadata import version, PackageNotFoundError + +try: + __version__ = version("pems") +except PackageNotFoundError: + # package is not installed + pass diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..525cdd8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[project] +name = "pems" +version = "0.0.1" +description = "Caltrans Performance Measurement System (PeMS) is an application that enables access to traffic data collected by sensors that span the freeway system across all major metropolitan areas of the State of California." +readme = "README.md" +license = { file = "LICENSE" } +classifiers = ["Programming Language :: Python :: 3 :: Only"] +requires-python = ">=3.12" +maintainers = [ + { name = "Compiler LLC", email = "dev@compiler.la" } +] +dependencies = [ +] + +[project.optional-dependencies] +dev = [ + "black", + "flake8", + "pre-commit" +] + +[project.urls] +Code = "https://github.com/compilerla/pems" +Homepage = "https://compilerla.github.io/pems/" +Issues = "https://github.com/compilerla/pems/issues" + +[build-system] +requires = ["setuptools>=75"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 127 +target-version = ['py312'] +include = '\.pyi?$' + +[tool.setuptools.packages.find] +include = ["pems*"] +namespaces = false