Smithsonian / Smithsonian/caas-aspace-scripts
Refactor caas-aspace-scripts Repo to remove secrets.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 1
Description
When using the pandas library in update_agentids.py, there was an error when importing pandas in a repository that already had a secrets.py file. This is because pandas imports another secrets.py file from anaconda3/Lib/secrets.py. "Numpy relies on files in this directory called random.py and secrets.py so if you have files with those names numpy will not load." Source: https://stackoverflow.com/a/73059400
In order to fix it, I had to change the name of my local secrets.py file to something other than that. I also had to tell my IDE to NOT refactor the entire project, since that would change every reference to secrets.py in every file. This could be a larger discussion on flexibility vs. prescriptability [sic] of the caas-aspace-scripts repo and how we want to think about potential conflicts like this in the future.
Original conversation surrounding this issue: 24-generate-script-for-adding-awhi-agent-ids-to-aspace Pull Request Comment
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with update_agentids.py and search the repository for references to secrets.py. Read the linked pull request conversation to understand the naming conflict and the proposed scope before choosing a replacement. Done means the conflicting module name is removed consistently and the pandas import path works without the local file shadowing Anaconda's secrets.py.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100