Skip to content
Snippets Groups Projects
Commit 88271572 authored by pjm363 (Philip Monaco)'s avatar pjm363 (Philip Monaco)
Browse files

Merge branch '2-create-setup-py-and-precommit-sh-files' into 'main'

Resolve "Create setup.py and precommit.sh files"

Closes #2

See merge request pjm363/why-senior-project!1
parents 87568c1e c5b1f9f9
No related branches found
No related tags found
No related merge requests found
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
test:
script:
- python setup.py test
- pip install tox flake8 # you can also use tox
- tox -e py36,flake8
run:
script:
- python setup.py bdist_wheel
# an alternative approach is to install and run:
- pip install dist/*
# run the command here
artifacts:
paths:
- dist/*.whl
pages:
script:
- pip install sphinx sphinx-rtd-theme
- cd doc ; make html
- mv build/html/ ../public/
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
## Unreleased
[//]: #"This section is for rolling changes to be appended that will be part of the next release. This tracks master."
### Added
- Added precommit.sh to top level directory.
### Updated
### Removed
### Fixed
## [0.1.0]
\ No newline at end of file
setup.py 0 → 100644
import os
import subprocess
from setuptools import find_packages, setup
VERSION_MAJOR = 0
VERSION_MINOR = 0
VERSION_PATCH = 1
SEMVER_STRING = f"v{VERSION_MAJOR:d}.{VERSION_MINOR:d}.{VERSION_PATCH:d}"
PROJECT_NAME = os.getenv("PYPI_PACKAGE_NAME", "WHY")
PROJECT_DESCRIPTION = ("Explainable AI system")
PROJECT_URL = "https://gitlab.cci.drexel.edu/pjm363/why-senior-project"
AUTHOR_NAME = "Philip Monaco, Abdullah Shah, Ibrahim Elsaid, Jashanpreet Singh, William Lu, Songheng Li"
MAINTAINER_NAME = "Philip Monaco, Abdullah Shah, Ibrahim Elsaid, Jashanpreet Singh, William Lu, Songheng Li"
all_requires = []
core_requires = [
"numpy>=1.21",
"pandas>=1.3.5",
"bokeh>=2.4.2",
"matplotlib>=3.5.0",
"scikit-learn>=1.0.2"
]
all_requires += core_requires
lint_requires = [
"black==21.12b0",
"isort==5.10.1",
"flake8==4.0.1",
"mypy"
]
all_requires += lint_requires
docs_requires = [
"Sphinx",
"sphinx-gallery",
"sphinx-rtd-theme",
"m2r2"
]
all_requires += docs_requires
def _minimal_ext_cmd(cmd):
env = {}
for k in ["SYSTEMROOT", "PATH", "HOME"]:
v = os.environ.get(k)
if v is not None:
env[k] = v
env["Language"] = "C"
env["LANG"] = "C"
env["LV_ALL"] = "C"
out = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env)
return out
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment