Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Add some updates to the development docs (#10)
Browse files Browse the repository at this point in the history
* Add some updates to the development docs.

* Add more make commands to the dev docs.

* Fix reset-db.

* Fix extra space.

* Specify fidesops container name and use that in quickstart.
  • Loading branch information
pattisdr committed Oct 31, 2021
1 parent c123343 commit ef43fd4
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
services:
fidesops:
container_name: fidesops
build:
context: .
dockerfile: Dockerfile
Expand Down
45 changes: 35 additions & 10 deletions docs/fidesops/docs/development/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit ef43fd4

Please sign in to comment.