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

[proposal] Adds a data/ directory under .gitignore #1586

Closed
4 of 5 tasks
karlcow opened this issue Jun 8, 2017 · 6 comments
Closed
4 of 5 tasks

[proposal] Adds a data/ directory under .gitignore #1586

karlcow opened this issue Jun 8, 2017 · 6 comments

Comments

@karlcow
Copy link
Member

karlcow commented Jun 8, 2017

Should we have a data/ directory where we stash things like

  • issues.db
  • sessions.db
  • Any other data useful for running webcompat.com but not part of the commits. (I'm thinking about the cache type-media list).

(Updated on August 17, 2017)

  • Create a data/ directory
  • Add a DATA_PATH in the config file
  • Check in the code where we rely on session.db and topsites*.db adjust the paths (@MDTsai)
  • Add data/ to .gitignore
  • Move topsites*.db and session.db (erase probably)
@miketaylr
Copy link
Member

Sounds good to me @karlcow. I also think we should just remove isuses.db entirely since it's dead code. But +1 to having a .gitignore'd data directory.

@karlcow
Copy link
Member Author

karlcow commented Aug 17, 2017

@karlcow
Copy link
Member Author

karlcow commented Aug 17, 2017

I will also need this data/ for domain names feeds in #132

@karlcow
Copy link
Member Author

karlcow commented Aug 17, 2017

For example:

diff --git a/config/environment.py b/config/environment.py
index 1359c64..275f4b3 100644
--- a/config/environment.py
+++ b/config/environment.py
@@ -8,6 +8,8 @@ import os
 
 # Define the application base directory
 BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
+DATA_PATH = os.path.join(BASE_DIR, 'data')
+FEED_PATH = os.path.join(DATA_PATH, 'feed')
 
 # the PRODUCTION and DEVELOPMENT environment variables are set in uwsgi.conf
 # on the webcompat server. If they're not set, they will default to None

@miketaylr
Copy link
Member

decision: let's do it!

@karlcow
Copy link
Member Author

karlcow commented Aug 24, 2017

Reminder: people will need to clean up their project root.

karlcow added a commit to karlcow/webcompat.com that referenced this issue Aug 24, 2017
karlcow added a commit to karlcow/webcompat.com that referenced this issue Aug 24, 2017
- Adds a data path
- Makes sure it exists
- Adjusts the code to this data path.
karlcow added a commit to karlcow/webcompat.com that referenced this issue Aug 25, 2017
- Adds a data path
- Makes sure it exists
- Adjusts the code to this data path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants