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

57 create library for flags for all the different python scripts #63

Conversation

sanga1999
Copy link
Collaborator

This PR has the new config parser library, along with updates to the ini file, and all files that read from the config parser.

@sanga1999 sanga1999 linked an issue Sep 23, 2024 that may be closed by this pull request
tacc_stats.ini Outdated
data_dir = /tacc_stats_site/%(machine)s
server = tacc-stats02.tacc.utexas.edu
server = tacc-stats04.tacc.utexas.edu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this generic in the main tree

tacc_stats.ini Outdated
dbname = test_db
daily_archive_dir = %(data_dir)s/daily_archive
engine_name = django.db.backends.postgresql_psycopg2
username = taccstats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the taccstats user/pass to user and pass

import psycopg2
import tacc_stats.cfg as cfg
import conf_parser as cfg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conf parser needs to be a full name under taccstats like the line below: from tacc_stats.analysis.gen.utils import read_sql

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a comment for every file

conf_parser.py Outdated
cfg = configparser.ConfigParser()

# Append your local repository path here:
cfg.read('/home/sg99/tacc_stats/tacc_stats.ini')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this path non-absolute, we can talk about ways to do this.


CONNECTION = cfg.get_db_connection_string()
print("SOMETHING SHOULD PRINT\n")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove debug statements

@stephenlienharrell stephenlienharrell merged commit 9ffdb85 into master Oct 16, 2024
@sanga1999 sanga1999 deleted the 57-create-library-for-flags-for-all-the-different-python-scripts branch October 16, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create library for flags for all the different python scripts
2 participants