diff --git a/Makefile b/Makefile index 50abe266e..31b4795d0 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ init-db: compose-build reset-db: @echo "Resetting and re-initializing the application db..." @make teardown - @docker volume rm solon_app-db-data || echo "No app DB found, continuing!" + @docker volume rm fidesops_app-db-data || echo "No app DB found, continuing!" @make init-db server: compose-build @@ -52,7 +52,7 @@ integration-env: compose-build quickstart: compose-build @docker-compose -f docker-compose.yml -f docker-compose.integration-quickstart.yml up -d - @docker exec -it fidesops_fidesops_1 python quickstart.py $(access_type) + @docker exec -it fidesops python quickstart.py #################### # Docker diff --git a/README.md b/README.md index 2cdfab1c4..a7b9e36e5 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,13 @@ If you're looking for a more detailed introduction to Fidesops, we recommend fol Run the quickstart in your terminal to give fidesops a test drive: +``` +Install Docker: https://docs.docker.com/desktop/#download-and-install +Install Make: brew install make +``` + ```bash +git clone https://github.com/ethyca/fidesops.git cd fidesops make quickstart ``` diff --git a/docker-compose.yml b/docker-compose.yml index 8ceb5cb9f..ef69f8e04 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,6 @@ services: fidesops: + container_name: fidesops build: context: . dockerfile: Dockerfile diff --git a/docs/fidesops/docs/development/overview.md b/docs/fidesops/docs/development/overview.md index 586137b6e..ed8c13fb3 100644 --- a/docs/fidesops/docs/development/overview.md +++ b/docs/fidesops/docs/development/overview.md @@ -2,20 +2,45 @@ --- -Thanks for contributing to Fides! This section of the docs is designed to help you become familiar with how we work, the standards we apply, and how to ensure your contribution is successful. +Thanks for contributing to Fidesops! This section of the docs is designed to help you become familiar with how we work, the standards we apply, and how to ensure your contribution is successful. -If you're stuck, don't be shy about asking for help [on GitHub](https://github.com/ethyca/solon/issues). +If you're stuck, don't be shy about asking for help [on GitHub](https://github.com/ethyca/fidesops/issues). -## Getting Started +## Getting Started with Fidesops in Docker -### Clone Fides +The recommended way to run Fidesops is to launch it with Docker and Docker Compose. `Make` commands wrap docker-compose +commands to give you different functionality. -To clone Fides for development, run `git clone https://github.com/ethyca/solon`. +### System Requirements -Once that is complete, there are a few different ways to spin up the project and get coding! +1. Install Docker: https://docs.docker.com/desktop/#download-and-install +2. Install `make` locally (see Make on Homebrew (Mac), Make for Windows, or your preferred installation) + 1. `brew install make` +3. Clone fidesops `git clone https://github.com/ethyca/fidesops.git` +4. `cd fidesops` + +### Available make commands +- `make server` - this spins up the Fastapi server and supporting resources (a Postgres database and a Redis cache), which you can visit at `http://0.0.0.0:8080`. Check out the docs at `http://0.0.0.0:8000/fidesops/` +- `make integration-env` - spins up everything in make server, plus additional postgres, mongo, and mysql databases for you to execute privacy requests against. + - Try this out locally with our [Fidesops Postman Collection](../postman/Fidesops.postman_collection.json) +- `make black`, `make mypy`, and `make pylint` - auto-formats code +- `make check-all` - runs the CI checks locally and verifies that your code meets project standards +- `make server-shell`- opens a shell on the Docker container, from here you can run useful commands like: + - `ipython` - open a Python shell +- `make pytest` - runs all unit tests except those that talk to integration databases +- `make pytest-integration-access` - runs access integration tests +- `make reset-db` - tears down the Fideops postgres db, then recreates and re-runs migrations. +- `make quickstart` - runs a quick, five second quickstart that talks to the Fidesops API to execute privacy requests +- `make check-migrations` - verifies there are no un-run migrations +- `make docs-serve` - spins up just the docs + +see [Makefile](../../../../Makefile) for more options. + + +#### Issues +When running `make server`, if you get a `importlib.metadata.PackageNotFoundError: fidesops`, do `make server-shell`, +and then run `pip install -e .`. Verify Fidesops is installed with `pip list`. -* __Recommended__: If you're using VS Code, the recommended way to work on Fides is by leveraging the Dev Container feature. The repo has a `.devcontainer/devcontainer.json` file already included that will set up a complete environment in VS Code, including the suggested VS Code extensions and settings. -* If you're using an editor besides VS Code, then the next best way to work on Fides is by utilizing the `Makefile` commands. See the guide [here](https://github.com/ethyca/solon/blob/main/docs/solon/docs/getting_started/docker.md) for more information on getting setting up via the `Makefile`. ### Write your code @@ -28,9 +53,9 @@ We have no doubt you can write amazing code! However, we want to help you ensure ### Submit your code -In order to submit code to Fides, please: +In order to submit code to Fidesops, please: -* [Fork the Fides repository](https://help.github.com/en/articles/fork-a-repo) +* [Fork the Fidesops repository](https://help.github.com/en/articles/fork-a-repo) * [Create a new branch](https://help.github.com/en/desktop/contributing-to-projects/creating-a-branch-for-your-work) on your fork * [Open a Pull Request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork) once your work is ready for review * Once automated tests have passed, a maintainer will review your PR and provide feedback on any changes it requires to be approved. Once approved, your PR will be merged into Fides. diff --git a/quickstart.py b/quickstart.py index 9c003af2b..a8817b679 100644 --- a/quickstart.py +++ b/quickstart.py @@ -602,7 +602,7 @@ def print_results(request_id: str) -> None: print( "-------------------------------------------------------------------------------------" ) - print("Press [enter] to define the data categories and relationships in your Mongo collections......") + print("Press [enter] to define the data categories and relationships in your Mongo collections...") input() mongo_dataset = create_dataset( diff --git a/setup.py b/setup.py index bb5a13ceb..acbac3aa6 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ description="Automation engine for privacy requests", long_description=long_description, long_description_content_type="text/markdown", - url="https://github.com/ethyca/solon", + url="https://github.com/ethyca/fidesops", entry_points={"console_scripts": ["fidesops=fidesops.cli:cli"]}, python_requires=">=3.7, <4", package_dir={"": "src"},