init
This commit is contained in:
		
						commit
						b7a655447a
					
				
					 6 changed files with 216 additions and 0 deletions
				
			
		
							
								
								
									
										132
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,132 @@
 | 
				
			||||||
 | 
					# Byte-compiled / optimized / DLL files
 | 
				
			||||||
 | 
					__pycache__/
 | 
				
			||||||
 | 
					*.py[cod]
 | 
				
			||||||
 | 
					*$py.class
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# C extensions
 | 
				
			||||||
 | 
					*.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Distribution / packaging
 | 
				
			||||||
 | 
					.Python
 | 
				
			||||||
 | 
					build/
 | 
				
			||||||
 | 
					develop-eggs/
 | 
				
			||||||
 | 
					dist/
 | 
				
			||||||
 | 
					downloads/
 | 
				
			||||||
 | 
					eggs/
 | 
				
			||||||
 | 
					.eggs/
 | 
				
			||||||
 | 
					lib/
 | 
				
			||||||
 | 
					lib64/
 | 
				
			||||||
 | 
					parts/
 | 
				
			||||||
 | 
					sdist/
 | 
				
			||||||
 | 
					var/
 | 
				
			||||||
 | 
					wheels/
 | 
				
			||||||
 | 
					*.egg-info/
 | 
				
			||||||
 | 
					.installed.cfg
 | 
				
			||||||
 | 
					*.egg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PyInstaller
 | 
				
			||||||
 | 
					# Usually these files are written by a python script from a template
 | 
				
			||||||
 | 
					# before PyInstaller builds the exe, so as to inject date/other infos into it.
 | 
				
			||||||
 | 
					*.manifest
 | 
				
			||||||
 | 
					*.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Installer logs
 | 
				
			||||||
 | 
					pip-log.txt
 | 
				
			||||||
 | 
					pip-delete-this-directory.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Unit test / coverage reports
 | 
				
			||||||
 | 
					htmlcov/
 | 
				
			||||||
 | 
					.tox/
 | 
				
			||||||
 | 
					.nox/
 | 
				
			||||||
 | 
					.coverage
 | 
				
			||||||
 | 
					.coverage.*
 | 
				
			||||||
 | 
					.cache
 | 
				
			||||||
 | 
					nosetests.xml
 | 
				
			||||||
 | 
					coverage.xml
 | 
				
			||||||
 | 
					*.cover
 | 
				
			||||||
 | 
					*.py,cover
 | 
				
			||||||
 | 
					.hypothesis/
 | 
				
			||||||
 | 
					.pytest_cache/
 | 
				
			||||||
 | 
					.coverage.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Translations
 | 
				
			||||||
 | 
					*.mo
 | 
				
			||||||
 | 
					*.pot
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Django stuff:
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
 | 
					local_settings.py
 | 
				
			||||||
 | 
					db.sqlite3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Flask stuff:
 | 
				
			||||||
 | 
					instance/
 | 
				
			||||||
 | 
					.webassets-cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Scrapy stuff:
 | 
				
			||||||
 | 
					.scrapy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Sphinx documentation
 | 
				
			||||||
 | 
					docs/_build/
 | 
				
			||||||
 | 
					docs/autosummary/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Jupyter Notebook
 | 
				
			||||||
 | 
					.ipynb_checkpoints
 | 
				
			||||||
 | 
					*.ipynb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# IPython
 | 
				
			||||||
 | 
					profile_default/
 | 
				
			||||||
 | 
					ipython_config.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# pyenv
 | 
				
			||||||
 | 
					# For a library or package, you might want to ignore these files since the code is
 | 
				
			||||||
 | 
					# intended to run in multiple environments; see https://github.com/pyenv/pyenv/issues/528
 | 
				
			||||||
 | 
					.python-version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PEP 582; used by e.g. github.com/David-OConnor/pyflow and https://pdm.fming.dev
 | 
				
			||||||
 | 
					__pypackages__/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Celery stuff
 | 
				
			||||||
 | 
					celerybeat-schedule
 | 
				
			||||||
 | 
					celerybeat.pid
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# SageMath parsed files
 | 
				
			||||||
 | 
					*.sage.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Environments
 | 
				
			||||||
 | 
					.env
 | 
				
			||||||
 | 
					.venv
 | 
				
			||||||
 | 
					env/
 | 
				
			||||||
 | 
					venv/
 | 
				
			||||||
 | 
					ENV/
 | 
				
			||||||
 | 
					env.bak/
 | 
				
			||||||
 | 
					venv.bak/
 | 
				
			||||||
 | 
					env.d/
 | 
				
			||||||
 | 
					venv.d/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Spyder project settings
 | 
				
			||||||
 | 
					.spyderproject
 | 
				
			||||||
 | 
					.spyproject
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Rope project settings
 | 
				
			||||||
 | 
					.ropeproject
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# mkdocs documentation
 | 
				
			||||||
 | 
					/site
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# mypy
 | 
				
			||||||
 | 
					.mypy_cache/
 | 
				
			||||||
 | 
					.dmypy.json
 | 
				
			||||||
 | 
					dmypy.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Pyre type checker
 | 
				
			||||||
 | 
					.pyre/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# pytype static type analyzer
 | 
				
			||||||
 | 
					.pytype/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Cython debug symbols
 | 
				
			||||||
 | 
					cython_debug/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# VSCode settings
 | 
				
			||||||
 | 
					.vscode/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					labhw
 | 
				
			||||||
 | 
					=====
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										0
									
								
								labsw/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								labsw/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										26
									
								
								labsw/io.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								labsw/io.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,26 @@
 | 
				
			||||||
 | 
					import pandas as pd
 | 
				
			||||||
 | 
					import numpy as np
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def load_data_RH_logger(filepath):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    with open(filepath, 'r') as f:
 | 
				
			||||||
 | 
					        header = f.readline()
 | 
				
			||||||
 | 
					    header = header.strip('# ').rstrip('\n').split('|')
 | 
				
			||||||
 | 
					    header.append('X') # Empty col...
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    df = pd.read_csv('_data.dat', sep=' ',  names=header, skiprows=1)
 | 
				
			||||||
 | 
					    df = df.drop(columns='X')
 | 
				
			||||||
 | 
					    df = df.drop(np.arange(1))
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    df['dm_m'] = (df['weight'] - df['weight'].iloc[0]) / df['weight'].iloc[0]
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    # Crop data
 | 
				
			||||||
 | 
					    #df = df.drop(df[df['time'] < 0.02 * 3600].index)
 | 
				
			||||||
 | 
					    df = df.reset_index()
 | 
				
			||||||
 | 
					    del df['index']
 | 
				
			||||||
 | 
					    #df.head()
 | 
				
			||||||
 | 
					    #df = df[df['time'] > 301_000]
 | 
				
			||||||
 | 
					    return df
 | 
				
			||||||
							
								
								
									
										2
									
								
								requirements.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								requirements.txt
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					numpy
 | 
				
			||||||
 | 
					pandas
 | 
				
			||||||
							
								
								
									
										52
									
								
								setup.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								setup.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,52 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from setuptools import setup, find_packages
 | 
				
			||||||
 | 
					from os import path
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Function to read the requirements from the requirements.txt file
 | 
				
			||||||
 | 
					def parse_requirements(filename):
 | 
				
			||||||
 | 
					    with open(filename, 'r') as file:
 | 
				
			||||||
 | 
					        return file.read().splitlines()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Get the long description from the README file
 | 
				
			||||||
 | 
					here = path.abspath(path.dirname(__file__))
 | 
				
			||||||
 | 
					with open(path.join(here, 'README.md'), encoding='utf-8') as f:
 | 
				
			||||||
 | 
					    long_description = f.read()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup(
 | 
				
			||||||
 | 
					    name='labsw',
 | 
				
			||||||
 | 
					    version='0.1.0',  # Required
 | 
				
			||||||
 | 
					    description='A short description of the project',  # Optional
 | 
				
			||||||
 | 
					    long_description=long_description,  # Optional
 | 
				
			||||||
 | 
					    long_description_content_type='text/markdown',  # Optional (see note above)
 | 
				
			||||||
 | 
					    url='https://github.com/yourusername/yourproject',  # Optional
 | 
				
			||||||
 | 
					    author='François Boulogne',  # Optional
 | 
				
			||||||
 | 
					    author_email='devel@sciunto.org',  # Optional
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Automatically find packages in the current directory
 | 
				
			||||||
 | 
					    packages=find_packages(),  # Required
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Include additional files specified in MANIFEST.in
 | 
				
			||||||
 | 
					    include_package_data=True,  # Optional
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Define your dependencies in a separate file
 | 
				
			||||||
 | 
					    install_requires=parse_requirements('requirements.txt'),  # Optional
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Classifiers help users find your project by categorizing it
 | 
				
			||||||
 | 
					    classifiers=[
 | 
				
			||||||
 | 
					        'Programming Language :: Python :: 3',
 | 
				
			||||||
 | 
					        'Programming Language :: Python :: 3.6',
 | 
				
			||||||
 | 
					        'Programming Language :: Python :: 3.7',
 | 
				
			||||||
 | 
					        'Programming Language :: Python :: 3.8',
 | 
				
			||||||
 | 
					        'Programming Language :: Python :: 3.9',
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Specify the Python versions you support
 | 
				
			||||||
 | 
					    python_requires='>=3.6, <4',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Specify additional groups of dependencies (e.g., for testing)
 | 
				
			||||||
 | 
					    extras_require={
 | 
				
			||||||
 | 
					        'dev': ['check-manifest'],
 | 
				
			||||||
 | 
					        'test': ['coverage'],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue