Skip to content
Snippets Groups Projects
Commit bf5f5daa authored by tuhe's avatar tuhe
Browse files

Version committed to pypi

parent b1f6912f
No related branches found
No related tags found
No related merge requests found
Showing
with 137 additions and 62 deletions
LICENSE 0 → 100644
Copyright (c) 2018 The Python Packaging Authority
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
# snipper
## Deployment info
# Snip
A lightweight framework for removing code from student solutions. Currently used at DTU.
import os
# DONT't import stuff here since install script requires __version__
def cache_write(object, file_name, verbose=True):
import compress_pickle
dn = os.path.dirname(file_name)
if not os.path.exists(dn):
os.mkdir(dn)
if verbose: print("Writing cache...", file_name)
with open(file_name, 'wb', ) as f:
compress_pickle.dump(object, f, compression="lzma")
if verbose: print("Done!")
def cache_exists(file_name):
# file_name = cn_(file_name) if cache_prefix else file_name
return os.path.exists(file_name)
def cache_read(file_name):
import compress_pickle # Import here because if you import in top the __version__ tag will fail.
# file_name = cn_(file_name) if cache_prefix else file_name
if os.path.exists(file_name):
try:
with open(file_name, 'rb') as f:
return compress_pickle.load(f, compression="lzma")
except Exception as e:
print("Tried to load a bad pickle file at", file_name)
print("If the file appears to be automatically generated, you can try to delete it, otherwise download a new version")
print(e)
# return pickle.load(f)
else:
return None
File added
File added
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
\ No newline at end of file
from setuptools import setup
# Use this guide:
# https://packaging.python.org/tutorials/packaging-projects/
# from unitgrade2.version import __version__
import setuptools
from src.snipper.version import __version__
# with open("src/unitgrade2/version.py", "r", encoding="utf-8") as fh:
# __version__ = fh.read().split(" = ")[1].strip()[1:-1]
# long_description = fh.read()
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="example-pkg-YOUR-USERNAME-HERE",
version=__version__,
setuptools.setup(
name="codesnipper",
version="0.0.1",
author="Tue Herlau",
author_email="tuhe@dtu.dk",
description="A small example package",
description="A lightweight framework for censoring student solutions files and extracting code + output",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://compute.dtu.dk/tuhe/snipper",
# project_urls={
#"Bug Tracker": "https://github.com/pypa/sampleproject/issues",
# },
license="MIT",
url='https://lab.compute.dtu.dk/tuhe/snipper',
project_urls={
"Bug Tracker": "https://lab.compute.dtu.dk/tuhe/snipper/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
# "License :: OSI Approved :: MIT License",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
package_dir={"src"},
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
python_requires=">=3.6",
install_requires=['numpy', 'jinja2', 'tabulate', 'sklearn', 'compress_pickle', "pyfiglet"],
# name='homework-snipper-tuhe',
# version=__version__,
# packages=['snipper'],
# url='https://lab.compute.dtu.dk/tuhe/unitgrade',
# license='Apache',
# author='Tue Herlau',
# author_email='tuhe@dtu.dk',
# description='A lightweight student evaluation framework build on unittest',
# include_package_data=True,
python_requires=">=3.8",
install_requires=['jinja2',],
)
# setup(
# name='unitgrade',
# version=__version__,
# packages=['unitgrade2'],
# url=,
# license='MIT',
# author='Tue Herlau',
# author_email='tuhe@dtu.dk',
# description="""
# A student homework/exam evaluation framework build on pythons unittest framework. This package contains all files required to run unitgrade tests as a student. To develop tests, please use unitgrade_private.
# """,
# include_package_data=False,
# )
Metadata-Version: 2.1
Name: codesnipper
Version: 0.0.1
Summary: A lightweight framework for censoring student solutions files and extracting code + output
Home-page: https://lab.compute.dtu.dk/tuhe/snipper
Author: Tue Herlau
Author-email: tuhe@dtu.dk
License: UNKNOWN
Project-URL: Bug Tracker, https://lab.compute.dtu.dk/tuhe/snipper/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
# Snip
A lightweight framework for removing code from student solutions. Currently used at DTU.
LICENSE
MANIFEST.in
README.md
pyproject.toml
setup.py
src/codesnipper.egg-info/PKG-INFO
src/codesnipper.egg-info/SOURCES.txt
src/codesnipper.egg-info/dependency_links.txt
src/codesnipper.egg-info/requires.txt
src/codesnipper.egg-info/top_level.txt
src/snipper/__init__.py
src/snipper/snip_dir.py
src/snipper/snipper.py
\ No newline at end of file
jinja2
snipper
Metadata-Version: 2.1
Name: snip
Version: 0.0.1
Summary: A lightweight framework for censoring student solutions files and extracting code
Home-page: https://lab.compute.dtu.dk/tuhe/snipper
Author: Tue Herlau
Author-email: tuhe@dtu.dk
License: UNKNOWN
Project-URL: Bug Tracker, https://lab.compute.dtu.dk/tuhe/snipper/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
# Snip
A lightweight framework for removing code from student solutions. Currently used at DTU.
LICENSE
MANIFEST.in
README.md
pyproject.toml
setup.py
src/snip.egg-info/PKG-INFO
src/snip.egg-info/SOURCES.txt
src/snip.egg-info/dependency_links.txt
src/snip.egg-info/requires.txt
src/snip.egg-info/top_level.txt
src/snipper/__init__.py
src/snipper/snip_dir.py
src/snipper/snipper.py
\ No newline at end of file
jinja2
snipper
__version__ == "0.0.1"
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment