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

Seed local database with mock data #253

Closed
codenprose opened this issue Apr 27, 2019 · 3 comments
Closed

Seed local database with mock data #253

codenprose opened this issue Apr 27, 2019 · 3 comments
Assignees
Labels

Comments

@codenprose
Copy link
Collaborator

When running the project for the first time, we should seed the local database with mock data.

@codenprose codenprose added the be label Apr 27, 2019
@josh-byster
Copy link
Contributor

@dkh215 Hello! I was one of the software developers for this project and I'm so glad/excited to see this project is being actively worked on and getting ready for deployment.

To follow up on this issue, does create_dummy_data.py in the backend folder help at all with this?

@codenprose
Copy link
Collaborator Author

Hey @josh-byster! Yes, super helpful 👌 we'll just need to incorporate this into a "Getting Started Guide" for folks that are setting up the project for the first time.

@adamzev adamzev self-assigned this May 11, 2019
@adamzev
Copy link
Collaborator

adamzev commented May 11, 2019

I will be working on using the create_dummy_data.py to seed the database. I'll create a dump from that and have a script that will run in docker that will seed the database with that data if none exists. I think I have an example for this in another project I'm working on that I can base this on.

adamzev pushed a commit to adamzev/philareads that referenced this issue May 11, 2019
* added to .gitignore
* added a file testdb_seed
* removed reseting db from docker_script because this is handled in docker-compose-dev

NOTE:
docker-compose.yml is not currently used and will not reset or seed the database.
Just use docker-compose-dev.yml for now.
codenprose pushed a commit that referenced this issue May 20, 2019
* added to .gitignore
* added a file testdb_seed
* removed reseting db from docker_script because this is handled in docker-compose-dev

NOTE:
docker-compose.yml is not currently used and will not reset or seed the database.
Just use docker-compose-dev.yml for now.
@adamzev adamzev closed this as completed May 20, 2019
codenprose pushed a commit that referenced this issue Jun 7, 2019
* Use Docker to seed db (#253)

* added to .gitignore
* added a file testdb_seed
* removed reseting db from docker_script because this is handled in docker-compose-dev

NOTE:
docker-compose.yml is not currently used and will not reset or seed the database.
Just use docker-compose-dev.yml for now.

* Update packages related to security issues

requests: 2.18.4 > 2.22.0
SQLAlchemy 1.1.14 > 1.3.3
PyJWT 1.4.2 > 1.7.1
urllib3 1.22 > 1.25.2

* Update versions and specify jwt decode algorithm

alembic 0.9.6 > 1.0.10
flask-sqlalchemy 2.3.2 > 2.4.0
pyscopg2 2.7.5 > psycopg2-binary 2.7.5
sqlalchemy-utils 0.33.5 > 0.33.11
werkzeug 0.14.1 > 0.15.4

Specifying a jwt decode algorithm avoids a deprication warning that would have been introduced from these version update commits.w

* code formating and remove unused import

* updates pipfile and requirements to fix security

requirements.txt is generated by pipfile so fixing pipfile should have been the first step. This commit should fix the outdated libraries that had security issues.

* badges are labeled with current year

Using the db table Year which stores a single value (what the current year is) the badges will display the current year.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants