Skip to content

Commit

Permalink
Merge pull request #6 from ssec-jhu/bootstrap
Browse files Browse the repository at this point in the history
bootstrapping package from template
  • Loading branch information
amitschang authored Feb 20, 2024
2 parents 385a444 + 2f82f59 commit 300342d
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 48 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ jobs:
path: coverage.xml
retention-days: 14
if-no-files-found: error
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# files: ./coverage.xml
# flags: unittests
# name: codecov-umbrella
# verbose: true

docs:
name: Build docs with Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ authors:
- family-names: "Abbasinejad"
given-names: "Fatemeh"
orcid: "https://orcid.org/0009-0006-3239-7112"
title: "<package_name>"
title: "evolver-ng"
version: 0.0.1
doi: <insert zenodo DOI>
date-released: 2023-01-01
url: "https://github.com/ssec-jhu/<package_name>"
url: "https://github.com/ssec-jhu/evolver-ng"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip3 install -r requirements.txt

COPY . .

CMD ["uvicorn", "package_name.app.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "evolver.app.main:app", "--host", "0.0.0.0", "--port", "8000"]
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SSEC-JHU <package_name>
# SSEC-JHU evolver-ng

[![CI](https://github.com/ssec-jhu/base-template/actions/workflows/ci.yml/badge.svg)](https://github.com/ssec-jhu/base-template/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/ssec-jhu-base-template/badge/?version=latest)](https://ssec-jhu-base-template.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/ssec-jhu/base-template/branch/main/graph/badge.svg?token=0KPNKHRC2V)](https://codecov.io/gh/ssec-jhu/base-template)
[![Security](https://github.com/ssec-jhu/base-template/actions/workflows/security.yml/badge.svg)](https://github.com/ssec-jhu/base-template/actions/workflows/security.yml)
[![CI](https://github.com/ssec-jhu/evolver-ng/actions/workflows/ci.yml/badge.svg)](https://github.com/ssec-jhu/evolver-ng/actions/workflows/ci.yml)
<!---[![Documentation Status](https://readthedocs.org/projects/ssec-jhu-evolver-ng/badge/?version=latest)](https://ssec-jhu-evolver-ng.readthedocs.io/en/latest/?badge=latest) --->
<!---[![codecov](https://codecov.io/gh/ssec-jhu/evolver-ng/branch/main/graph/badge.svg?token=0KPNKHRC2V)](https://codecov.io/gh/ssec-jhu/evolver-ng) --->
[![Security](https://github.com/ssec-jhu/evolver-ng/actions/workflows/security.yml/badge.svg)](https://github.com/ssec-jhu/evolver-ng/actions/workflows/security.yml)
<!---[![DOI](https://zenodo.org/badge/<insert_ID_number>.svg)](https://zenodo.org/badge/latestdoi/<insert_ID_number>) --->


Expand Down Expand Up @@ -70,7 +70,7 @@ For additional cmds see the [Conda cheat-sheet](https://docs.conda.io/projects/c
#### with Docker:
* Follow the above [Build with Docker instructions](#with-docker).
* Run container from image: ``docker run -d -p 8000:8000 <image_name>``. _NOTE: ``-p 8000:8000`` is specific to the example application using port 8000._
* Alternatively, images can be pulled from ``ghcr.io/ssec-jhu/`` e.g., ``docker pull ghcr.io/ssec-jhu/base-template:pr-1``.
* Alternatively, images can be pulled from ``ghcr.io/ssec-jhu/`` e.g., ``docker pull ghcr.io/ssec-jhu/evolver-ng:pr-1``.

#### with Python ecosystem:
* Follow the above [Build with Python ecosystem instructions](#with-python-ecosystem).
Expand All @@ -88,7 +88,7 @@ _NOTE: The following steps require ``pip install -r requirements/dev.txt``._
* Run tox ``tox``. This will run all of linting, security, test, docs and package building within tox virtual environments.
* To run an individual step, use ``tox -e {step}`` for example, ``tox -e test``, ``tox -e build-docs``, etc.

Typically, the CI tests run in github actions will use tox to run as above. See also [ci.yml](https://github.com/ssec-jhu/base-template/blob/main/.github/workflows/ci.yml).
Typically, the CI tests run in github actions will use tox to run as above. See also [ci.yml](https://github.com/ssec-jhu/evolver-ng/blob/main/.github/workflows/ci.yml).

## Outside of tox:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ API
.. autosummary::
:toctree: generated

<package_name>
evolver
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Configuration file for the Sphinx documentation builder.

# -- Project information
from package_name import __project__, __version__
from evolver import __project__, __version__


project = __project__
copyright = '2023, SSEC-JHU'
copyright = '2024, SSEC-JHU'
author = 'SSEC-JHU'

release = __version__
Expand Down Expand Up @@ -48,7 +48,7 @@
'image_dark': '../_static/SSEC_logo_vert_white_lg_1184x661.png',
'text': f'{html_title}',
},
'repository_url': 'https://github.com/ssec-jhu/base-template',
'repository_url': 'https://github.com/ssec-jhu/evolver-ng',
'use_repository_button': True,
})

Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Welcome to <package_name>'s documentation!
Welcome to evolver's documentation!
==========================================

**<package_name>** is a Python library for...
**evolver** is a Python library for...

Check out the :doc:`usage` section for further information, including
how to :ref:`installation` the project.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Usage
Installation
------------

To use <package_name>, first install it using...:
To use evolver, first install it using...:
6 changes: 6 additions & 0 deletions evolver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__project__ = "evolver"

try:
from ._version import __version__
except ImportError:
__version__ = ''
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions package_name/__init__.py

This file was deleted.

14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "package_name" # Replace package_name with actual name (it's just a template).
name = "evolver"
dynamic = ["version"]
authors = [
{name = "Scientifc Software Engineering Center at JHU", email = "ssec@jhu.edu"},
Expand Down Expand Up @@ -34,21 +34,21 @@ docs = [
]

[project.urls]
homepage = "https://github.com/ssec-jhu/base-template"
documentation = "https://github.com/ssec-jhu/base-template"
repository = "https://github.com/ssec-jhu/base-template"
homepage = "https://github.com/ssec-jhu/evolver-ng"
documentation = "https://github.com/ssec-jhu/evolver-ng"
repository = "https://github.com/ssec-jhu/evolver-ng"

[build-system]
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=8.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["package_name"] # Replace package_name with actual name (it's just a template).
packages = ["evolver"]
zip-safe = false
include-package-data = true

[tool.setuptools_scm]
write_to = "package_name/_version.py" # Replace package_name with actual name (it's just a template).
write_to = "evolver/_version.py"

[tool.bandit]
exclude_dirs = ["tests"]
Expand Down Expand Up @@ -80,7 +80,7 @@ exclude = [
"_version.py"
]

ignore = [
lint.ignore = [
]

target-version = "py311"
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tox==4.12.1
tox==4.13.0
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ sphinx==6.2.1
sphinx_rtd_theme==2.0.0
sphinx_book_theme==1.1.0
sphinx-automodapi==0.16.0
sphinx-issues==3.0.1
sphinx-issues==4.0.0
nbsphinx==0.9.3
2 changes: 1 addition & 1 deletion requirements/prd.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fastapi==0.109.1
fastapi==0.109.2
uvicorn[standard]==0.27.0.post1
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bandit==1.7.5
ruff==0.1.15
bandit==1.7.7
ruff==0.2.2
pytest==8.0.0
pytest-cov==4.1.0
4 changes: 2 additions & 2 deletions tests/test_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from package_name.util import find_package_location, find_repo_location
from package_name import __project__, __version__
from evolver.util import find_package_location, find_repo_location
from evolver import __project__, __version__


def test_find_repo_location():
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ skip_install = true
deps =
-r requirements/test.txt
commands =
bandit -c pyproject.toml --severity-level=medium -r package_name
bandit -c pyproject.toml --severity-level=medium -r evolver

[testenv]
description = run tests
Expand Down

0 comments on commit 300342d

Please sign in to comment.