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

Publish regtech-regex to TestPypi #25

Open
jcadam14 opened this issue Feb 4, 2025 · 1 comment · May be fixed by #26
Open

Publish regtech-regex to TestPypi #25

jcadam14 opened this issue Feb 4, 2025 · 1 comment · May be fixed by #26
Assignees

Comments

@jcadam14
Copy link
Contributor

jcadam14 commented Feb 4, 2025

Look into process of getting regtech-regex into TestPypi https://test.pypi.org/project/regtech-regex/

This is tied to cfpb/regtech-api-commons#195 since regtech-api-commons depends on this package, I first will be pushing regtech-regex then regtech-api-commons. See notes below.

@jcadam14 jcadam14 self-assigned this Feb 4, 2025
@jcadam14
Copy link
Contributor Author

jcadam14 commented Feb 4, 2025

Notes on what is needed for pypi packages.

  1. An account needs to be created for Pypi and Test Pypi (separately). Account requires name, email, and password so need to determine who from CFPB will control that account.
  2. To generate API tokens, you have to set 2FA. This means using Google Authenticator or some other app (I used GA)
  3. API tokens can be generated per package or for the entire account. I found generating tokens on a per package basis less problematic and apparently is the preferred approach.
  4. I was not able to get poetry to publish regtech-regex nicely because of the yaml file we include. Hatch worked easily. So for regtech-regex, doing brew install hatch and using it is preferred.
  5. API tokens can be set as environment variables using HATCH_INDEX_AUTH=<token> with a HATCH_INDEX_USER=__token__
  6. Publishing does not allow overwriting existing published packages, so either you have to remove the existing, or always increment the version number
  7. Steps to build and publish are simply:
    a. hatch build
    b. hatch publish -r test

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 a pull request may close this issue.

1 participant