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

Migrate to s3dol #3

Merged
merged 20 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
andeaseme marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- name: Format source code
run: black --line-length=88 .

- name: S3 Localstack
run: docker run -d -e SERVICES=s3 -p 4566:4566 --name localstack localstack/localstack

# Documentation on "enable" codes:
# http://pylint.pycqa.org/en/latest/technical_reference/features.html#basic-checker-messages
# C0114: missing-module-docstring
Expand All @@ -37,7 +40,13 @@ jobs:
run: pylint ./$PROJECT_NAME --ignore=tests,examples --disable=all --enable=C0114

- name: Test
run: pytest --doctest-modules -v $PROJECT_NAME
run: |
export S3_TEST_ENDPOINT_RW=http://localhost:4566
export S3_TEST_BUCKET_RW=test-bucket
export S3_TEST_ACCESS_RW=access
export S3_TEST_SECRET_RW=secret
pytest --doctest-modules -v $PROJECT_NAME

publish:
name: Publish
if: "!contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')"
Expand Down Expand Up @@ -76,19 +85,24 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
isee update-setup-cfg

- name: Generate Documentation
run: isee generate-documentation

- name: Package
run: python setup.py sdist

- name: Publish
run: |
twine upload dist/$PROJECT_NAME-$VERSION.tar.gz -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --non-interactive --skip-existing --disable-progress-bar
epythet make . github

- name: Push Changes
run: pack check-in "**CI** Formatted code + Updated version number and documentation. [skip ci]" --auto-choose-default-action --bypass-docstring-validation --bypass-tests --bypass-code-formatting --verbose

- name: Tag Repository
run: isee tag-repo $VERSION

github-pages:
name: Publish GitHub Pages
needs: publish
runs-on: ubuntu-latest
steps:
- uses: i2mint/epythet/actions/publish-github-pages@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,6 @@ venv.bak/

# PyCharm
.idea

# Visual Studio Code
.vscode/
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,36 @@ s3 (through boto3) with a simple (dict-like or list-like) interface


To install: ```pip install s3dol```


## Set up credentials
Recommended prerequisite to make getting started easier but not required.

### Option 1: [Environment Variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
```
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-west-2
```

### Option 2: [Configure Default Profile in Credentials File](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
Add credentails in `~/.aws/credentials`
```
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
```

### Option 3: [Configure Default Profile with AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/configure/)
[Install AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
```bash
brew instal awscli
```
Set credentails with CLI
```bash
aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]:
```
1 change: 0 additions & 1 deletion docsrc/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions docsrc/Makefile

This file was deleted.

60 changes: 0 additions & 60 deletions docsrc/conf.py

This file was deleted.

13 changes: 0 additions & 13 deletions docsrc/index.rst

This file was deleted.

35 changes: 0 additions & 35 deletions docsrc/make.bat

This file was deleted.

Loading
Loading