Skip to content

setup python package structure for dataone-auth #1

@mbjones

Description

@mbjones
  • Create github repo
  • Set up pythonpackage structure
  • Created GitHub action for CI

I created the new repository for the dataone-auth python package, and set it up with a skeleton package structure, including a full build and tests, and a github action that runs the tests on pushes to main and develop (but not PRs yet, easy to add if desired). https://github.com/DataONEorg/dataone-auth. I set it up to use uv with a hatchling build backend for the build, and  ruff for linting and formatting, which applies the major PEP8 rules, and finally with pytest for testing.

https://github.com/DataONEorg/dataone-auth

Quick walkthrough of build/lint/test commands:

❯ uv sync --reinstall
Resolved 8 packages in 21ms
      Built dataone-auth @ file:///Users/jones/development/dataone-auth
Prepared 7 packages in 649ms
Uninstalled 7 packages in 42ms
Installed 7 packages in 9ms
 ~ dataone-auth==0.1.0 (from file:///Users/jones/development/dataone-auth)
 ~ iniconfig==2.3.0
 ~ packaging==26.2
 ~ pluggy==1.6.0
 ~ pygments==2.20.0
 ~ pytest==9.0.3
 ~ ruff==0.15.12
❯ uv run ruff check .
All checks passed!
❯ uv run pytest
====================================================================== test session starts =======================================================================
platform darwin -- Python 3.13.13, pytest-9.0.3, pluggy-1.6.0 -- /Users/jones/development/dataone-auth/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/jones/development/dataone-auth
configfile: pyproject.toml
testpaths: tests
collected 3 items

tests/test_auth.py::TestEchoInputs::test_echo_inputs_returns_same_value PASSED                                                                             [ 33%]
tests/test_auth.py::TestEchoInputs::test_echo_inputs_zero PASSED                                                                                           [ 66%]
tests/test_auth.py::TestEchoInputs::test_echo_inputs_negative PASSED                                                                                       [100%]

======================================================================= 3 passed in 0.01s ========================================================================

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions