Skip to content

Commit

Permalink
Reload env in CloudFront replacing object attribute
Browse files Browse the repository at this point in the history
Have a safety net for incorrect filetype for `cloudfront_config`
Create a default option for file logging using `Enum`
  • Loading branch information
dormant-user committed Aug 17, 2024
1 parent 9be5aea commit 29b6548
Show file tree
Hide file tree
Showing 13 changed files with 224 additions and 84 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
workflow_dispatch:
inputs:
dry_run:
type: choice
description: Dry run mode
required: true
options:
Expand All @@ -35,7 +36,6 @@ jobs:
echo "dry_run=false" >> $GITHUB_ENV
fi
- uses: thevickypedia/pypi-publisher@v3
env:
token: ${{ secrets.PYPI_TOKEN }}
with:
token: ${{ secrets.PYPI_TOKEN }}
dry-run: ${{ env.dry_run }}
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,23 @@ nctl start

- **PORT** - Port number to expose using ngrok.
- **HOST** - Hostname of the server that has to be exposed.
<br><br>

- **NGROK_AUTH** - Auth token for ngrok.
- **NGROK_CONFIG** - Ngrok configuration filepath. Auto-created when auth token is specified.
- **DISTRIBUTION_ID** - Cloudfront distribution ID. Required to update an existing distribution.
- **DISTRIBUTION_CONFIG** - Cloudfront distribution config filepath. Required to create a new distribution.
- **DEBUG** - Boolean flag to enable debug level logging.

#### AWS Config
<br><br>

- **AWS_PROFILE_NAME** - AWS profile name.
- **AWS_ACCESS_KEY_ID** - AWS access key ID.
- **AWS_SECRET_ACCESS_KEY** - AWS secret key.
- **AWS_REGION_NAME** - AWS region name.
- **DISTRIBUTION_ID** - Cloudfront distribution ID. Required to update an existing distribution.
- **DISTRIBUTION_CONFIG** - Cloudfront distribution config filepath. Required to create a new distribution.
<br><br>

- **DEBUG** - Boolean flag to enable debug level logging.
- **LOG** - Simple option to switch between `stdout` and `file` logging.
- **LOG_CONFIG** - Custom logging configuration. Accepts `.yaml`, `.json` and `.ini` filetypes.

## Coding Standards
Docstring format: [`Google`][google-docs] <br>
Expand Down
25 changes: 11 additions & 14 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,23 @@ <h2>Environment Variables<a class="headerlink" href="#environment-variables" tit
</div></blockquote>
</details><ul class="simple">
<li><p><strong>PORT</strong> - Port number to expose using ngrok.</p></li>
<li><p><strong>HOST</strong> - Hostname of the server that has to be exposed.</p></li>
<li><p><strong>HOST</strong> - Hostname of the server that has to be exposed.
<br><br></p></li>
<li><p><strong>NGROK_AUTH</strong> - Auth token for ngrok.</p></li>
<li><p><strong>NGROK_CONFIG</strong> - Ngrok configuration filepath. Auto-created when auth token is specified.</p></li>
<li><p><strong>DISTRIBUTION_ID</strong> - Cloudfront distribution ID. Required to update an existing distribution.</p></li>
<li><p><strong>DISTRIBUTION_CONFIG</strong> - Cloudfront distribution config filepath. Required to create a new distribution.</p></li>
<li><p><strong>DEBUG</strong> - Boolean flag to enable debug level logging.</p></li>
</ul>
<section id="aws-config">
<h3>AWS Config<a class="headerlink" href="#aws-config" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p><strong>NGROK_CONFIG</strong> - Ngrok configuration filepath. Auto-created when auth token is specified.
<br><br></p></li>
<li><p><strong>AWS_PROFILE_NAME</strong> - AWS profile name.</p></li>
<li><p><strong>AWS_ACCESS_KEY_ID</strong> - AWS access key ID.</p></li>
<li><p><strong>AWS_SECRET_ACCESS_KEY</strong> - AWS secret key.</p></li>
<li><p><strong>AWS_REGION_NAME</strong> - AWS region name.</p></li>
<li><p><strong>DISTRIBUTION_ID</strong> - Cloudfront distribution ID. Required to update an existing distribution.</p></li>
<li><p><strong>DISTRIBUTION_CONFIG</strong> - Cloudfront distribution config filepath. Required to create a new distribution.
<br><br></p></li>
<li><p><strong>DEBUG</strong> - Boolean flag to enable debug level logging.</p></li>
<li><p><strong>LOG</strong> - Simple option to switch between <code class="docutils literal notranslate"><span class="pre">stdout</span></code> and <code class="docutils literal notranslate"><span class="pre">file</span></code> logging.</p></li>
<li><p><strong>LOG_CONFIG</strong> - Custom logging configuration. Accepts <code class="docutils literal notranslate"><span class="pre">.yaml</span></code>, <code class="docutils literal notranslate"><span class="pre">.json</span></code> and <code class="docutils literal notranslate"><span class="pre">.ini</span></code> filetypes.</p></li>
</ul>
</section>
</section>
<section id="coding-standards">
<h2>Coding Standards<a class="headerlink" href="#coding-standards" title="Permalink to this heading"></a></h2>
<p>Docstring format: <a class="reference external" href="https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings"><code class="docutils literal notranslate"><span class="pre">Google</span></code></a> <br>
Expand Down Expand Up @@ -167,10 +167,7 @@ <h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">NCTL</a><ul>
<li><a class="reference internal" href="#kick-off">Kick off</a></li>
<li><a class="reference internal" href="#environment-variables">Environment Variables</a><ul>
<li><a class="reference internal" href="#aws-config">AWS Config</a></li>
</ul>
</li>
<li><a class="reference internal" href="#environment-variables">Environment Variables</a></li>
<li><a class="reference internal" href="#coding-standards">Coding Standards</a></li>
<li><a class="reference internal" href="#release-notes">Release Notes</a></li>
<li><a class="reference internal" href="#linting">Linting</a></li>
Expand Down
15 changes: 10 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,23 @@ nctl start

- **PORT** - Port number to expose using ngrok.
- **HOST** - Hostname of the server that has to be exposed.
<br><br>

- **NGROK_AUTH** - Auth token for ngrok.
- **NGROK_CONFIG** - Ngrok configuration filepath. Auto-created when auth token is specified.
- **DISTRIBUTION_ID** - Cloudfront distribution ID. Required to update an existing distribution.
- **DISTRIBUTION_CONFIG** - Cloudfront distribution config filepath. Required to create a new distribution.
- **DEBUG** - Boolean flag to enable debug level logging.

#### AWS Config
<br><br>

- **AWS_PROFILE_NAME** - AWS profile name.
- **AWS_ACCESS_KEY_ID** - AWS access key ID.
- **AWS_SECRET_ACCESS_KEY** - AWS secret key.
- **AWS_REGION_NAME** - AWS region name.
- **DISTRIBUTION_ID** - Cloudfront distribution ID. Required to update an existing distribution.
- **DISTRIBUTION_CONFIG** - Cloudfront distribution config filepath. Required to create a new distribution.
<br><br>

- **DEBUG** - Boolean flag to enable debug level logging.
- **LOG** - Simple option to switch between `stdout` and `file` logging.
- **LOG_CONFIG** - Custom logging configuration. Accepts `.yaml`, `.json` and `.ini` filetypes.

## Coding Standards
Docstring format: [`Google`][google-docs] <br>
Expand Down
15 changes: 10 additions & 5 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,23 @@ nctl start

- **PORT** - Port number to expose using ngrok.
- **HOST** - Hostname of the server that has to be exposed.
<br><br>

- **NGROK_AUTH** - Auth token for ngrok.
- **NGROK_CONFIG** - Ngrok configuration filepath. Auto-created when auth token is specified.
- **DISTRIBUTION_ID** - Cloudfront distribution ID. Required to update an existing distribution.
- **DISTRIBUTION_CONFIG** - Cloudfront distribution config filepath. Required to create a new distribution.
- **DEBUG** - Boolean flag to enable debug level logging.

#### AWS Config
<br><br>

- **AWS_PROFILE_NAME** - AWS profile name.
- **AWS_ACCESS_KEY_ID** - AWS access key ID.
- **AWS_SECRET_ACCESS_KEY** - AWS secret key.
- **AWS_REGION_NAME** - AWS region name.
- **DISTRIBUTION_ID** - Cloudfront distribution ID. Required to update an existing distribution.
- **DISTRIBUTION_CONFIG** - Cloudfront distribution config filepath. Required to create a new distribution.
<br><br>

- **DEBUG** - Boolean flag to enable debug level logging.
- **LOG** - Simple option to switch between `stdout` and `file` logging.
- **LOG_CONFIG** - Custom logging configuration. Accepts `.yaml`, `.json` and `.ini` filetypes.

## Coding Standards
Docstring format: [`Google`][google-docs] <br>
Expand Down
20 changes: 18 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ <h2 id="C">C</h2>
<li><a href="index.html#nctl.models.Concurrency.cloudfront_process">cloudfront_process (nctl.models.Concurrency attribute)</a>
</li>
<li><a href="index.html#nctl.models.Concurrency">Concurrency (class in nctl.models)</a>
</li>
<li><a href="index.html#nctl.models.Concurrency.Config">Concurrency.Config (class in nctl.models)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#nctl.models.Concurrency.Config">Concurrency.Config (class in nctl.models)</a>
<li><a href="index.html#nctl.models.EnvConfig.configdir">configdir (nctl.models.EnvConfig attribute)</a>
</li>
<li><a href="index.html#nctl.logger.configure_logging">configure_logging() (in module nctl.logger)</a>
</li>
Expand Down Expand Up @@ -147,10 +149,12 @@ <h2 id="E">E</h2>
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#nctl.logger.AddProcessName.filter">filter() (nctl.logger.AddProcessName method)</a>
<li><a href="index.html#nctl.models.LogOptions.file">file (nctl.models.LogOptions attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#nctl.logger.AddProcessName.filter">filter() (nctl.logger.AddProcessName method)</a>
</li>
<li><a href="index.html#nctl.models.EnvConfig.from_env_file">from_env_file() (nctl.models.EnvConfig class method)</a>
</li>
</ul></td>
Expand Down Expand Up @@ -179,6 +183,12 @@ <h2 id="H">H</h2>
<h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#nctl.logger.LogConfig.log">log (nctl.logger.LogConfig attribute)</a>

<ul>
<li><a href="index.html#nctl.models.EnvConfig.log">(nctl.models.EnvConfig attribute)</a>
</li>
</ul></li>
<li><a href="index.html#nctl.logger.LogConfig.log_config">log_config (nctl.logger.LogConfig attribute)</a>

<ul>
Expand All @@ -190,6 +200,8 @@ <h2 id="L">L</h2>
<li><a href="index.html#nctl.logger.LogConfig">LogConfig (class in nctl.logger)</a>
</li>
<li><a href="index.html#nctl.logger.LogConfig.Config">LogConfig.Config (class in nctl.logger)</a>
</li>
<li><a href="index.html#nctl.models.LogOptions">LogOptions (class in nctl.models)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -288,6 +300,10 @@ <h2 id="R">R</h2>

<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#nctl.models.LogOptions.stdout">stdout (nctl.models.LogOptions attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#nctl.aws.CloudFront.store_config">store_config() (nctl.aws.CloudFront method)</a>
</li>
Expand Down
Loading

0 comments on commit 29b6548

Please sign in to comment.