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

Add regtech-api-commons to testpypi #195

Open
jcadam14 opened this issue Feb 4, 2025 · 1 comment
Open

Add regtech-api-commons to testpypi #195

jcadam14 opened this issue Feb 4, 2025 · 1 comment
Assignees

Comments

@jcadam14
Copy link
Contributor

jcadam14 commented Feb 4, 2025

Look into process to place the regtech-api-commons package into TestPypi https://test.pypi.org/project/regtech-api-commons/

@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. Poetry needs to be updated to be able to pull from testpypi using poetry config repositories.testpypi https://test.pypi.org/legacy/
  5. Publishing does not allow overwriting existing published packages, so either you have to remove the existing, or always increment the version number
  6. I have not been able to get the setting of the api token using poetry config to work, so I pass the --username __token__ --password <token> to the publish command. If these can be stored in env var secrets and used in the command during the pipeline, that would be ideal.
  7. Steps to build and publish are simply:
    a. poetry build
    b. poetry publish --repository testpypi --username __token__ --password <token>

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

When branches are created from issues, their pull requests are automatically linked.

1 participant