Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pypi improvements #497

Merged
merged 7 commits into from
Nov 5, 2024
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ mlte/frontend/nuxt-app/.nuxt/
mlte/frontend/nuxt-app/.output/
mlte/frontend/nuxt-app/dist/
mlte/frontend/nuxt-app/node_modules/
mlte/frontend/nuxt-app/assets/uswds
mlte/frontend/nuxt-app/sass
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,3 @@ docs/site
/store*/
pgdata/
*.whl

/certs/*
!/certs/readme.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$ pip install mlte-python
```

You can go to our <a href="https://mlte.readthedocs.io/en/latest/getting_started/" target="_blank">getting started</a> page to see details on setting up and running MLTE. After that, you can head to our guide on <a href="https://mlte.readthedocs.io/en/latest/using_mlte/" target="_blank">using MLTE</a> for next steps. If you just want to know how to use the package in an existing project, check out our <a href="https://mlte.readthedocs.io/en/latest/mlte_mechanics/" target="_blank">MLTE Mechanics</a> guide. If you're interested in reading about the project more generally, see our <a href="https://mlte.readthedocs.io/en/latest/" target="_blank">documentation</a>.
You can go to our <a href="https://mlte.readthedocs.io/en/latest/setting_up_mlte/" target="_blank">setting up MLTE</a> page to see details on setting up and running MLTE. After that, you can head to our guide on <a href="https://mlte.readthedocs.io/en/latest/using_mlte/" target="_blank">using MLTE</a> for next steps. If you're interested in reading about the project more generally, see our <a href="https://mlte.readthedocs.io/en/latest/" target="_blank">documentation</a>.

### Citing This Work

Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ rm dist/mlte_python-*.gz
cd mlte/frontend/nuxt-app && npm run build
cd ../../../
poetry build

twine check dist/*
4 changes: 4 additions & 0 deletions certs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this folder but itself and the readme.
*
!.gitignore
!readme.txt
3 changes: 1 addition & 2 deletions docker/Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM mlte-base

# Set up node.
RUN apt-get install -y npm
RUN apt-get update && apt-get install -y npm

# Set up dependencies.
WORKDIR /mnt/app/mlte/frontend/nuxt-app
Expand All @@ -16,7 +16,6 @@ RUN npm install && npm cache clean --force
# Setup USWDS design dependencies.
COPY mlte/frontend/nuxt-app/assets /mnt/app/mlte/frontend/nuxt-app/assets
COPY mlte/frontend/nuxt-app/gulpfile.js /mnt/app/mlte/frontend/nuxt-app/
RUN npx gulp compile
RUN npx gulp init

# Install Python deps.
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ This document describes some of the development practices used within `MLTE`.
Use `poetry` to create a Python virtual environment and install the required runtime and development packages. This requires you to install `poetry` on your system first (see https://python-poetry.org/docs/#installation). Once it is installed, you can set up your environment like this (note the inclusion of dev dependency groups below):

```bash
$ python -m venv .venv
$ source .venv/bin/activate
$ poetry shell
$ poetry install --with qa,test,build,docs
```

Expand All @@ -34,7 +33,7 @@ $ poetry install --with demo-mac

You can run most project commands (e.g., format sources, lint), in two ways: using the commands in the included Makefile, or running things manually. Using the Makefile works on UNIX-like systems (or anywhere `make` is available), and is shorter to type. Alternatively, you can run each command manually. The sections below describe how to run commands in both ways.

Also, the commands below do not assume that you have your virtual environment enabled. Calling `poetry run` ensures things run in the current virtual environment even if it is not activated. If you manually activate your virtual environment with `source .venv/bin/activate` (see above), you can run all the commands below without the `poetry run` prefix.
Also, the commands below do not assume that you have your virtual environment enabled. Calling `poetry run` ensures things run in the current virtual environment even if it is not activated. If you manually activate your virtual environment with `poetry shell` (see above), you can run all the commands below without the `poetry run` prefix.

### Import Sorting

Expand Down
1,064 changes: 714 additions & 350 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "mlte-python"
version = "1.0.0"
description = "An infrastructure for machine learning test and evaluation."
authors = ["MLTE Engineers"]
readme = "README.md"
packages = [
{ include = "mlte" }
]
Expand All @@ -26,7 +27,7 @@ python = ">=3.9.1,<=3.11.0"
fastapi = ">=0.100.0"
pydantic-settings = "^2.0.3"
pydantic = "^2.1.1"
requests = "^2.31.0"
requests = "^2.32.3"
uvicorn = "^0.23.2"
httpx = "^0.24.1"
deepdiff = "^6.3.1"
Expand Down Expand Up @@ -95,6 +96,7 @@ nbmake = "^1.5.4"

[tool.poetry.group.build.dependencies]
bump2version = "^1.0.1"
twine = "^5.1.1"

[tool.isort]
profile="black"
Expand Down